[Volute] r3605 - in trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml: . graph mapping mapping/vodmli model stdtypes xml

Volute commit messages volutecommits at g-vo.org
Wed Oct 26 18:05:39 CEST 2016


Author: gerard.lemson
Date: Thu Oct  6 21:32:46 2016
New Revision: 3605

Log:


Modified:
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/Main.java
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/MongoMain.java
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/PathGenerator.java
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/Utype.java
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/VODMLManager.java
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/VODMLREF.java
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/graph/ModelNode.java
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/JAXBVOTableInterpreter.java
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/Main.java
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/VODML.java
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/vodmli/GroupID.java
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/vodmli/ObjectTypeCollection.java
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/vodmli/VODMLIManager.java
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/DataTypeInstance.java
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/Identifier.java
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/ObjectID.java
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/ObjectTypeInstance.java
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/StringsIdentifier.java
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/StructuredObject.java
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/stdtypes/Identity.java
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/xml/VODMLManager.java
   trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/xml/VODMLUtil.java

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/Main.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/Main.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/Main.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -14,7 +14,7 @@
 	public static void main(String[] args) throws Exception {
 		// TODO Auto-generated method stub
 
-		String url = "https://volute.googlecode.com/svn/trunk/projects/dm/vo-dml/models/source/SourceDM.vo-dml.xml";
+		String url = "http://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/models/source/SourceDM.vo-dml.xml";
 		MongoDBRegistry m = new MongoDBRegistry("localhost", 27017);
 		VODMLManager vodml = new VODMLManager(m, url);
 //		VODMLManager vodml = new VODMLManager(new RemoteVODMLRegistry(), url);

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/MongoMain.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/MongoMain.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/MongoMain.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -52,30 +52,30 @@
 	public void addStandardModels() throws Exception
 	{
 		vodmlRegistry.addModel("ivoa", 
-				new String[]{"https://volute.googlecode.com/svn/trunk/projects/dm/vo-dml/models/ivoa/IVOA.vo-dml.xml",
-			      "http://volute.googlecode.com/svn/trunk/projects/dm/vo-dml/models/ivoa/IVOA.vo-dml.xml",
+				new String[]{"https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/models/ivoa/IVOA.vo-dml.xml",
+			      "http://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/models/ivoa/IVOA.vo-dml.xml",
 					"http://localhost:8080/VODML-Mapper/vo-dml/IVOA.vo-dml.xml"
 				},
-				"https://volute.googlecode.com/svn/trunk/projects/dm/vo-dml/models/ivoa/IVOA.html");
+				"https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/models/ivoa/IVOA.html");
 		vodmlRegistry.addModel("vo-dml", 
 				new String[]{
 					"http://localhost:8080/VODML-Mapper/vo-dml/VO-DML.vo-dml.xml",
-					"https://volute.googlecode.com/svn/trunk/projects/dm/vo-dml/models/vo-dml/VO-DML.vo-dml.xml", 
-					"http://volute.googlecode.com/svn/trunk/projects/dm/vo-dml/models/vo-dml/VO-DML.vo-dml.xml"
+					"https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/models/vo-dml/VO-DML.vo-dml.xml", 
+					"http://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/models/vo-dml/VO-DML.vo-dml.xml"
 				},
-				"https://volute.googlecode.com/svn/trunk/projects/dm/vo-dml/models/vo-dml/VO-DML.html");
+				"https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/models/vo-dml/VO-DML.html");
 		vodmlRegistry.addModel("photdm-alt", 
-				new String[]{"https://volute.googlecode.com/svn/trunk/projects/dm/vo-dml/models/photdm-alt/PhotDM-alt.vo-dml.xml",
-					"https://volute.googlecode.com/svn/trunk/projects/dm/vo-dml/models/photdm-alt/PhotDM-alt.vo-dml.xml",
+				new String[]{"https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/models/photdm-alt/PhotDM-alt.vo-dml.xml",
+					"https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/models/photdm-alt/PhotDM-alt.vo-dml.xml",
 					"http://localhost:8080/VODML-Mapper/vo-dml/PhotDM-alt.vo-dml.xml"
 				},
-				"https://volute.googlecode.com/svn/trunk/projects/dm/vo-dml/models/photdm-alt/PhotDM-alt.html");
+				"https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/models/photdm-alt/PhotDM-alt.html");
 		vodmlRegistry.addModel("src",
-				new String[]{"https://volute.googlecode.com/svn/trunk/projects/dm/vo-dml/models/source/SourceDM.vo-dml.xml",
-				"https://volute.googlecode.com/svn/trunk/projects/dm/vo-dml/models/source/SourceDM.vo-dml.xml",
+				new String[]{"https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/models/source/SourceDM.vo-dml.xml",
+				"https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/models/source/SourceDM.vo-dml.xml",
 				"http://localhost:8080/VODML-Mapper/vo-dml/SourceDM.vo-dml.xml"
 				},
-				"https://volute.googlecode.com/svn/trunk/projects/dm/vo-dml/models/source/SourceDM.html");
+				"https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/models/source/SourceDM.html");
 	}
 	/**
 	 * transform the models.name variable to be vodml-id in al collections.

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/PathGenerator.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/PathGenerator.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/PathGenerator.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -179,7 +179,7 @@
 			for (ReferableElement e : this) {
 				sb.append("<path-element type=\"")
 						.append(e.getClass().getSimpleName())
-						.append("\" utype=\"").append(VODMLREF.vodmlrefFor(e,model))
+						.append("\" vodmlref=\"").append(VODMLREF.vodmlrefFor(e,model))
 						.append("\"");
 				if (e == this.lastElement())
 					sb.append("/>").append(NL);

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/Utype.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/Utype.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/Utype.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -2,23 +2,23 @@
 
 
 import org.ivoa.vodml.jaxb.Model;
-import org.ivoa.vodml.jaxb.ReferencableElement;
+import org.ivoa.vodml.jaxb.ReferableElement;
 
 public class Utype {
 
-	public final static String MODEL = "vo-dml:Model";
-	public final static String MODEL_URL = "vo-dml:Model.url";
-	public final static String MODEL_PREFIX = "vo-dml:Model.name";
-	public final static String OBJECTTYPE = "vo-dml:ObjectType";
-	public final static String OBJECT_ID = "vo-dml:Object.ID";
-	public final static String IDENTIFIER = "vo-dml:Identifier";
-	public final static String REFERENCE = "vo-dml:Reference";
-	public final static String INSTANCE_TYPE = "vo-dml:Instance.type";
-	public final static String TYPE_INSTANCE = "vo-dml:Type.instance";
-	public final static String OBJECTTYPE_INSTANCE = "vo-dml:ObjectType.instance";
-	public final static String DATATYPE_INSTANCE = "vo-dml:DataType.instance";
-	public final static String CONTAINER = "vo-dml:Object.container";
-	public final static String COLLECTION_ITEM = "vo-dml:Collection.item";
+	public final static String MODEL = "vodml-map:Model";
+	public final static String MODEL_URL = "vodml-map:Model.url";
+	public final static String MODEL_PREFIX = "vodml-map:Model.name";
+	public final static String OBJECTTYPE = "vodml-map:ObjectType";
+	public final static String OBJECT_ID = "vodml-map:Object.ID";
+	public final static String IDENTIFIER = "vodml-map:Identifier";
+	public final static String REFERENCE = "vodml-map:Reference";
+	public final static String INSTANCE_TYPE = "vodml-map:Instance.type";
+	public final static String TYPE_INSTANCE = "vodml-map:Type.instance";
+	public final static String OBJECTTYPE_INSTANCE = "vodml-map:ObjectType.instance";
+	public final static String DATATYPE_INSTANCE = "vodml-map:DataType.instance";
+	public final static String CONTAINER = "vodml-map:Object.container";
+	public final static String COLLECTION_ITEM = "vodml-map:Collection.item";
 
 
 	public static boolean isModel(String utype) {
@@ -33,8 +33,8 @@
 	 * @param el
 	 * @return
 	 */
