Commit fec23ae2 authored by George Adrian Stoica's avatar George Adrian Stoica

change metadata editor controller to make use of the new metadata class

features  MR !6
parent 8c74ac67
......@@ -140,7 +140,7 @@ public class MetaDataEditorController {
final Iterator<String> propertyNames = latlong.getMetaData().propertyNames();
while(propertyNames.hasNext()) {
final String propName = propertyNames.next();
if((propName==MetaData.NAME_PROPERTY)||(propName==MetaData.DESCRIPTION_PROPERTY)) {
if (MetaData.STD_PROPERTIES.contains(propName)) {
continue;
} else {
propertyNames.remove();
......@@ -179,8 +179,7 @@ public class MetaDataEditorController {
public void onAddUpdateProperty(ActionEvent event) {
final String newKey = newKeyInput.getText();
final String newValue = newValueInput.getText();
if(!newKey.isBlank() && (newKey != MetaData.NAME_PROPERTY)
&& (newKey != MetaData.DESCRIPTION_PROPERTY)) {
if(!newKey.isBlank() && (!MetaData.STD_PROPERTIES.contains(newKey))) {
latlong.getMetaData().setProperty(newKey, newValue);
updatePropertiesTable();
}
......@@ -194,8 +193,7 @@ public class MetaDataEditorController {
if( propertyNames.hasNext()) {
while(propertyNames.hasNext()) {
final String propertyName = propertyNames.next();
if ((propertyName == MetaData.NAME_PROPERTY) ||
(propertyName == MetaData.DESCRIPTION_PROPERTY)) {
if (MetaData.STD_PROPERTIES.contains(propertyName)) {
continue;
} else {
Pair<String,String> p = new Pair<String, String>(propertyName, metaData.getProperty(propertyName));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment