diff --git a/src/main/java/net/ivoa/xml/vospace/v2/CapabilityList.java b/src/main/java/net/ivoa/xml/vospace/v2/CapabilityList.java deleted file mode 100644 index 7adb3ebe4caf41a0ce1b458630257088cfa253fd..0000000000000000000000000000000000000000 --- a/src/main/java/net/ivoa/xml/vospace/v2/CapabilityList.java +++ /dev/null @@ -1,80 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 -// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2020.10.24 at 09:39:16 AM CEST -// - - -package net.ivoa.xml.vospace.v2; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * - * A container element for a list of capabilities. - * - * - * <p>Java class for CapabilityList complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="CapabilityList"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="capability" type="{http://www.ivoa.net/xml/VOSpace/v2.0}Capability" maxOccurs="unbounded" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CapabilityList", propOrder = { - "capability" -}) -public class CapabilityList { - - @XmlElement(nillable = true) - protected List<Capability> capability; - - /** - * Gets the value of the capability property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the capability property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getCapability().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link Capability } - * - * - */ - public List<Capability> getCapability() { - if (capability == null) { - capability = new ArrayList<Capability>(); - } - return this.capability; - } - -} diff --git a/src/main/java/net/ivoa/xml/vospace/v2/DataNode.java b/src/main/java/net/ivoa/xml/vospace/v2/DataNode.java index 8e0a7fcd695d3c4a1c448e67424a97d9f89a7dc6..224a5b28d4ca15f8907603d775692914870f75ee 100644 --- a/src/main/java/net/ivoa/xml/vospace/v2/DataNode.java +++ b/src/main/java/net/ivoa/xml/vospace/v2/DataNode.java @@ -8,9 +8,13 @@ package net.ivoa.xml.vospace.v2; +import java.util.ArrayList; +import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; @@ -60,83 +64,58 @@ public class DataNode extends Node { - protected ViewList accepts; - protected ViewList provides; - protected CapabilityList capabilities; + // <edit>: ViewList replaced with List<View> + @XmlElement(name = "view") + @XmlElementWrapper(name = "accepts") + protected List<View> accepts; + + @XmlElement(name = "view") + @XmlElementWrapper(name = "provides") + protected List<View> provides; + + // CapabilityList replaced with List<Capability> + @XmlElement(name = "capability") + @XmlElementWrapper(name = "capabilities") + protected List<Capability> capabilities; + // </edit> + @XmlAttribute(name = "busy") protected Boolean busy; - /** - * Gets the value of the accepts property. - * - * @return - * possible object is - * {@link ViewList } - * - */ - public ViewList getAccepts() { + // <edit> + public List<View> getAccepts() { + if (accepts == null) { + accepts = new ArrayList<>(); + } return accepts; } - - /** - * Sets the value of the accepts property. - * - * @param value - * allowed object is - * {@link ViewList } - * - */ - public void setAccepts(ViewList value) { + + public void setAccepts(List<View> value) { this.accepts = value; } - /** - * Gets the value of the provides property. - * - * @return - * possible object is - * {@link ViewList } - * - */ - public ViewList getProvides() { + public List<View> getProvides() { + if (provides == null) { + provides = new ArrayList<>(); + } return provides; } - /** - * Sets the value of the provides property. - * - * @param value - * allowed object is - * {@link ViewList } - * - */ - public void setProvides(ViewList value) { + public void setProvides(List<View> value) { this.provides = value; } - - /** - * Gets the value of the capabilities property. - * - * @return - * possible object is - * {@link CapabilityList } - * - */ - public CapabilityList getCapabilities() { + + public List<Capability> getCapabilities() { + if (capabilities == null) { + capabilities = new ArrayList<>(); + } return capabilities; } - /** - * Sets the value of the capabilities property. - * - * @param value - * allowed object is - * {@link CapabilityList } - * - */ - public void setCapabilities(CapabilityList value) { + public void setCapabilities(List<Capability> value) { this.capabilities = value; } + // </edit> /** * Gets the value of the busy property. diff --git a/src/main/java/net/ivoa/xml/vospace/v2/GetPropertiesResponse.java b/src/main/java/net/ivoa/xml/vospace/v2/GetPropertiesResponse.java index 723282b5f2355360e8d67e205585a752145bbc78..c67a81af606de4562033a161813f24a8de6db14d 100644 --- a/src/main/java/net/ivoa/xml/vospace/v2/GetPropertiesResponse.java +++ b/src/main/java/net/ivoa/xml/vospace/v2/GetPropertiesResponse.java @@ -8,9 +8,12 @@ package net.ivoa.xml.vospace.v2; +import java.util.ArrayList; +import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlType; @@ -43,83 +46,50 @@ import javax.xml.bind.annotation.XmlType; }) public class GetPropertiesResponse { - @XmlElement(required = true) - protected PropertyReferenceList accepts; - @XmlElement(required = true) - protected PropertyReferenceList provides; - @XmlElement(required = true) - protected PropertyReferenceList contains; + // <edit>: PropertyReferenceList replaced with List<PropertyReference> + @XmlElement(name = "property") + @XmlElementWrapper(name = "accepts", required = true) + protected List<PropertyReference> accepts; + + @XmlElement(name = "property") + @XmlElementWrapper(name = "provides", required = true) + protected List<PropertyReference> provides; - /** - * Gets the value of the accepts property. - * - * @return - * possible object is - * {@link PropertyReferenceList } - * - */ - public PropertyReferenceList getAccepts() { + @XmlElement(name = "property") + @XmlElementWrapper(name = "contains", required = true) + protected List<PropertyReference> contains; + + public List<PropertyReference> getAccepts() { + if (accepts == null) { + accepts = new ArrayList<>(); + } return accepts; } - /** - * Sets the value of the accepts property. - * - * @param value - * allowed object is - * {@link PropertyReferenceList } - * - */ - public void setAccepts(PropertyReferenceList value) { + public void setAccepts(List<PropertyReference> value) { this.accepts = value; } - /** - * Gets the value of the provides property. - * - * @return - * possible object is - * {@link PropertyReferenceList } - * - */ - public PropertyReferenceList getProvides() { + public List<PropertyReference> getProvides() { + if (provides == null) { + provides = new ArrayList<>(); + } return provides; } - /** - * Sets the value of the provides property. - * - * @param value - * allowed object is - * {@link PropertyReferenceList } - * - */ - public void setProvides(PropertyReferenceList value) { + public void setProvides(List<PropertyReference> value) { this.provides = value; } - /** - * Gets the value of the contains property. - * - * @return - * possible object is - * {@link PropertyReferenceList } - * - */ - public PropertyReferenceList getContains() { + public List<PropertyReference> getContains() { + if (contains == null) { + contains = new ArrayList<>(); + } return contains; } - /** - * Sets the value of the contains property. - * - * @param value - * allowed object is - * {@link PropertyReferenceList } - * - */ - public void setContains(PropertyReferenceList value) { + public void setContains(List<PropertyReference> value) { this.contains = value; } - + // </edit> } diff --git a/src/main/java/net/ivoa/xml/vospace/v2/GetProtocolsResponse.java b/src/main/java/net/ivoa/xml/vospace/v2/GetProtocolsResponse.java index 1c67820897d1aae2a9b0aba879fef2927d67e88e..09fc6be4b3b7eabe2da040ac4c9142c5fe0ed3dd 100644 --- a/src/main/java/net/ivoa/xml/vospace/v2/GetProtocolsResponse.java +++ b/src/main/java/net/ivoa/xml/vospace/v2/GetProtocolsResponse.java @@ -8,9 +8,11 @@ package net.ivoa.xml.vospace.v2; +import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlType; @@ -41,57 +43,29 @@ import javax.xml.bind.annotation.XmlType; }) public class GetProtocolsResponse { - @XmlElement(required = true) - protected ProtocolList accepts; - @XmlElement(required = true) - protected ProtocolList provides; + // <edit>: ProtocolList replaced with List<Protocol> + @XmlElement(name = "protocol") + @XmlElementWrapper(name = "accepts", required = true) + protected List<Protocol> accepts; + + @XmlElement(name = "protocol") + @XmlElementWrapper(name = "provides", required = true) + protected List<Protocol> provides; - /** - * Gets the value of the accepts property. - * - * @return - * possible object is - * {@link ProtocolList } - * - */ - public ProtocolList getAccepts() { + public List<Protocol> getAccepts() { return accepts; } - /** - * Sets the value of the accepts property. - * - * @param value - * allowed object is - * {@link ProtocolList } - * - */ - public void setAccepts(ProtocolList value) { + public void setAccepts(List<Protocol> value) { this.accepts = value; } - /** - * Gets the value of the provides property. - * - * @return - * possible object is - * {@link ProtocolList } - * - */ - public ProtocolList getProvides() { + public List<Protocol> getProvides() { return provides; } - /** - * Sets the value of the provides property. - * - * @param value - * allowed object is - * {@link ProtocolList } - * - */ - public void setProvides(ProtocolList value) { + public void setProvides(List<Protocol> value) { this.provides = value; } - + // </edit> } diff --git a/src/main/java/net/ivoa/xml/vospace/v2/GetViewsResponse.java b/src/main/java/net/ivoa/xml/vospace/v2/GetViewsResponse.java index 738a63b6149454cd18b366ed29da6112d81d4fdc..e32e0c927b0844751374719dcd1e50455bfa5680 100644 --- a/src/main/java/net/ivoa/xml/vospace/v2/GetViewsResponse.java +++ b/src/main/java/net/ivoa/xml/vospace/v2/GetViewsResponse.java @@ -8,9 +8,12 @@ package net.ivoa.xml.vospace.v2; +import java.util.ArrayList; +import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlType; @@ -41,57 +44,35 @@ import javax.xml.bind.annotation.XmlType; }) public class GetViewsResponse { - @XmlElement(required = true) - protected ViewList accepts; - @XmlElement(required = true) - protected ViewList provides; + // <edit>: ViewList replaced with List<View> + @XmlElement(name = "view") + @XmlElementWrapper(name = "accepts", required = true) + protected List<View> accepts; - /** - * Gets the value of the accepts property. - * - * @return - * possible object is - * {@link ViewList } - * - */ - public ViewList getAccepts() { + @XmlElement(name = "view") + @XmlElementWrapper(name = "provides", required = true) + protected List<View> provides; + + public List<View> getAccepts() { + if (accepts == null) { + accepts = new ArrayList<>(); + } return accepts; } - /** - * Sets the value of the accepts property. - * - * @param value - * allowed object is - * {@link ViewList } - * - */ - public void setAccepts(ViewList value) { + public void setAccepts(List<View> value) { this.accepts = value; } - /** - * Gets the value of the provides property. - * - * @return - * possible object is - * {@link ViewList } - * - */ - public ViewList getProvides() { + public List<View> getProvides() { return provides; } - /** - * Sets the value of the provides property. - * - * @param value - * allowed object is - * {@link ViewList } - * - */ - public void setProvides(ViewList value) { + public void setProvides(List<View> value) { + if (provides == null) { + provides = new ArrayList<>(); + } this.provides = value; } - + // </edit> } diff --git a/src/main/java/net/ivoa/xml/vospace/v2/Node.java b/src/main/java/net/ivoa/xml/vospace/v2/Node.java index 9017944d9170618665e997993d522b8ac19b2e96..b2809c9a0edc6e3e58775942c96d681845d300f1 100644 --- a/src/main/java/net/ivoa/xml/vospace/v2/Node.java +++ b/src/main/java/net/ivoa/xml/vospace/v2/Node.java @@ -10,9 +10,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver; import it.inaf.oats.vospace.datamodel.NodeTypeJsonResolver; +import java.util.ArrayList; +import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlElementWrapper; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlTransient; @@ -56,9 +60,10 @@ import javax.xml.bind.annotation.XmlType; // </edit> public class Node { - protected PropertyList properties; - // <edit> + // Auto-generated class defined a PropertyList wrapper class. + protected List<Property> properties; + // Used for generating missing type attribute for root node. For child nodes it is filled automatically. @XmlAttribute(name = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance", required = false) private String type; @@ -84,25 +89,20 @@ public class Node { @XmlSchemaType(name = "anyURI") protected String uri; - /** - * Gets the value of the properties property. - * - * @return possible object is {@link PropertyList } - * - */ - public PropertyList getProperties() { + // <edit> + @XmlElement(name = "property") + @XmlElementWrapper(name = "properties", required = false) + public List<Property> getProperties() { + if (properties == null) { + properties = new ArrayList<>(); + } return properties; } - /** - * Sets the value of the properties property. - * - * @param value allowed object is {@link PropertyList } - * - */ - public void setProperties(PropertyList value) { + public void setProperties(List<Property> value) { this.properties = value; } + // </edit> /** * Gets the value of the uri property. diff --git a/src/main/java/net/ivoa/xml/vospace/v2/NodeList.java b/src/main/java/net/ivoa/xml/vospace/v2/NodeList.java deleted file mode 100644 index 2edd5158ca7650307fe80343e01505dd01454a82..0000000000000000000000000000000000000000 --- a/src/main/java/net/ivoa/xml/vospace/v2/NodeList.java +++ /dev/null @@ -1,142 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 -// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2020.10.24 at 09:39:16 AM CEST -// - - -package net.ivoa.xml.vospace.v2; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; - - -/** - * - * A container element for search responses. - * - * - * <p>Java class for NodeList complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="NodeList"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="nodes" minOccurs="0"> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="node" type="{http://www.ivoa.net/xml/VOSpace/v2.0}Node" maxOccurs="unbounded" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </element> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "NodeList", propOrder = { - "nodes" -}) -public class NodeList { - - protected NodeList.Nodes nodes; - - /** - * Gets the value of the nodes property. - * - * @return - * possible object is - * {@link NodeList.Nodes } - * - */ - public NodeList.Nodes getNodes() { - return nodes; - } - - /** - * Sets the value of the nodes property. - * - * @param value - * allowed object is - * {@link NodeList.Nodes } - * - */ - public void setNodes(NodeList.Nodes value) { - this.nodes = value; - } - - - /** - * <p>Java class for anonymous complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="node" type="{http://www.ivoa.net/xml/VOSpace/v2.0}Node" maxOccurs="unbounded" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { - "node" - }) - public static class Nodes { - - protected List<Node> node; - - /** - * Gets the value of the node property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the node property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getNode().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link Node } - * - * - */ - public List<Node> getNode() { - if (node == null) { - node = new ArrayList<Node>(); - } - return this.node; - } - - } - -} diff --git a/src/main/java/net/ivoa/xml/vospace/v2/PropertyList.java b/src/main/java/net/ivoa/xml/vospace/v2/PropertyList.java deleted file mode 100644 index a1113a71965e1b3ada9e964098567899bfb050ac..0000000000000000000000000000000000000000 --- a/src/main/java/net/ivoa/xml/vospace/v2/PropertyList.java +++ /dev/null @@ -1,80 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 -// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2020.10.24 at 09:39:16 AM CEST -// - - -package net.ivoa.xml.vospace.v2; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * - * A container element for a list of properties. - * - * - * <p>Java class for PropertyList complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="PropertyList"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="property" type="{http://www.ivoa.net/xml/VOSpace/v2.0}Property" maxOccurs="unbounded" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "PropertyList", propOrder = { - "property" -}) -public class PropertyList { - - @XmlElement(nillable = true) - protected List<Property> property; - - /** - * Gets the value of the property property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the property property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getProperty().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link Property } - * - * - */ - public List<Property> getProperty() { - if (property == null) { - property = new ArrayList<Property>(); - } - return this.property; - } - -} diff --git a/src/main/java/net/ivoa/xml/vospace/v2/PropertyReferenceList.java b/src/main/java/net/ivoa/xml/vospace/v2/PropertyReferenceList.java deleted file mode 100644 index 3e1664a7c1cb3487b77c8c3a9ea289d30583187f..0000000000000000000000000000000000000000 --- a/src/main/java/net/ivoa/xml/vospace/v2/PropertyReferenceList.java +++ /dev/null @@ -1,80 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 -// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2020.10.24 at 09:39:16 AM CEST -// - - -package net.ivoa.xml.vospace.v2; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * - * A container element for a list of property references. - * - * - * <p>Java class for PropertyReferenceList complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="PropertyReferenceList"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="property" type="{http://www.ivoa.net/xml/VOSpace/v2.0}PropertyReference" maxOccurs="unbounded" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "PropertyReferenceList", propOrder = { - "property" -}) -public class PropertyReferenceList { - - @XmlElement(nillable = true) - protected List<PropertyReference> property; - - /** - * Gets the value of the property property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the property property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getProperty().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link PropertyReference } - * - * - */ - public List<PropertyReference> getProperty() { - if (property == null) { - property = new ArrayList<PropertyReference>(); - } - return this.property; - } - -} diff --git a/src/main/java/net/ivoa/xml/vospace/v2/ProtocolList.java b/src/main/java/net/ivoa/xml/vospace/v2/ProtocolList.java deleted file mode 100644 index 0f1b179ad9f995c4a551f8b2f23683f91076a444..0000000000000000000000000000000000000000 --- a/src/main/java/net/ivoa/xml/vospace/v2/ProtocolList.java +++ /dev/null @@ -1,80 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 -// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2020.10.24 at 09:39:16 AM CEST -// - - -package net.ivoa.xml.vospace.v2; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * - * A container element for a list of protocols. - * - * - * <p>Java class for ProtocolList complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="ProtocolList"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="protocol" type="{http://www.ivoa.net/xml/VOSpace/v2.0}Protocol" maxOccurs="unbounded" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ProtocolList", propOrder = { - "protocol" -}) -public class ProtocolList { - - @XmlElement(nillable = true) - protected List<Protocol> protocol; - - /** - * Gets the value of the protocol property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the protocol property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getProtocol().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link Protocol } - * - * - */ - public List<Protocol> getProtocol() { - if (protocol == null) { - protocol = new ArrayList<Protocol>(); - } - return this.protocol; - } - -} diff --git a/src/main/java/net/ivoa/xml/vospace/v2/ViewList.java b/src/main/java/net/ivoa/xml/vospace/v2/ViewList.java deleted file mode 100644 index a5388cfa36df912f4d3b56e74103d9f2cfdb03b2..0000000000000000000000000000000000000000 --- a/src/main/java/net/ivoa/xml/vospace/v2/ViewList.java +++ /dev/null @@ -1,80 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 -// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2020.10.24 at 09:39:16 AM CEST -// - - -package net.ivoa.xml.vospace.v2; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - * - * A container element for a list of views. - * - * - * <p>Java class for ViewList complex type. - * - * <p>The following schema fragment specifies the expected content contained within this class. - * - * <pre> - * <complexType name="ViewList"> - * <complexContent> - * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> - * <sequence> - * <element name="view" type="{http://www.ivoa.net/xml/VOSpace/v2.0}View" maxOccurs="unbounded" minOccurs="0"/> - * </sequence> - * </restriction> - * </complexContent> - * </complexType> - * </pre> - * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ViewList", propOrder = { - "view" -}) -public class ViewList { - - @XmlElement(nillable = true) - protected List<View> view; - - /** - * Gets the value of the view property. - * - * <p> - * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a <CODE>set</CODE> method for the view property. - * - * <p> - * For example, to add a new item, do as follows: - * <pre> - * getView().add(newItem); - * </pre> - * - * - * <p> - * Objects of the following type(s) are allowed in the list - * {@link View } - * - * - */ - public List<View> getView() { - if (view == null) { - view = new ArrayList<View>(); - } - return this.view; - } - -} diff --git a/src/test/java/net/ivoa/xml/vospace/v2/NodeTest.java b/src/test/java/net/ivoa/xml/vospace/v2/NodeTest.java index 361203673c591c65356867563243260d5958e57e..e6e3120133d583ae4833703e748de7a12e58f886 100644 --- a/src/test/java/net/ivoa/xml/vospace/v2/NodeTest.java +++ b/src/test/java/net/ivoa/xml/vospace/v2/NodeTest.java @@ -106,10 +106,7 @@ public class NodeTest { properties.add(createProperty("ivo://ivoa.net/vospace/core#groupwrite", groupWrite)); properties.add(createProperty("ivo://ivoa.net/vospace/core#length", String.valueOf(size))); - PropertyList propertyList = new PropertyList(); - propertyList.getProperty().addAll(properties); - - node.setProperties(propertyList); + node.setProperties(properties); } private Property createProperty(String uri, String value) { @@ -133,7 +130,7 @@ public class NodeTest { } private String getProperty(Node node, String uri) { - for (Property property : node.getProperties().getProperty()) { + for (Property property : node.getProperties()) { if (uri.equals(property.getUri())) { return property.getValue(); }