-	public static final String utypeFor(ReferencableElement el, Model model) {
-		return (el == null?null:model.getVodmlId()+":"+el.getVodmlId());
+	public static final String utypeFor(ReferableElement el, Model model) {
+		return (el == null?null:model.getName()+":"+el.getVodmlId());
 	}
 
 	public static String getPrefix(String utype)

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/VODMLManager.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/VODMLManager.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/VODMLManager.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -45,7 +45,7 @@
 	 */
 	private static final long serialVersionUID = -5963181083012981591L;
 
-//	public static final String VODML_url = "https://volute.googlecode.com/svn/trunk/projects/dm/vo-dml/models/vo-dml/VO-DML.vo-dml.xml";
+//	public static final String VODML_url = "https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/models/vo-dml/VO-DML.vo-dml.xml";
 
 	private VODMLRegistry vodmlReg;
 	/** models keyed by url, to quickly see whether a model has been loaded */
@@ -284,9 +284,9 @@
 		}
 		
 			
-		// special checks: container and reference are allowed to use vo-dml:Identifier as type!
+		// special checks: container and reference are allowed to use vodml-map:Identifier as type!
 		// TBD could put this on utypeattr, add the actual declared type of the role, but indicate 
-		// it is indirectly referenced through a vo-dml:Identifier
+		// it is indirectly referenced through a vodml-map:Identifier
     	return false;
 	}
 	

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/VODMLREF.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/VODMLREF.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/VODMLREF.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -8,27 +8,27 @@
 
 public class VODMLREF {
 
-	private final static String MODEL = "vo-dml:Model";
-	private final static String MODEL_URL = "vo-dml:Model.url";
-	private final static String MODEL_PREFIX = "vo-dml:Model.name";
-	private final static String OBJECTTYPE = "vo-dml:ObjectTypeInstance";
-	private final static String OBJECT_ID = "vo-dml:ObjectTypeInstance.ID";
-	private final static String IDENTIFIER = "vo-dml:Identifier";
-	private final static String REFERENCE = "vo-dml:Reference";
-	private final static String GROUPref = "vo-dml:GROUPref";
-	private final static String ORMREFERENCE = "vo-dml:ORMReference";
-	private final static String REMOTEREFERENCE = "vo-dml:RemoteReference";
-	private final static String INSTANCE_TYPE = "vo-dml:Instance.type";
-	private final static String TYPE_INSTANCE = "vo-dml:Type.instance";
-	private final static String OBJECTTYPE_INSTANCE = "vo-dml:ObjectType.instance";
-	private final static String DATATYPE_INSTANCE = "vo-dml:DataType.instance";
-	private final static String CONTAINER = "vo-dml:ObjectTypeInstance.container";
-	private final static String COLLECTION_ITEM = "vo-dml:Collection.item";
+	private final static String MODEL = "vodml-map:Model";
+	private final static String MODEL_URL = "vodml-map:Model.url";
+	private final static String MODEL_PREFIX = "vodml-map:Model.name";
+	private final static String OBJECTTYPE = "vodml-map:ObjectTypeInstance";
+	private final static String OBJECT_ID = "vodml-map:ObjectTypeInstance.ID";
+	private final static String IDENTIFIER = "vodml-map:Identifier";
+	private final static String REFERENCE = "vodml-map:Reference";
+	private final static String GROUPref = "vodml-map:GROUPref";
+	private final static String ORMREFERENCE = "vodml-map:ORMReference";
+	private final static String REMOTEREFERENCE = "vodml-map:RemoteReference";
+	private final static String INSTANCE_TYPE = "vodml-map:Instance.type";
+	private final static String TYPE_INSTANCE = "vodml-map:Type.instance";
+	private final static String OBJECTTYPE_INSTANCE = "vodml-map:ObjectType.instance";
+	private final static String DATATYPE_INSTANCE = "vodml-map:DataType.instance";
+	private final static String CONTAINER = "vodml-map:ObjectTypeInstance.container";
+	private final static String COLLECTION_ITEM = "vodml-map:Collection.item";
 
 
 	public static boolean isModel(VODMLAnnotation vodml) {
 		if(vodml == null) return false;
-		String type = (vodml.getTYPES() != null && vodml.getTYPES().size() == 1)?vodml.getTYPES().get(0): null;
+		String type = vodml.getTYPE();
 		return MODEL.equals(type);
 	}
 	public static boolean isModelURL(VODMLAnnotation vodml) {

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/graph/ModelNode.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/graph/ModelNode.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/graph/ModelNode.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -7,6 +7,7 @@
 import org.ivoa.vodml.jaxb.ObjectType;
 import org.ivoa.vodml.jaxb.Package;
 import org.ivoa.vodml.jaxb.PrimitiveType;
+import org.ivoa.vodml.model.StructuredObject;
 
 
 public class ModelNode extends ElementNode{
@@ -29,9 +30,13 @@
 	public String getUrl() {
 		return url;
 	}
-	public StringBuilder deepToString(StringBuilder sb)
+	public StringBuilder deepToString(StringBuilder sb, String offset)
 	{
-		sb.append(String.format("<model><vodmlURL>%s</vodmlURL><utypePrefix>%s</utypePrefix>",url,getModel().getName())).append("</model>");
+		String newoffset = offset+"  ";
+		sb.append(offset).append("<model>").append(StructuredObject.NEWLINE);
+		sb.append(newoffset).append(String.format("<vodmlURL>%s</vodmlURL>",url)).append(StructuredObject.NEWLINE);
+		sb.append(newoffset).append(String.format("<vodmlrefPrefix>%s</vodmlrefPrefix>",getModel().getName())).append(StructuredObject.NEWLINE);
+		sb.append(offset).append("</model>");
 		return sb;
 	}
 	/**

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/JAXBVOTableInterpreter.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/JAXBVOTableInterpreter.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/JAXBVOTableInterpreter.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -72,10 +72,10 @@
 	 * @return
 	 * @throws Exception
 	 */
-	public static void validate(URL votableURL, VODMLRegistry vodmlReg) throws Exception
+	public static boolean validate(URL votableURL, VODMLRegistry vodmlReg) throws Exception
 	{
 		JAXBVOTableInterpreter voti = new JAXBVOTableInterpreter(vodmlReg);
-		voti.run(votableURL, null, true);
+		return voti.run(votableURL, null, true);
 	}
     public static boolean isModel(GroupNode gn)
     {
@@ -92,7 +92,7 @@
 				if(o instanceof Param)
 				{
 					Param p = (Param)o;
-					if(VODMLREF.isModelURL(p.getVODML()));
+					if(VODMLREF.isModelURL(p.getVODML()))
 						return p.getValue();
 				}
 			}
@@ -137,7 +137,7 @@
 	 * Do the main work ...
 	 * result is a VODMLIManager filled with objects.
 	 */
-	private void run(URL _votableURL, URL _mappingFile, boolean validateOnly) throws Exception
+	private boolean run(URL _votableURL, URL _mappingFile, boolean validateOnly) throws Exception
 	{
 		this.votableURL = _votableURL;
 		this.mappingFile = _mappingFile;
@@ -156,16 +156,30 @@
 		inferModels();
 		
 		// infer the full VO-DML annotation of the VOTable elements from utype attributes and type casting PARAM-s
-		inferVODMLAnnotation();
-		
+		boolean hasErrors = false;
+		ArrayList<Exception> errors = inferVODMLAnnotation();
+		if(errors.size() > 0){
+			hasErrors = true;
+			System.out.printf("Found %d exceptions while inferring VODML annotations.\n",errors.size());
+			for(Exception e: errors)
+				System.out.println("EXCEPTION: "+e.getMessage());
+		}
+
 		// validate the annotated elements. 
-		validateMapping();
+		errors = validateMapping();
+		
+		if(errors.size() > 0){
+			hasErrors = true;
+			System.out.printf("Found %d exceptions while validating.\n",errors.size());
+			for(Exception e: errors)
+				System.out.println("EXCEPTION: "+e.getMessage());
+		}
 		if(validateOnly)
-			return;
+			return hasErrors;
 
 		// find how ObjectType instances are represented by their groups-s and register them on the vodmlimanager
 		extractObjects();
-		
+		return false;
 	}
 	
 	private void extractObjects() throws JAXBException
@@ -193,7 +207,7 @@
 					ml.setVodmlrefPrefix(getModelPrefix(gn));
 					models.add(ml);
 				} else
-					throw new VODMLException(String.format("Only a GROUP can be annotated with a Model utype, not a '%s'",el.getClass().getName()));
+					throw new VODMLException(String.format("Only a GROUP can be annotated with a Model vodmlref, not a '%s'",el.getClass().getName()));
 			}
 		}
 		if(models.size() > 0)
