// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 // 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: 2013.08.01 at 10:33:36 AM MST // package edu.asu.spring.quadriga.domain.impl.networks; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlElementRefs; import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; /** * <p>Java class for RelationType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType name="RelationType"> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <choice maxOccurs="unbounded"> * <element name="id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="creator" type="{http://www.w3.org/2001/XMLSchema}anyURI"/> * <element name="creation_date" type="{http://www.w3.org/2001/XMLSchema}dateTime"/> * <element name="creation_place" type="{http://www.w3.org/2001/XMLSchema}anyURI"/> * <element name="source_reference" type="{http://www.w3.org/2001/XMLSchema}anyURI"/> * <element name="subject" type="{http://digitalhps.org/creationEvents-model}subjectObjectType"/> * <element name="predicate" type="{http://digitalhps.org/creationEvents-model}predicateType"/> * <element name="object" type="{http://digitalhps.org/creationEvents-model}subjectObjectType"/> * <element name="external_refId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * <element name="internal_refId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> * </choice> * </restriction> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "RelationType") public class RelationType { @XmlElementRefs({ @XmlElementRef(name = "creator", namespace = "http://digitalhps.org/creationEvents-model", type = JAXBElement.class), @XmlElementRef(name = "creation_place", namespace = "http://digitalhps.org/creationEvents-model", type = JAXBElement.class), @XmlElementRef(name = "creation_date", namespace = "http://digitalhps.org/creationEvents-model", type = JAXBElement.class), @XmlElementRef(name = "external_refId", namespace = "http://digitalhps.org/creationEvents-model", type = JAXBElement.class), @XmlElementRef(name = "subject", namespace = "http://digitalhps.org/creationEvents-model", type = JAXBElement.class), @XmlElementRef(name = "object", namespace = "http://digitalhps.org/creationEvents-model", type = JAXBElement.class), @XmlElementRef(name = "internal_refId", namespace = "http://digitalhps.org/creationEvents-model", type = JAXBElement.class), @XmlElementRef(name = "predicate", namespace = "http://digitalhps.org/creationEvents-model", type = JAXBElement.class) }) protected List<JAXBElement<?>> idOrCreatorOrCreationDate; @XmlElement(name = "source_reference", namespace = "http://digitalhps.org/creationEvents-model", type = String.class) private String sourceReference; @XmlElement(name = "id", namespace = "http://digitalhps.org/creationEvents-model", type = String.class) private String id; public String getId() { return id; } /** * Gets the value of the idOrCreatorOrCreationDate 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 idOrCreatorOrCreationDate property. * * <p> * For example, to add a new item, do as follows: * <pre> * getIdOrCreatorOrCreationDate().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link XMLGregorianCalendar }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link SubjectObjectType }{@code >} * {@link JAXBElement }{@code <}{@link SubjectObjectType }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link PredicateType }{@code >} * * */ public List<JAXBElement<?>> getIdOrCreatorOrCreationDate() { if (idOrCreatorOrCreationDate == null) { idOrCreatorOrCreationDate = new ArrayList<JAXBElement<?>>(); } return this.idOrCreatorOrCreationDate; } /** * Gets the PredicateType from the RelationType object * @param rt : RelationType * @return PredicateType */ public PredicateType getPredicateType(){ PredicateType predicate = null; List<JAXBElement<?>> e3 = getIdOrCreatorOrCreationDate(); Iterator <JAXBElement<?>> I2 = e3.iterator(); while(I2.hasNext()){ JAXBElement<?> element = (JAXBElement<?>) I2.next(); if(element.getValue().toString().contains("PredicateType")){ predicate= (PredicateType) element.getValue(); } } return predicate; } /** * Gets the Subject of SubjectObjectType from the RelationType object * @param rt : RelationType * @return SubjectObjectType */ public SubjectObjectType getSubjectType(){ SubjectObjectType subjectType = null; List<JAXBElement<?>> e3 = getIdOrCreatorOrCreationDate(); Iterator <JAXBElement<?>> I2 = e3.iterator(); while(I2.hasNext()){ JAXBElement<?> element = (JAXBElement<?>) I2.next(); if(element.getValue().toString().contains("SubjectObjectType")){ // Handles the subject part of the relation if(element.getName().toString().contains("subject")){ subjectType = (SubjectObjectType) element.getValue(); } } } return subjectType; } /** * Gets the Object of SubjectObjectType from the RelationType object * @param rt : RelationType * @return SubjectObjectType */ public SubjectObjectType getObjectType(){ SubjectObjectType objectType = null; List<JAXBElement<?>> e3 = getIdOrCreatorOrCreationDate(); Iterator <JAXBElement<?>> I2 = e3.iterator(); while(I2.hasNext()){ JAXBElement<?> element = (JAXBElement<?>) I2.next(); if(element.getValue().toString().contains("SubjectObjectType")){ // Handles the subject part of the relation if(element.getName().toString().contains("object")){ objectType = (SubjectObjectType) element.getValue(); } } } return objectType; } public void setSourceReference(String sourceReference) { this.sourceReference = sourceReference; } public String getSourceReference() { return sourceReference; } }