oasis.names.specification.ubl.schema.xsd.commonaggregatecomponents_2.EndorsementType Maven / Gradle / Ivy
package oasis.names.specification.ubl.schema.xsd.commonaggregatecomponents_2;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import com.phloc.commons.annotations.ReturnsMutableObject;
import com.phloc.commons.equals.EqualsUtils;
import com.phloc.commons.hash.HashCodeGenerator;
import com.phloc.commons.string.ToStringGenerator;
import oasis.names.specification.ubl.schema.xsd.commonbasiccomponents_2.ApprovalStatusType;
import oasis.names.specification.ubl.schema.xsd.commonbasiccomponents_2.DocumentIDType;
import oasis.names.specification.ubl.schema.xsd.commonbasiccomponents_2.RemarksType;
/**
*
*
* <?xml version="1.0" encoding="UTF-8"?><ccts:Component xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ccts:ComponentType>ABIE</ccts:ComponentType><ccts:DictionaryEntryName>Endorsement. Details</ccts:DictionaryEntryName><ccts:Definition>Details of an endorsement on the document.</ccts:Definition><ccts:ObjectClass>Endorsement</ccts:ObjectClass></ccts:Component>
*
*
*
* Java class for EndorsementType complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="EndorsementType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2}DocumentID"/>
* <element ref="{urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2}ApprovalStatus"/>
* <element ref="{urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2}Remarks" maxOccurs="unbounded" minOccurs="0"/>
* <element ref="{urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2}EndorserParty"/>
* <element ref="{urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2}Signature" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "EndorsementType", propOrder = {
"documentID",
"approvalStatus",
"remarks",
"endorserParty",
"signature"
})
public class EndorsementType implements Serializable
{
@XmlElement(name = "DocumentID", namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", required = true)
private DocumentIDType documentID;
@XmlElement(name = "ApprovalStatus", namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2", required = true)
private ApprovalStatusType approvalStatus;
@XmlElement(name = "Remarks", namespace = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2")
private List remarks;
@XmlElement(name = "EndorserParty", required = true)
private EndorserPartyType endorserParty;
@XmlElement(name = "Signature")
private List signature;
/**
* Default constructor
* Created by phloc-ubl-jaxb-plugin -Xphloc-ubl-value
*
*/
public EndorsementType() {
}
/**
*
*
* <?xml version="1.0" encoding="UTF-8"?><ccts:Component xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ccts:ComponentType>BBIE</ccts:ComponentType><ccts:DictionaryEntryName>Endorsement. Document. Identifier</ccts:DictionaryEntryName><ccts:Definition>Identifies the endorsement.</ccts:Definition><ccts:Cardinality>1</ccts:Cardinality><ccts:ObjectClass>Endorsement</ccts:ObjectClass><ccts:PropertyTerm>Document</ccts:PropertyTerm><ccts:RepresentationTerm>Identifier</ccts:RepresentationTerm><ccts:DataType>Identifier. Type</ccts:DataType></ccts:Component>
*
*
*
* @return
* possible object is
* {@link DocumentIDType }
*
*/
@Nullable
public DocumentIDType getDocumentID() {
return documentID;
}
/**
* Sets the value of the documentID property.
*
* @param value
* allowed object is
* {@link DocumentIDType }
*
*/
public void setDocumentID(
@Nullable
DocumentIDType value) {
this.documentID = value;
}
/**
*
*
* <?xml version="1.0" encoding="UTF-8"?><ccts:Component xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ccts:ComponentType>BBIE</ccts:ComponentType><ccts:DictionaryEntryName>Endorsement. Approval Status. Text</ccts:DictionaryEntryName><ccts:Definition>Specifies the status of the endorsement.</ccts:Definition><ccts:Cardinality>1</ccts:Cardinality><ccts:ObjectClass>Endorsement</ccts:ObjectClass><ccts:PropertyTerm>Approval Status</ccts:PropertyTerm><ccts:RepresentationTerm>Text</ccts:RepresentationTerm><ccts:DataType>Text. Type</ccts:DataType><ccts:AlternativeBusinessTerms>Authentication Code</ccts:AlternativeBusinessTerms></ccts:Component>
*
*
*
* @return
* possible object is
* {@link ApprovalStatusType }
*
*/
@Nullable
public ApprovalStatusType getApprovalStatus() {
return approvalStatus;
}
/**
* Sets the value of the approvalStatus property.
*
* @param value
* allowed object is
* {@link ApprovalStatusType }
*
*/
public void setApprovalStatus(
@Nullable
ApprovalStatusType value) {
this.approvalStatus = value;
}
/**
*
*
* <?xml version="1.0" encoding="UTF-8"?><ccts:Component xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ccts:ComponentType>BBIE</ccts:ComponentType><ccts:DictionaryEntryName>Endorsement. Remarks. Text</ccts:DictionaryEntryName><ccts:Definition>Remarks by the endorsing party.</ccts:Definition><ccts:Cardinality>0..n</ccts:Cardinality><ccts:ObjectClass>Endorsement</ccts:ObjectClass><ccts:PropertyTerm>Remarks</ccts:PropertyTerm><ccts:RepresentationTerm>Text</ccts:RepresentationTerm><ccts:DataType>Text. Type</ccts:DataType></ccts:Component>
*
* Gets the value of the remarks property.
*
*
* 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 set
method for the remarks property.
*
*
* For example, to add a new item, do as follows:
*
* getRemarks().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link RemarksType }
*
*
*/
@Nonnull
@ReturnsMutableObject(reason = "JAXB implementation style")
public List getRemarks() {
if (remarks == null) {
remarks = new ArrayList();
}
return this.remarks;
}
/**
*
*
* <?xml version="1.0" encoding="UTF-8"?><ccts:Component xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ccts:ComponentType>ASBIE</ccts:ComponentType><ccts:DictionaryEntryName>Endorsement. Endorser Party</ccts:DictionaryEntryName><ccts:Definition>The type of party providing the endorsement.</ccts:Definition><ccts:Cardinality>1</ccts:Cardinality><ccts:ObjectClass>Endorsement</ccts:ObjectClass><ccts:PropertyTerm>Endorser Party</ccts:PropertyTerm><ccts:AssociatedObjectClass>Endorser Party</ccts:AssociatedObjectClass></ccts:Component>
*
*
*
* @return
* possible object is
* {@link EndorserPartyType }
*
*/
@Nullable
public EndorserPartyType getEndorserParty() {
return endorserParty;
}
/**
* Sets the value of the endorserParty property.
*
* @param value
* allowed object is
* {@link EndorserPartyType }
*
*/
public void setEndorserParty(
@Nullable
EndorserPartyType value) {
this.endorserParty = value;
}
/**
*
*
* <?xml version="1.0" encoding="UTF-8"?><ccts:Component xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDatatypes-2" xmlns:udt="urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ccts:ComponentType>ASBIE</ccts:ComponentType><ccts:DictionaryEntryName>Endorsement. Signature</ccts:DictionaryEntryName><ccts:Definition>One or more signatures applied to the endorsement.</ccts:Definition><ccts:Cardinality>0..n</ccts:Cardinality><ccts:ObjectClass>Endorsement</ccts:ObjectClass><ccts:PropertyTerm>Signature</ccts:PropertyTerm><ccts:AssociatedObjectClass>Signature</ccts:AssociatedObjectClass></ccts:Component>
*
* Gets the value of the signature property.
*
*
* 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 set
method for the signature property.
*
*
* For example, to add a new item, do as follows:
*
* getSignature().add(newItem);
*
*
*
*
* Objects of the following type(s) are allowed in the list
* {@link SignatureType }
*
*
*/
@Nonnull
@ReturnsMutableObject(reason = "JAXB implementation style")
public List getSignature() {
if (signature == null) {
signature = new ArrayList();
}
return this.signature;
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-equalshashcode
*
*/
@Override
public boolean equals(final Object o) {
if (o == this) {
return true;
}
if ((o == null)||(!getClass().equals(o.getClass()))) {
return false;
}
final EndorsementType rhs = ((EndorsementType) o);
if (!EqualsUtils.equals(documentID, rhs.documentID)) {
return false;
}
if (!EqualsUtils.equals(approvalStatus, rhs.approvalStatus)) {
return false;
}
if (!EqualsUtils.equals(remarks, rhs.remarks)) {
return false;
}
if (!EqualsUtils.equals(endorserParty, rhs.endorserParty)) {
return false;
}
if (!EqualsUtils.equals(signature, rhs.signature)) {
return false;
}
return true;
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-equalshashcode
*
*/
@Override
public int hashCode() {
return new HashCodeGenerator(this).append(documentID).append(approvalStatus).append(remarks).append(endorserParty).append(signature).getHashCode();
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-tostring
*
*/
@Override
public String toString() {
return new ToStringGenerator(this).append("documentID", documentID).append("approvalStatus", approvalStatus).append("remarks", remarks).append("endorserParty", endorserParty).append("signature", signature).toString();
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @param aList
* The new list member to set. May be null
.
*/
public void setRemarks(
@Nullable
final List aList) {
remarks = aList;
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @param aList
* The new list member to set. May be null
.
*/
public void setSignature(
@Nullable
final List aList) {
signature = aList;
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @return
* true
if at least one item is contained, false
otherwise.
*/
public boolean hasRemarksEntries() {
return (!getRemarks().isEmpty());
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @return
* true
if no item is contained, false
otherwise.
*/
public boolean hasNoRemarksEntries() {
return getRemarks().isEmpty();
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @return
* The number of contained elements. Always ≥ 0.
*/
@Nonnegative
public int getRemarksCount() {
return getRemarks().size();
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @param index
* The index to retrieve
* @return
* The element at the specified index. May be null
* @throws ArrayIndexOutOfBoundsException
* if the index is invalid!
*/
@Nullable
public RemarksType getRemarksAtIndex(
@Nonnegative
final int index) {
return getRemarks().get(index);
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @return
* true
if at least one item is contained, false
otherwise.
*/
public boolean hasSignatureEntries() {
return (!getSignature().isEmpty());
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @return
* true
if no item is contained, false
otherwise.
*/
public boolean hasNoSignatureEntries() {
return getSignature().isEmpty();
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @return
* The number of contained elements. Always ≥ 0.
*/
@Nonnegative
public int getSignatureCount() {
return getSignature().size();
}
/**
* Created by phloc-jaxb22-plugin -Xphloc-list-extension
*
* @param index
* The index to retrieve
* @return
* The element at the specified index. May be null
* @throws ArrayIndexOutOfBoundsException
* if the index is invalid!
*/
@Nullable
public SignatureType getSignatureAtIndex(
@Nonnegative
final int index) {
return getSignature().get(index);
}
/**
* Special setter with value of type String
* Created by phloc-ubl-jaxb-plugin -Xphloc-ubl-value
*
* @param valueParam
* The value to be set. May be null
.
* @return
* The created intermediary object of type ApprovalStatusType and never null
*/
@Nonnull
public ApprovalStatusType setApprovalStatus(
@Nullable
final String valueParam) {
ApprovalStatusType aObj = getApprovalStatus();
if (aObj == null) {
aObj = new ApprovalStatusType(valueParam);
setApprovalStatus(aObj);
} else {
aObj.setValue(valueParam);
}
return aObj;
}
/**
* Special setter with value of type String
* Created by phloc-ubl-jaxb-plugin -Xphloc-ubl-value
*
* @param valueParam
* The value to be set. May be null
.
* @return
* The created intermediary object of type DocumentIDType and never null
*/
@Nonnull
public DocumentIDType setDocumentID(
@Nullable
final String valueParam) {
DocumentIDType aObj = getDocumentID();
if (aObj == null) {
aObj = new DocumentIDType(valueParam);
setDocumentID(aObj);
} else {
aObj.setValue(valueParam);
}
return aObj;
}
/**
* Get the value of the contained DocumentIDType object
* Created by phloc-ubl-jaxb-plugin -Xphloc-ubl-value
*
* @return
* Either the value of the contained DocumentIDType object or null
*/
@Nullable
public String getDocumentIDValue() {
DocumentIDType aObj = getDocumentID();
return ((aObj == null)?null:aObj.getValue());
}
/**
* Get the value of the contained ApprovalStatusType object
* Created by phloc-ubl-jaxb-plugin -Xphloc-ubl-value
*
* @return
* Either the value of the contained ApprovalStatusType object or null
*/
@Nullable
public String getApprovalStatusValue() {
ApprovalStatusType aObj = getApprovalStatus();
return ((aObj == null)?null:aObj.getValue());
}
}