@@ -209,13 +223,13 @@
 	 * 
 	 * @throws VODMLException
 	 */
-	private void inferVODMLAnnotation() throws VODMLException
+	private ArrayList<Exception> inferVODMLAnnotation() throws VODMLException
 	{
+		ArrayList<Exception> errors = new ArrayList<Exception>();
 		this.standAloneTypes = new ArrayList<VOTableElement>();
 		this.objectTypes = new ArrayList<GroupNode>();
 
-		boolean hasErrors = false;
-		// associate all utype attributes to their model elements
+		// associate all vodmlref attributes to their model elements
 		for(VOTableElement el: votableGraph)
 		{
 			VODML annotation = el.getVODML();
@@ -225,14 +239,14 @@
 				annotation.inferVODMLAnnotation(vodmlManager, votableGraph);
 			} catch(VODMLException er)
 			{
-				System.out.println(er.getMessage());
-				hasErrors = true;
+				errors.add(er);
 			}
+
 			// if we want to keep a dictionary of Type-VODataElement pairs, the following method can do so.
 			register(el);
 		}
-		if(hasErrors)
-			throw new VODMLException("Errors were found identifying VO-DML elements with VODMLREFs");
+		return errors;
+
 
 	}
 	
@@ -252,8 +266,9 @@
 	/**
 	 * For all GROUPS-s identifying an objecttype, check their contents and relationships.<br/>
 	 */
