diff --git a/pom.xml b/pom.xml
index df8d9de..9f795a1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,7 +8,7 @@
org.gcube.spatial.data
gis-interface
- 2.0.5-SNAPSHOT
+ 2.0.6-SNAPSHOT
gis-interface
diff --git a/src/main/java/org/gcube/spatial/data/gis/GISInterface.java b/src/main/java/org/gcube/spatial/data/gis/GISInterface.java
index 5d6dc40..2cd5791 100644
--- a/src/main/java/org/gcube/spatial/data/gis/GISInterface.java
+++ b/src/main/java/org/gcube/spatial/data/gis/GISInterface.java
@@ -14,6 +14,7 @@ import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Date;
+import java.util.List;
import java.util.NoSuchElementException;
import java.util.SortedSet;
import java.util.concurrent.ConcurrentSkipListSet;
@@ -23,6 +24,7 @@ import org.gcube.spatial.data.geonetwork.GeoNetwork;
import org.gcube.spatial.data.geonetwork.GeoNetworkPublisher;
import org.gcube.spatial.data.geonetwork.GeoNetworkReader;
import org.gcube.spatial.data.geonetwork.LoginLevel;
+import org.gcube.spatial.data.geonetwork.configuration.XMLAdapter;
import org.gcube.spatial.data.gis.is.GeoServerDescriptor;
import org.gcube.spatial.data.gis.is.InfrastructureCrawler;
import org.gcube.spatial.data.gis.meta.MetadataEnricher;
@@ -47,17 +49,20 @@ public class GISInterface {
}
+
+
//************ INSTANCE
-
+ private List toRegisterXMLAdapters=null;
private GISInterface() throws Exception{
}
-
-
-
+ public void setToRegisterXMLAdapters(List toRegisterXMLAdapters) {
+ this.toRegisterXMLAdapters = toRegisterXMLAdapters;
+ }
+
//*******************READER getter METHODS
public GeoNetworkReader getGeoNetworkReader() throws Exception{
@@ -394,7 +399,12 @@ public class GISInterface {
}
private synchronized GeoNetworkPublisher getGN() throws Exception{
- if(geoNetwork==null) geoNetwork=GeoNetwork.get();
+ if(geoNetwork==null) {
+ geoNetwork=GeoNetwork.get();
+ if(toRegisterXMLAdapters!=null)
+ for(XMLAdapter adapter:toRegisterXMLAdapters)
+ geoNetwork.registerXMLAdapter(adapter);
+ }
return geoNetwork;
}