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