-	private void validateMapping() throws VODMLException
+	private ArrayList<Exception> validateMapping() throws VODMLException
 	{
+		ArrayList<Exception> excs = new ArrayList<Exception>();
 		// check whether all child elements have a role utype valid on the object type
 		for(VOTableElement el: votableGraph)
 		{
@@ -261,13 +276,18 @@
 			if(el instanceof GroupNode)
 			{
 				GroupNode gn = (GroupNode)el;
-				validateGroup(gn);
-				analyzeGroup(gn);
+				try {
+					validateGroup(gn);
+					analyzeGroup(gn);
+				} catch(Exception e){
+					excs.add(e);
+				}
 			} else {
 				if(role instanceof ReferenceNode)
-					throw new VODMLException("Reference must be represented by a GROUP");
+					excs.add(new VODMLException("Reference must be represented by a GROUP"));
 			}
 		}
+		return excs;
 	}
 	
 	private void validateGroup(GroupNode gn) throws VODMLException

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/Main.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/Main.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/Main.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -59,7 +59,7 @@
 		{
 			VOTABLE_JAXBHelper jaxb = VOTABLE_JAXBHelper.jaxb;
 	
-	//		URL u = new URL("https://volute.googlecode.com/svn/trunk/projects/dm/vo-dml/doc/examples/2mass_concat.votable");
+	//		URL u = new URL("https://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/doc/examples/2mass_concat.votable");
 			File f_vot = new File("C:/workspaces/eclipse_VO-URP/vo-dml/doc/examples/2mass_concat.votable");
 			
 			VOTABLEGraph graph = VOTABLEGraph.newInstance(new FileInputStream(f_vot), false);
@@ -102,8 +102,10 @@
 		URL url = f_vot.toURI().toURL();
 		
 		try {
-			JAXBVOTableInterpreter.validate(url, vodmlReg);
-			System.out.printf("SUCCES! VOTable in '%s' is valid wrt VO-DML mapping\n",filename);
+			if (!JAXBVOTableInterpreter.validate(url, vodmlReg))
+				System.out.printf("SUCCES! VOTable in '%s' is valid wrt VO-DML mapping\n",filename);
+			else
+				System.out.printf("ERRORS were found while validating VOTable in '%s'\n",filename);
 		} catch(Exception e)
 		{
 			e.printStackTrace();

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/VODML.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/VODML.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/VODML.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -65,8 +65,7 @@
 			ElementNode el = vodml.findReferableElement(va.getROLE());
 			if(el == null )
 			{
-				System.out.printf("No VO-DML element found for VODML/ROLE '%s' on '%s' with rank='%d'\n", va.getROLE(), votElement.getType(),votElement.getRank());
-				System.out.flush();
+				throw new VODMLException(String.format("No VO-DML element found for VODML/ROLE '%s' on '%s' with rank='%d'", va.getROLE(), votElement.getType(),votElement.getRank()));
 			}
 			else if(el instanceof RoleNode) 
 			{
@@ -79,13 +78,12 @@
 			} else 
 				throw new VODMLException(String.format("VORMLREF for VODML/ROLE %s does not identify a Role.",va.getROLE()) );
 		}
-		if(va.getTYPES() != null && va.getTYPES().size() ==1){ // TODO complain if there are more types.
-			type = va.getTYPES().get(0);
+		if(va.getTYPE() != null){ // TODO complain if there are more types.
+			type = va.getTYPE();
 			ElementNode el = vodml.findReferableElement(type);
 			if(el == null )
 			{
-				System.out.printf("No VO-DML element found for VODML/TYPE '%s' on '%s' with rank='%d'\n", type, votElement.getType(),votElement.getRank());
-				System.out.flush();
+				throw new VODMLException(String.format("No VO-DML element found for VODML/TYPE '%s' on '%s' with rank='%d'\n", type, votElement.getType(),votElement.getRank()));
 			}
 			else if(el instanceof TypeNode) // check if GROUP
 				this.typeCast = (TypeNode)el;

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/vodmli/GroupID.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/vodmli/GroupID.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/vodmli/GroupID.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -15,9 +15,9 @@
 	}
 
 	@Override
-	public StringBuilder deepToString(StringBuilder sb) {
-		 super.deepToString(sb);
-		 sb.append("<source>GROUP/@ID</source>");
+	public StringBuilder deepToString(StringBuilder sb, String offset) {
+		 super.deepToString(sb, offset);
+		 sb.append(offset).append("<source>GROUP/@ID</source>");
 		 return sb;
 	}
 	

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/vodmli/ObjectTypeCollection.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/vodmli/ObjectTypeCollection.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/vodmli/ObjectTypeCollection.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -2,13 +2,10 @@
 
 import java.util.ArrayList;
 
-import org.ivoa.dm.ivoa.quantity.AtomicValue;
-import org.ivoa.dm.ivoa.quantity.BooleanValue;
-import org.ivoa.dm.ivoa.quantity.StringValue;
-import org.ivoa.dm.ivoa.quantity.IntegerQuantity;
-import org.ivoa.dm.ivoa.quantity.Quantity;
-import org.ivoa.dm.ivoa.quantity.RealQuantity;
-import org.ivoa.dm.ivoa.quantity.Unit;
+import org.ivoa.dm.ivoa.IntegerQuantity;
+import org.ivoa.dm.ivoa.Quantity;
+import org.ivoa.dm.ivoa.RealQuantity;
+import org.ivoa.dm.ivoa.Unit;
 import org.ivoa.vodml.mapping.vodmli.GroupID;
 import org.ivoa.vodml.mapping.vodmli.ObjectTypeCollection;
 import org.ivoa.vodml.mapping.vodmli.TypeMapper;
@@ -172,22 +169,15 @@
 		DataTypeInstance o = typeMapper.newDataTypeInstance(utype);
 		if(o == null)
 			return null; // TODO throw exception
-		if(o instanceof AtomicValue)
+		if(o instanceof Quantity)
 		{
-			((AtomicValue)o).setUcd(pn.getUCD());
-			if(o instanceof Quantity)
-			{
-				if(pn.getUnit() != null)
-					((Quantity)o).setUnit(new Unit(pn.getUnit()));
-				if(o instanceof RealQuantity)
-					((RealQuantity)o).setValue(Double.parseDouble(pn.getValue()));
-				else if(o instanceof IntegerQuantity)
-					((IntegerQuantity)o).setValue(Integer.parseInt(pn.getValue()));
-			} else if(o instanceof BooleanValue)
-				((BooleanValue)o).setValue(Boolean.valueOf(pn.getValue()));
-			else // if (o instanceof StringValue)
-				((StringValue)o).setValue(pn.getValue());
-		}
+			if(pn.getUnit() != null)
+				((Quantity)o).setUnit(new Unit(pn.getUnit()));
+			if(o instanceof RealQuantity)
+				((RealQuantity)o).setValue(Double.parseDouble(pn.getValue()));
+			else if(o instanceof IntegerQuantity)
+				((IntegerQuantity)o).setValue(Integer.parseInt(pn.getValue()));
+		} 
 		return o;
 	}
 	private DataTypeInstance newDataTypeInstance(FieldNode fn, Tr tr)
@@ -196,22 +186,15 @@
 		DataTypeInstance o = typeMapper.newDataTypeInstance(utype);
 		if(o == null)
 			return null; // TODO throw exception
-		if(o instanceof AtomicValue)
+		if(o instanceof Quantity)
 		{
-			((AtomicValue)o).setUcd(fn.getUCD());
-			if(o instanceof Quantity)
-			{
-				if(fn.getUnit() != null)
-					((Quantity)o).setUnit(new Unit(fn.getUnit()));
-				if(o instanceof RealQuantity)
-					((RealQuantity)o).setValue(Double.parseDouble(getValue(fn, tr)));
-				else if(o instanceof IntegerQuantity)
-					((IntegerQuantity)o).setValue(Integer.parseInt(getValue(fn, tr)));
-			} else if(o instanceof BooleanValue)
-				((BooleanValue)o).setValue(Boolean.valueOf(getValue(fn, tr)));
-			else // if (o instanceof StringValue)
-				((StringValue)o).setValue(getValue(fn, tr));
-		}
+			if(fn.getUnit() != null)
+				((Quantity)o).setUnit(new Unit(fn.getUnit()));
+			if(o instanceof RealQuantity)
+				((RealQuantity)o).setValue(Double.parseDouble(getValue(fn, tr)));
+			else if(o instanceof IntegerQuantity)
+				((IntegerQuantity)o).setValue(Integer.parseInt(getValue(fn, tr)));
+		} 
 		return o;
 	}
 	private StringsIdentifier newID(VOTableElement el, Tr tr)
