Skip to content
Snippets Groups Projects
Commit cd009ff9 authored by George Adrian Stoica's avatar George Adrian Stoica
Browse files

more fixes related to MR !6

changed isCustomProperty to static
minor changes for formatting
parent fec23ae2
No related branches found
No related tags found
1 merge request!6Issue 11 allow user to enter and update metadata about the latlong points
Pipeline #53466 passed
...@@ -21,7 +21,7 @@ public class MetaData { ...@@ -21,7 +21,7 @@ public class MetaData {
/** /**
* the list containing standard properties associated to location metadata * the list containing standard properties associated to location metadata
*/ */
final public static List<String> STD_PROPERTIES = Collections.unmodifiableList(Arrays.asList(NAME_PROPERTY, DESCRIPTION_PROPERTY)); public final static List<String> STD_PROPERTIES = Collections.unmodifiableList(Arrays.asList(NAME_PROPERTY, DESCRIPTION_PROPERTY));
private Collection<String> tags; private Collection<String> tags;
...@@ -291,7 +291,7 @@ public class MetaData { ...@@ -291,7 +291,7 @@ public class MetaData {
* @param propertyName the property name to check * @param propertyName the property name to check
* @return true if custom false if standard prop * @return true if custom false if standard prop
*/ */
public boolean isCustomProperty(String propertyName) { public static boolean isCustomProperty(String propertyName) {
return !(STD_PROPERTIES.contains(propertyName)); return !(STD_PROPERTIES.contains(propertyName));
} }
......
...@@ -179,7 +179,7 @@ public class MetaDataEditorController { ...@@ -179,7 +179,7 @@ public class MetaDataEditorController {
public void onAddUpdateProperty(ActionEvent event) { public void onAddUpdateProperty(ActionEvent event) {
final String newKey = newKeyInput.getText(); final String newKey = newKeyInput.getText();
final String newValue = newValueInput.getText(); final String newValue = newValueInput.getText();
if(!newKey.isBlank() && (!MetaData.STD_PROPERTIES.contains(newKey))) { if(!newKey.isBlank() && (MetaData.isCustomProperty(newKey))) {
latlong.getMetaData().setProperty(newKey, newValue); latlong.getMetaData().setProperty(newKey, newValue);
updatePropertiesTable(); updatePropertiesTable();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment