protected void initialise() { super.initialise(); swordNoOp = null; swordPackaging = null; swordVerboseDescription = null; swordTreatment = null; swordUserAgent = null; }
/** * Unmarshal the contents of the Entry element into the internal data objects * in this object. * * @param entry The Entry element to process. * @throws UnmarshallException If the element does not contain an ATOM entry * element, or if there is a problem processing the element or any * subelements. */ public void unmarshall(Element entry) throws UnmarshallException { unmarshall(entry, null); }
public SwordValidationInfo unmarshall(Element entry, Properties validationProperties) throws UnmarshallException { SwordValidationInfo result = unmarshallWithoutValidate(entry, validationProperties); if( validationProperties != null ) { result = validate(result, validationProperties); } return result; }
public SwordValidationInfo unmarshallWithoutValidate(Element entry, Properties validationProperties) throws UnmarshallException { if (!isInstanceOf(entry, xmlName)) { return handleIncorrectElement(entry, validationProperties); initialise(); if (isInstanceOf(element, Author.elementName())) { Author author = new Author(); result.addUnmarshallElementInfo(author.unmarshall(element, validationProperties)); authors.add(author); } else if (isInstanceOf(element, Category.elementName())) { Category category = new Category(); result.addUnmarshallElementInfo(category.unmarshall(element, validationProperties)); categories.add(category); } else if (isInstanceOf(element, Content.elementName())) { if (content == null) { content = new Content(); } else if (isInstanceOf(element, Generator.elementName())) { if (generator == null) { generator = new Generator(); } else if (isInstanceOf(element, Contributor.elementName())) { Contributor contributor = new Contributor(); result.addUnmarshallElementInfo(contributor.unmarshall(element, validationProperties)); contributors.add(contributor); } else if (isInstanceOf(element, Id.elementName())) { if (id == null) { id = new Id();
/** * Marshal the data stored in this object into Element objects. * * @return An element that holds the data associated with this object. */ public Element marshall() { Element entry = new Element(getQualifiedName(), Namespaces.NS_ATOM); entry.addNamespaceDeclaration(Namespaces.PREFIX_SWORD, Namespaces.NS_SWORD); entry.addNamespaceDeclaration(Namespaces.PREFIX_ATOM, Namespaces.NS_ATOM); this.marshallElements(entry); return entry; }
/** * */ public SwordValidationInfo validate(Properties validationContext) { return validate(null, validationContext); }
/** * @param elementName name of element to check * @return true if element is checked */ protected boolean isElementChecked(XmlName elementName) { if (elementName == null) { return false; } return elementName.equals(SwordNoOp.elementName()) | elementName.equals(SwordUserAgent.elementName()) | elementName.equals(SwordTreatment.elementName()) | elementName.equals(SwordVerboseDescription.elementName()) | elementName.equals(SwordPackaging.elementName()) | super.isElementChecked(elementName); }
protected void marshallElements(Element entry) { super.marshallElements(entry); if (swordTreatment != null) { entry.appendChild(swordTreatment.marshall()); } if (swordVerboseDescription != null) { entry.appendChild(swordVerboseDescription.marshall()); } if (swordNoOp != null) { entry.appendChild(swordNoOp.marshall()); } if (swordUserAgent != null) { entry.appendChild(swordUserAgent.marshall()); } if (swordPackaging != null) { entry.appendChild(swordPackaging.marshall()); } }
SwordValidationInfo result = super.unmarshallWithoutValidate(entry, validationProperties);
if (! isInstanceOf(entry, xmlName) ) return handleIncorrectElement(entry, validationProperties); initialise(); if (isInstanceOf(element, Author.elementName())) else if (isInstanceOf(element, Category.elementName())) else if (isInstanceOf(element, Content.elementName())) else if (isInstanceOf(element, Generator.elementName())) else if (isInstanceOf(element, Contributor.elementName())) else if (isInstanceOf(element, Id.elementName())) else if (isInstanceOf(element, Link.elementName())) else if (isInstanceOf(element, Published.elementName())) else if (isInstanceOf(element, Rights.elementName())) else if (isInstanceOf(element, Summary.elementName())) else if (isInstanceOf(element, Title.elementName())) else if (isInstanceOf(element, Updated.elementName()))
/** * Mashall the data stored in this object into Element objects. * * @return An element that holds the data associated with this object. */ public Element marshall() { Element entry = new Element(getQualifiedName(), Namespaces.NS_ATOM); entry.addNamespaceDeclaration(Namespaces.PREFIX_SWORD, Namespaces.NS_SWORD); entry.addNamespaceDeclaration(Namespaces.PREFIX_ATOM, Namespaces.NS_ATOM); this.marshallElements(entry); return entry; }
/** * * @return */ public SwordValidationInfo validate(Properties validationContext) { return validate(null, validationContext); }
/** * * @param elementName * @return */ protected boolean isElementChecked(XmlName elementName) { if( elementName == null ) { return false; } return elementName.equals(SwordNoOp.elementName()) | elementName.equals(SwordUserAgent.elementName()) | elementName.equals(SwordTreatment.elementName()) | elementName.equals(SwordVerboseDescription.elementName()) | elementName.equals(SwordPackaging.elementName()) | super.isElementChecked(elementName); }
protected void marshallElements(Element entry) { super.marshallElements(entry); if( swordTreatment != null ) { entry.appendChild(swordTreatment.marshall()); } if( swordVerboseDescription != null ) { entry.appendChild(swordVerboseDescription.marshall()); } if (swordNoOp != null) { entry.appendChild(swordNoOp.marshall()); } if( swordUserAgent != null ) { entry.appendChild(swordUserAgent.marshall()); } if( swordPackaging != null ) { entry.appendChild(swordPackaging.marshall()); } }
throws UnmarshallException SwordValidationInfo result = super.unmarshallWithoutValidate(entry, validationProperties);
if (! isInstanceOf(entry, xmlName) ) return handleIncorrectElement(entry, validationProperties); initialise(); if (isInstanceOf(element, Author.elementName())) else if (isInstanceOf(element, Category.elementName())) else if (isInstanceOf(element, Content.elementName())) else if (isInstanceOf(element, Generator.elementName())) else if (isInstanceOf(element, Contributor.elementName())) else if (isInstanceOf(element, Id.elementName())) else if (isInstanceOf(element, Link.elementName())) else if (isInstanceOf(element, Published.elementName())) else if (isInstanceOf(element, Rights.elementName())) else if (isInstanceOf(element, Summary.elementName())) else if (isInstanceOf(element, Title.elementName())) else if (isInstanceOf(element, Updated.elementName()))
/** * Marshal the data stored in this object into Element objects. * * @return An element that holds the data associated with this object. */ public Element marshall() { Element entry = new Element(getQualifiedName(), Namespaces.NS_ATOM); entry.addNamespaceDeclaration(Namespaces.PREFIX_SWORD, Namespaces.NS_SWORD); entry.addNamespaceDeclaration(Namespaces.PREFIX_ATOM, Namespaces.NS_ATOM); this.marshallElements(entry); return entry; }
public SwordValidationInfo unmarshall(Element entry, Properties validationProperties) throws UnmarshallException { SwordValidationInfo result = unmarshallWithoutValidate(entry, validationProperties); if (validationProperties != null) { result = validate(result, validationProperties); } return result; }
protected void initialise() { super.initialise(); swordNoOp = null; swordPackaging = null; swordVerboseDescription = null; swordTreatment = null; swordUserAgent = null; }
/** * * @return */ public SwordValidationInfo validate(Properties validationContext) { return validate(null, validationContext); }