Skip to content
Snippets Groups Projects
Commit 71e8d1d3 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Simplified JAXB classes structure (removed wrapper list classes)

parent 5c1a2fc1
No related branches found
No related tags found
No related merge requests found
Pipeline #731 failed
Showing
with 124 additions and 765 deletions
//
// 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>
* &lt;complexType name="CapabilityList">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="capability" type="{http://www.ivoa.net/xml/VOSpace/v2.0}Capability" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/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;
}
}
...@@ -8,9 +8,13 @@ ...@@ -8,9 +8,13 @@
package net.ivoa.xml.vospace.v2; 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.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute; 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.XmlRootElement;
import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
...@@ -60,83 +64,58 @@ public class DataNode ...@@ -60,83 +64,58 @@ public class DataNode
extends Node extends Node
{ {
protected ViewList accepts; // <edit>: ViewList replaced with List<View>
protected ViewList provides; @XmlElement(name = "view")
protected CapabilityList capabilities; @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") @XmlAttribute(name = "busy")
protected Boolean busy; protected Boolean busy;
/** // <edit>
* Gets the value of the accepts property. public List<View> getAccepts() {
* if (accepts == null) {
* @return accepts = new ArrayList<>();
* possible object is }
* {@link ViewList }
*
*/
public ViewList getAccepts() {
return accepts; return accepts;
} }
/** public void setAccepts(List<View> value) {
* Sets the value of the accepts property.
*
* @param value
* allowed object is
* {@link ViewList }
*
*/
public void setAccepts(ViewList value) {
this.accepts = value; this.accepts = value;
} }
/** public List<View> getProvides() {
* Gets the value of the provides property. if (provides == null) {
* provides = new ArrayList<>();
* @return }
* possible object is
* {@link ViewList }
*
*/
public ViewList getProvides() {
return provides; return provides;
} }
/** public void setProvides(List<View> value) {
* Sets the value of the provides property.
*
* @param value
* allowed object is
* {@link ViewList }
*
*/
public void setProvides(ViewList value) {
this.provides = value; this.provides = value;
} }
/** public List<Capability> getCapabilities() {
* Gets the value of the capabilities property. if (capabilities == null) {
* capabilities = new ArrayList<>();
* @return }
* possible object is
* {@link CapabilityList }
*
*/
public CapabilityList getCapabilities() {
return capabilities; return capabilities;
} }
/** public void setCapabilities(List<Capability> value) {
* Sets the value of the capabilities property.
*
* @param value
* allowed object is
* {@link CapabilityList }
*
*/
public void setCapabilities(CapabilityList value) {
this.capabilities = value; this.capabilities = value;
} }
// </edit>
/** /**
* Gets the value of the busy property. * Gets the value of the busy property.
......
...@@ -8,9 +8,12 @@ ...@@ -8,9 +8,12 @@
package net.ivoa.xml.vospace.v2; 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.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
...@@ -43,83 +46,50 @@ import javax.xml.bind.annotation.XmlType; ...@@ -43,83 +46,50 @@ import javax.xml.bind.annotation.XmlType;
}) })
public class GetPropertiesResponse { public class GetPropertiesResponse {
@XmlElement(required = true) // <edit>: PropertyReferenceList replaced with List<PropertyReference>
protected PropertyReferenceList accepts; @XmlElement(name = "property")
@XmlElement(required = true) @XmlElementWrapper(name = "accepts", required = true)
protected PropertyReferenceList provides; protected List<PropertyReference> accepts;
@XmlElement(required = true)
protected PropertyReferenceList contains;
/** @XmlElement(name = "property")
* Gets the value of the accepts property. @XmlElementWrapper(name = "provides", required = true)
* protected List<PropertyReference> provides;
* @return
* possible object is @XmlElement(name = "property")
* {@link PropertyReferenceList } @XmlElementWrapper(name = "contains", required = true)
* protected List<PropertyReference> contains;
*/
public PropertyReferenceList getAccepts() { public List<PropertyReference> getAccepts() {
if (accepts == null) {
accepts = new ArrayList<>();
}
return accepts; return accepts;
} }
/** public void setAccepts(List<PropertyReference> value) {
* Sets the value of the accepts property.
*
* @param value
* allowed object is
* {@link PropertyReferenceList }
*
*/
public void setAccepts(PropertyReferenceList value) {
this.accepts = value; this.accepts = value;
} }
/** public List<PropertyReference> getProvides() {
* Gets the value of the provides property. if (provides == null) {
* provides = new ArrayList<>();
* @return }
* possible object is
* {@link PropertyReferenceList }
*
*/
public PropertyReferenceList getProvides() {
return provides; return provides;
} }
/** public void setProvides(List<PropertyReference> value) {
* Sets the value of the provides property.
*
* @param value
* allowed object is
* {@link PropertyReferenceList }
*
*/
public void setProvides(PropertyReferenceList value) {
this.provides = value; this.provides = value;
} }
/** public List<PropertyReference> getContains() {
* Gets the value of the contains property. if (contains == null) {
* contains = new ArrayList<>();
* @return }
* possible object is
* {@link PropertyReferenceList }
*
*/
public PropertyReferenceList getContains() {
return contains; return contains;
} }
/** public void setContains(List<PropertyReference> value) {
* Sets the value of the contains property.
*
* @param value
* allowed object is
* {@link PropertyReferenceList }
*
*/
public void setContains(PropertyReferenceList value) {
this.contains = value; this.contains = value;
} }
// </edit>
} }
...@@ -8,9 +8,11 @@ ...@@ -8,9 +8,11 @@
package net.ivoa.xml.vospace.v2; package net.ivoa.xml.vospace.v2;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
...@@ -41,57 +43,29 @@ import javax.xml.bind.annotation.XmlType; ...@@ -41,57 +43,29 @@ import javax.xml.bind.annotation.XmlType;
}) })
public class GetProtocolsResponse { public class GetProtocolsResponse {
@XmlElement(required = true) // <edit>: ProtocolList replaced with List<Protocol>
protected ProtocolList accepts; @XmlElement(name = "protocol")
@XmlElement(required = true) @XmlElementWrapper(name = "accepts", required = true)
protected ProtocolList provides; protected List<Protocol> accepts;
/** @XmlElement(name = "protocol")
* Gets the value of the accepts property. @XmlElementWrapper(name = "provides", required = true)
* protected List<Protocol> provides;
* @return
* possible object is public List<Protocol> getAccepts() {
* {@link ProtocolList }
*
*/
public ProtocolList getAccepts() {
return accepts; return accepts;
} }
/** public void setAccepts(List<Protocol> value) {
* Sets the value of the accepts property.
*
* @param value
* allowed object is
* {@link ProtocolList }
*
*/
public void setAccepts(ProtocolList value) {
this.accepts = value; this.accepts = value;
} }
/** public List<Protocol> getProvides() {
* Gets the value of the provides property.
*
* @return
* possible object is
* {@link ProtocolList }
*
*/
public ProtocolList getProvides() {
return provides; return provides;
} }
/** public void setProvides(List<Protocol> value) {
* Sets the value of the provides property.
*
* @param value
* allowed object is
* {@link ProtocolList }
*
*/
public void setProvides(ProtocolList value) {
this.provides = value; this.provides = value;
} }
// </edit>
} }
...@@ -8,9 +8,12 @@ ...@@ -8,9 +8,12 @@
package net.ivoa.xml.vospace.v2; 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.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
...@@ -41,57 +44,35 @@ import javax.xml.bind.annotation.XmlType; ...@@ -41,57 +44,35 @@ import javax.xml.bind.annotation.XmlType;
}) })
public class GetViewsResponse { public class GetViewsResponse {
@XmlElement(required = true) // <edit>: ViewList replaced with List<View>
protected ViewList accepts; @XmlElement(name = "view")
@XmlElement(required = true) @XmlElementWrapper(name = "accepts", required = true)
protected ViewList provides; protected List<View> accepts;
/** @XmlElement(name = "view")
* Gets the value of the accepts property. @XmlElementWrapper(name = "provides", required = true)
* protected List<View> provides;
* @return
* possible object is public List<View> getAccepts() {
* {@link ViewList } if (accepts == null) {
* accepts = new ArrayList<>();
*/ }
public ViewList getAccepts() {
return accepts; return accepts;
} }
/** public void setAccepts(List<View> value) {
* Sets the value of the accepts property.
*
* @param value
* allowed object is
* {@link ViewList }
*
*/
public void setAccepts(ViewList value) {
this.accepts = value; this.accepts = value;
} }
/** public List<View> getProvides() {
* Gets the value of the provides property.
*
* @return
* possible object is
* {@link ViewList }
*
*/
public ViewList getProvides() {
return provides; return provides;
} }
/** public void setProvides(List<View> value) {
* Sets the value of the provides property. if (provides == null) {
* provides = new ArrayList<>();
* @param value }
* allowed object is
* {@link ViewList }
*
*/
public void setProvides(ViewList value) {
this.provides = value; this.provides = value;
} }
// </edit>
} }
...@@ -10,9 +10,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; ...@@ -10,9 +10,13 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver; import com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver;
import it.inaf.oats.vospace.datamodel.NodeTypeJsonResolver; 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.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute; 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.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlTransient; import javax.xml.bind.annotation.XmlTransient;
...@@ -56,9 +60,10 @@ import javax.xml.bind.annotation.XmlType; ...@@ -56,9 +60,10 @@ import javax.xml.bind.annotation.XmlType;
// </edit> // </edit>
public class Node { public class Node {
protected PropertyList properties;
// <edit> // <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. // 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) @XmlAttribute(name = "type", namespace = "http://www.w3.org/2001/XMLSchema-instance", required = false)
private String type; private String type;
...@@ -84,25 +89,20 @@ public class Node { ...@@ -84,25 +89,20 @@ public class Node {
@XmlSchemaType(name = "anyURI") @XmlSchemaType(name = "anyURI")
protected String uri; protected String uri;
/** // <edit>
* Gets the value of the properties property. @XmlElement(name = "property")
* @XmlElementWrapper(name = "properties", required = false)
* @return possible object is {@link PropertyList } public List<Property> getProperties() {
* if (properties == null) {
*/ properties = new ArrayList<>();
public PropertyList getProperties() { }
return properties; return properties;
} }
/** public void setProperties(List<Property> value) {
* Sets the value of the properties property.
*
* @param value allowed object is {@link PropertyList }
*
*/
public void setProperties(PropertyList value) {
this.properties = value; this.properties = value;
} }
// </edit>
/** /**
* Gets the value of the uri property. * Gets the value of the uri property.
......
//
// 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>
* &lt;complexType name="NodeList">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="nodes" minOccurs="0">
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="node" type="{http://www.ivoa.net/xml/VOSpace/v2.0}Node" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* &lt;/element>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/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>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="node" type="{http://www.ivoa.net/xml/VOSpace/v2.0}Node" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/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;
}
}
}
//
// 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>
* &lt;complexType name="PropertyList">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="property" type="{http://www.ivoa.net/xml/VOSpace/v2.0}Property" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/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;
}
}
//
// 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>
* &lt;complexType name="PropertyReferenceList">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="property" type="{http://www.ivoa.net/xml/VOSpace/v2.0}PropertyReference" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/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;
}
}
//
// 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>
* &lt;complexType name="ProtocolList">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="protocol" type="{http://www.ivoa.net/xml/VOSpace/v2.0}Protocol" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/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;
}
}
//
// 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>
* &lt;complexType name="ViewList">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="view" type="{http://www.ivoa.net/xml/VOSpace/v2.0}View" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/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;
}
}
...@@ -106,10 +106,7 @@ public class NodeTest { ...@@ -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#groupwrite", groupWrite));
properties.add(createProperty("ivo://ivoa.net/vospace/core#length", String.valueOf(size))); properties.add(createProperty("ivo://ivoa.net/vospace/core#length", String.valueOf(size)));
PropertyList propertyList = new PropertyList(); node.setProperties(properties);
propertyList.getProperty().addAll(properties);
node.setProperties(propertyList);
} }
private Property createProperty(String uri, String value) { private Property createProperty(String uri, String value) {
...@@ -133,7 +130,7 @@ public class NodeTest { ...@@ -133,7 +130,7 @@ public class NodeTest {
} }
private String getProperty(Node node, String uri) { private String getProperty(Node node, String uri) {
for (Property property : node.getProperties().getProperty()) { for (Property property : node.getProperties()) {
if (uri.equals(property.getUri())) { if (uri.equals(property.getUri())) {
return property.getValue(); return property.getValue();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment