diff --git a/nb-configuration.xml b/nb-configuration.xml new file mode 100644 index 0000000000000000000000000000000000000000..db65a214b01cbb1373c6b71b5c5124d499df163a --- /dev/null +++ b/nb-configuration.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project-shared-configuration> + <!-- +This file contains additional configuration written by modules in the NetBeans IDE. +The configuration is intended to be shared among all the users of project and +therefore it is assumed to be part of version control checkout. +Without this configuration present, some functionality in the IDE may be limited or fail altogether. +--> + <properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1"> + <!-- +Properties that influence various parts of the IDE, especially code formatting and the like. +You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up. +That way multiple projects can share the same settings (useful for formatting rules for example). +Any value defined here will override the pom.xml file value but is only applicable to the current project. +--> + <netbeans.hint.license>default_1</netbeans.hint.license> + </properties> +</project-shared-configuration> diff --git a/src/main/java/no/bioforsk/vips/entity/Result.java b/src/main/java/no/bioforsk/vips/entity/Result.java index 4d28dfa1d42363764729acc24589a1ea3eac08ed..da3a91477317269f81ce64d1ab4a3f98abacecc9 100644 --- a/src/main/java/no/bioforsk/vips/entity/Result.java +++ b/src/main/java/no/bioforsk/vips/entity/Result.java @@ -28,8 +28,8 @@ public interface Result extends Comparable{ public Set<String> getKeys(); /* Setting and getting values */ - public void setValue(String key, String value); - public String getValue(String key); + public void setValue(String namespace, String key, String value); + public String getValue(String namespace, String key); public void setAllValues(Map<String,String> values); public Map<String,String> getAllValues(); diff --git a/src/main/java/no/bioforsk/vips/entity/ResultImpl.java b/src/main/java/no/bioforsk/vips/entity/ResultImpl.java index bf392f6719b5323e13acfa8d9c8843e76e29fbbd..fcd707cfc17285cd731ace9ae16a1468a0ff73a0 100644 --- a/src/main/java/no/bioforsk/vips/entity/ResultImpl.java +++ b/src/main/java/no/bioforsk/vips/entity/ResultImpl.java @@ -37,15 +37,15 @@ public class ResultImpl implements Result{ } @Override - public void setValue(String key, String value) { + public void setValue(String namespace, String key, String value) { if(this.values == null) this.values = new HashMap(); - this.values.put(key, value); + this.values.put(namespace + "." + key, value); } @Override - public String getValue(String key) { - return this.values != null ? this.values.get(key) : null; + public String getValue(String namespace, String key) { + return this.values != null ? this.values.get(namespace + "." + key) : null; } @Override diff --git a/src/main/java/no/bioforsk/vips/util/CommonNamespaces.java b/src/main/java/no/bioforsk/vips/util/CommonNamespaces.java new file mode 100644 index 0000000000000000000000000000000000000000..9a06767994937f76d3a38d61638aad57e6cb5888 --- /dev/null +++ b/src/main/java/no/bioforsk/vips/util/CommonNamespaces.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2014 Bioforsk <http://www.bioforsk.no/>. + * + * This file is part of VIPSCommon. + * VIPSCommon is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * VIPSCommon is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with VIPSCommon. If not, see <http://www.gnu.org/licenses/>. + * + */ + +package no.bioforsk.vips.util; + +/** + * @copyright 2014 <a href="http://www.bioforsk.no/">Bioforsk</a> + * @author Tor-Einar Skog <tor-einar.skog@bioforsk.no> + */ +public class CommonNamespaces { + public final static String NS_WEATHER = "WEATHER"; +}