@@ -364,22 +347,15 @@
 		if(o == null)
 			return null; // TODO throw exception
 		FieldNode fn = frn.getFieldNode();
-		if(o instanceof AtomicValue)
+		if(o instanceof Quantity)
 		{
-			((AtomicValue)o).setUcd(fn.getUCD());
-			if(o instanceof Quantity)
-			{
-				if(fn.getUnit() != null)
-					((Quantity)o).setUnit(new Unit(fn.getUnit()));
-				if(o instanceof RealQuantity)
-					((RealQuantity)o).setValue(Double.parseDouble(getValue(frn, tr)));
-				else if(o instanceof IntegerQuantity)
-					((IntegerQuantity)o).setValue(Integer.parseInt(getValue(frn, tr)));
-			} else if(o instanceof BooleanValue)
-				((BooleanValue)o).setValue(Boolean.valueOf(getValue(frn, tr)));
-			else // if (o instanceof StringValue)
-				((StringValue)o).setValue(getValue(frn, tr));
-		}
+			if(fn.getUnit() != null)
+				((Quantity)o).setUnit(new Unit(fn.getUnit()));
+			if(o instanceof RealQuantity)
+				((RealQuantity)o).setValue(Double.parseDouble(getValue(frn, tr)));
+			else if(o instanceof IntegerQuantity)
+				((IntegerQuantity)o).setValue(Integer.parseInt(getValue(frn, tr)));
+		} 
 		return o;
 	}
 }

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/vodmli/VODMLIManager.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/vodmli/VODMLIManager.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/mapping/vodmli/VODMLIManager.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -174,11 +174,12 @@
 	{
 		StringBuilder sb = new StringBuilder();
 		sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>").append(StructuredObject.NEWLINE);
-		sb.append("<vodmli:instance xmlns:vodmli=\"http://volute.googlecode.com/dm/vo-dml-instance/v0.x\">").append(StructuredObject.NEWLINE);
+		sb.append("<vodmli:instance xmlns:vodmli=\"http://volute.g-vo.rg/dm/vo-dml-instance/v0.x\">").append(StructuredObject.NEWLINE);
+		String offset="  ";
 		for(Model m: vodml)
 		{
 			ModelNode mn = vodml.findModelForUtype(m.getName()).getModelNode();
-			mn.deepToString(sb).append(StructuredObject.NEWLINE);
+			mn.deepToString(sb, offset).append(StructuredObject.NEWLINE);
 		}
 		for(ObjectTypeCollection oc: this)
 		{
@@ -187,7 +188,7 @@
 			for(ObjectTypeInstance ot: oc)
 			{
 				if(ot.getContainer() == null)
-					ot.deepToString(sb);
+					ot.deepToString(sb, offset);
 				else
 					sb.append(String.format("<!-- object with transientId=%d written in collection on container with transientId=%d -->\n"
 							,ot.getTransientID(), ot.getContainer().getTransientID()));

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/DataTypeInstance.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/DataTypeInstance.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/DataTypeInstance.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -2,11 +2,12 @@
 
 public abstract class DataTypeInstance  extends StructuredObject {
 	@Override
-    public final void deepToString(StringBuilder sb)
+    public final void deepToString(StringBuilder sb, String offset)
     {
-    	sb.append(String.format("<dataObject utype=\"%s\">",vodmlRef()));
-    	attributesToString(sb);
-    	referencesToString(sb);
-    	sb.append("</dataObject>");
+			String newoffset=offset+"  ";
+    	sb.append(offset).append(String.format("<dataObject vodmlref=\"%s\">",vodmlRef())).append(NEWLINE);
+    	attributesToString(sb, newoffset);
+    	referencesToString(sb, newoffset);
+    	sb.append(offset).append("</dataObject>").append(NEWLINE);
     }
 }

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/Identifier.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/Identifier.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/Identifier.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -10,6 +10,6 @@
 	 */
 	public String[] fields();
 	
-	public StringBuilder deepToString(StringBuilder sb);
+	public StringBuilder deepToString(StringBuilder sb, String offset);
 
 }

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/ObjectID.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/ObjectID.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/ObjectID.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -24,24 +24,25 @@
 		if(hasTransient)
 			transientID = newID();
 	}
-	public StringBuilder deepToString(StringBuilder sb)
+	public StringBuilder deepToString(StringBuilder sb, String offset)
 	{
-		sb.append("<identifier>").append(StructuredObject.NEWLINE);
+		String newoffset=offset+"  ";
+		sb.append(offset).append("<identifier>").append(StructuredObject.NEWLINE);
 		if(transientID != null) // otherwise not assigned
-			sb.append("<transientID>").append(transientID).append("</transientID>").append(StructuredObject.NEWLINE);
+			sb.append(newoffset).append("<transientID>").append(transientID).append("</transientID>").append(StructuredObject.NEWLINE);
 		if(publisherDID != null)
 		{
-			sb.append("<publisherDID>");
-			publisherDID.deepToString(sb);
+			sb.append(newoffset).append("<publisherDID>");
+			publisherDID.deepToString(sb, newoffset+"  ");
 			sb.append("</publisherDID>").append(StructuredObject.NEWLINE);
 		}
 		if(altID != null)
 		{
-			sb.append("<altID>");
-			altID.deepToString(sb);
-			sb.append("</altID>").append(StructuredObject.NEWLINE);
+			sb.append(newoffset).append("<altID>").append(StructuredObject.NEWLINE);
+			altID.deepToString(sb, newoffset+"  ").append(StructuredObject.NEWLINE);
+			sb.append(newoffset).append("</altID>").append(StructuredObject.NEWLINE);
 		}
-		sb.append("</identifier>").append(StructuredObject.NEWLINE);
+		sb.append(offset).append("</identifier>").append(StructuredObject.NEWLINE);
 		return sb;
 	}
 	public StringsIdentifier getPublisherDID() {

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/ObjectTypeInstance.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/ObjectTypeInstance.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/ObjectTypeInstance.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -4,8 +4,8 @@
 
 public abstract class ObjectTypeInstance extends StructuredObject {
 
-	public static final String CONTAINER_UTYPE = "vo-dml:ObjectTypeInstance.container";
-	public static final String OBJECTTYPE_ID_UTYPE = "vo-dml:ObjectTypeInstance.ID";
+	public static final String CONTAINER_UTYPE = "vodml-map:ObjectTypeInstance.container";
+	public static final String OBJECTTYPE_ID_UTYPE = "vodml-map:ObjectTypeInstance.ID";
 
 	private ObjectTypeInstance _container;
 	private ReferenceObject _ref_container;
@@ -48,25 +48,26 @@
 	}
 
 	@Override
-	public final void deepToString(StringBuilder sb) {
-		sb.append(String.format("<object utype=\"%s\">", vodmlRef())).append(
+	public final void deepToString(StringBuilder sb, String offset) {
+		sb.append(offset).append(String.format("<object vodmlref=\"%s\">", vodmlRef())).append(
 				NEWLINE);
-		attributesToString(sb);
-		referencesToString(sb);
-		containerToString(sb);
-		collectionsToString(sb);
-		sb.append("</object>").append(NEWLINE);
+		String newoffset=offset+"  ";
+		attributesToString(sb, newoffset);
+		referencesToString(sb, newoffset);
+		containerToString(sb, newoffset);
+		collectionsToString(sb, newoffset);
+		sb.append(offset).append("</object>").append(NEWLINE);
 	}
 
-	public void attributesToString(StringBuilder sb) {
-		_ID.deepToString(sb);
+	public void attributesToString(StringBuilder sb, String offset) {
+		_ID.deepToString(sb, offset);
 	}
 
-	public void collectionsToString(StringBuilder sb) {
+	public void collectionsToString(StringBuilder sb, String offset) {
 		return;
 	}
 
-	public void containerToString(StringBuilder sb) {
+	public void containerToString(StringBuilder sb, String offset) {
 		return;
 	}
 
@@ -154,7 +155,7 @@
     @Override
     public String vodmlRef()
     {
-    	return "vo-dml:ObjectType";
+    	return "vodml-map:ObjectType";
     }
     @Override
     public String vodmlId()

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/StringsIdentifier.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/StringsIdentifier.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/StringsIdentifier.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -34,10 +34,10 @@
 		return this.toArray(new String[]{});
 	}
 	
-	public StringBuilder deepToString(StringBuilder sb)
+	public StringBuilder deepToString(StringBuilder sb, String offset)
 	{
 		for(String f: fields())
-			sb.append("<field>").append(f).append("</field>").append(StructuredObject.NEWLINE);
+			sb.append(offset).append("<field>").append(f).append("</field>").append(StructuredObject.NEWLINE);
 		return sb;
 	}
 }

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/StructuredObject.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/StructuredObject.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/model/StructuredObject.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -17,19 +17,19 @@
     public String toString()
     {
     	StringBuilder sb = new StringBuilder();
-    	deepToString(sb);
+    	deepToString(sb,"");
     	return sb.toString();
     }
-    public abstract void deepToString(StringBuilder sb);
-    public void attributesToString(StringBuilder sb){
+    public abstract void deepToString(StringBuilder sb, String offset);
+    public void attributesToString(StringBuilder sb, String offset){
     	return;
     }
-    public void referencesToString(StringBuilder sb){
+    public void referencesToString(StringBuilder sb, String offset){
     	return;
     }
     
-	public void atomicToString(String utype, Object value, StringBuilder sb)
+	public void atomicToString(String utype, Object value, StringBuilder sb, String offset)
 	{
-		sb.append(String.format("<primitiveValue utype=\"%s\">%s</primitiveValue>", utype,value.toString()));
+		sb.append(offset).append(String.format("<primitiveValue vodmlref=\"%s\">%s</primitiveValue>", utype,value.toString()));
 	}
 }

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/stdtypes/Identity.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/stdtypes/Identity.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/stdtypes/Identity.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -16,7 +16,7 @@
 	}
 
 	@Override
-	public void deepToString(StringBuilder sb) {
+	public void deepToString(StringBuilder sb, String offset) {
 		// TODO Auto-generated method stub
 		
 	}

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/xml/VODMLManager.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/xml/VODMLManager.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/xml/VODMLManager.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -36,7 +36,7 @@
 	 */
 	private static final long serialVersionUID = -5963181083012981591L;
 
-//	public static final String VODML_url = "https://volute.googlecode.com/svn/trunk/projects/dm/vo-dml/models/vo-dml/VO-DML.vo-dml.xml";
+//	public static final String VODML_url = "http://volute.g-vo.org/svn/trunk/projects/dm/vo-dml/models/vo-dml/VO-DML.vo-dml.xml";
 
 	private VODMLRegistry vodmlReg;
 	private VODMLParser parser;
@@ -270,9 +270,9 @@
 		}
 		
 			
-		// special checks: container and reference are allowed to use vo-dml:Identifier as type!
+		// special checks: container and reference are allowed to use vodml-map:Identifier as type!
 		// TBD could put this on utypeattr, add the actual declared type of the role, but indicate 
-		// it is indirectly referenced through a vo-dml:Identifier
+		// it is indirectly referenced through a vodml-map:Identifier
     	return false;
 	}
 	

Modified: trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/xml/VODMLUtil.java
==============================================================================
--- trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/xml/VODMLUtil.java	Thu Oct  6 21:32:20 2016	(r3604)
+++ trunk/projects/dm/vo-dml/java/src/org/ivoa/vodml/xml/VODMLUtil.java	Thu Oct  6 21:32:46 2016	(r3605)
@@ -8,27 +8,27 @@
 
 public class VODMLUtil {
 
-	private final static String MODEL = "vo-dml:Model";
-	private final static String MODEL_URL = "vo-dml:Model.url";
-	private final static String MODEL_PREFIX = "vo-dml:Model.name";
-	private final static String OBJECTTYPE = "vo-dml:ObjectTypeInstance";
-	private final static String OBJECT_ID = "vo-dml:ObjectTypeInstance.ID";
-	private final static String IDENTIFIER = "vo-dml:Identifier";
-	private final static String REFERENCE = "vo-dml:Reference";
-	private final static String GROUPref = "vo-dml:GROUPref";
-	private final static String ORMREFERENCE = "vo-dml:ORMReference";
-	private final static String REMOTEREFERENCE = "vo-dml:RemoteReference";
-	private final static String INSTANCE_TYPE = "vo-dml:Instance.type";
-	private final static String TYPE_INSTANCE = "vo-dml:Type.instance";
-	private final static String OBJECTTYPE_INSTANCE = "vo-dml:ObjectType.instance";
-	private final static String DATATYPE_INSTANCE = "vo-dml:DataType.instance";
-	private final static String CONTAINER = "vo-dml:ObjectTypeInstance.container";
-	private final static String COLLECTION_ITEM = "vo-dml:Collection.item";
+	private final static String MODEL = "vodml-map:Model";
+	private final static String MODEL_URL = "vodml-map:Model.url";
+	private final static String MODEL_PREFIX = "vodml-map:Model.name";
+	private final static String OBJECTTYPE = "vodml-map:ObjectTypeInstance";
+	private final static String OBJECT_ID = "vodml-map:ObjectTypeInstance.ID";
+	private final static String IDENTIFIER = "vodml-map:Identifier";
+	private final static String REFERENCE = "vodml-map:Reference";
+	private final static String GROUPref = "vodml-map:GROUPref";
+	private final static String ORMREFERENCE = "vodml-map:ORMReference";
+	private final static String REMOTEREFERENCE = "vodml-map:RemoteReference";
+	private final static String INSTANCE_TYPE = "vodml-map:Instance.type";
+	private final static String TYPE_INSTANCE = "vodml-map:Type.instance";
+	private final static String OBJECTTYPE_INSTANCE = "vodml-map:ObjectType.instance";
+	private final static String DATATYPE_INSTANCE = "vodml-map:DataType.instance";
+	private final static String CONTAINER = "vodml-map:ObjectTypeInstance.container";
+	private final static String COLLECTION_ITEM = "vodml-map:Collection.item";
 
 
 	public static boolean isModel(VODMLAnnotation vodml) {
 		if(vodml == null) return false;
-		String type = (vodml.getTYPES() != null && vodml.getTYPES().size() == 1)?vodml.getTYPES().get(0): null;
+		String type = vodml.getTYPE();
 		return MODEL.equals(type);
 	}
 	public static boolean isModelURL(VODMLAnnotation vodml) {


More information about the Volutecommits mailing list