Loading src/main/java/it/inaf/oats/vospace/datamodel/NodeUtils.java +6 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; import net.ivoa.xml.vospace.v2.ContainerNode; import net.ivoa.xml.vospace.v2.DataNode; import net.ivoa.xml.vospace.v2.LinkNode; import net.ivoa.xml.vospace.v2.StructuredDataNode; public class NodeUtils { Loading Loading @@ -190,6 +191,8 @@ public class NodeUtils { return "container"; } else if (node instanceof DataNode) { return "data"; } else if (node instanceof LinkNode) { return "link"; } throw new UnsupportedOperationException("Unable to retrieve database node type for class " + node.getClass().getCanonicalName()); } Loading Loading @@ -228,6 +231,9 @@ public class NodeUtils { case "structured": node = new StructuredDataNode(); break; case "link": node = new LinkNode(); break; default: throw new UnsupportedOperationException("Node type " + type + " not supported yet"); } Loading Loading
src/main/java/it/inaf/oats/vospace/datamodel/NodeUtils.java +6 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; import net.ivoa.xml.vospace.v2.ContainerNode; import net.ivoa.xml.vospace.v2.DataNode; import net.ivoa.xml.vospace.v2.LinkNode; import net.ivoa.xml.vospace.v2.StructuredDataNode; public class NodeUtils { Loading Loading @@ -190,6 +191,8 @@ public class NodeUtils { return "container"; } else if (node instanceof DataNode) { return "data"; } else if (node instanceof LinkNode) { return "link"; } throw new UnsupportedOperationException("Unable to retrieve database node type for class " + node.getClass().getCanonicalName()); } Loading Loading @@ -228,6 +231,9 @@ public class NodeUtils { case "structured": node = new StructuredDataNode(); break; case "link": node = new LinkNode(); break; default: throw new UnsupportedOperationException("Node type " + type + " not supported yet"); } Loading