/** * add the author names from the bibliographic metadata. Does * not supply email addresses or URIs, both for privacy, and * because the data is not so readily available in DSpace. */ protected void addAuthors() { if (deposit != null) { String username = this.deposit.getUsername(); Author author = new Author(); author.setName(username); entry.addAuthors(author); } }
if (!isInstanceOf(author, xmlName)) { handleIncorrectElement(author, validationProperties); ArrayList<SwordValidationInfo> attributeItems = new ArrayList<SwordValidationInfo>(); processUnexpectedAttributes(author, attributeItems); element = elements.get(i); if (isInstanceOf(element, Name.elementName())) { name = new Name(); validationItems.add(name.unmarshall(element, validationProperties)); } else if (isInstanceOf(element, Uri.elementName())) { uri = new Uri(); validationItems.add(uri.unmarshall(element, validationProperties)); } else if (isInstanceOf(element, Email.elementName())) { email = new Email(); validationItems.add(email.unmarshall(element, validationProperties)); result = validate(validationItems, attributeItems, validationProperties);
element = elements.get(i); if (isInstanceOf(element, Author.elementName())) { Author author = new Author(); result.addUnmarshallElementInfo(author.unmarshall(element, validationProperties)); authors.add(author); } else if (isInstanceOf(element, Category.elementName())) {
protected boolean isElementChecked(XmlName elementName) { if( elementName == null ) { return false; } return elementName.equals(Author.elementName()) | elementName.equals(Category.elementName()) | elementName.equals(Content.elementName()) | elementName.equals(Generator.elementName()) | elementName.equals(Contributor.elementName()) | elementName.equals(Id.elementName()) | elementName.equals(Link.elementName()) | elementName.equals(Published.elementName()) | elementName.equals(Rights.elementName()) | elementName.equals(Source.elementName()) | elementName.equals(Summary.elementName()) | elementName.equals(Title.elementName()) | elementName.equals(Updated.elementName()); }
/** * Marshall the data in this object to a XOM Element. The element * will have the full name that is specified in the constructor. * * @return A XOM Element. */ public Element marshall() { Element element = new Element(getQualifiedName(), xmlName.getNamespace()); if (name != null) { element.appendChild(name.marshall()); } if (uri != null) { element.appendChild(uri.marshall()); } if (email != null) { element.appendChild(email.marshall()); } return element; }
throws UnmarshallException if( ! isInstanceOf( author, xmlName) ) handleIncorrectElement(author, validationProperties); ArrayList<SwordValidationInfo> attributeItems = new ArrayList<SwordValidationInfo>(); processUnexpectedAttributes(author, attributeItems); if( isInstanceOf(element, Name.elementName() )) else if( isInstanceOf(element, Uri.elementName())) else if( isInstanceOf(element, Email.elementName() )) if( validationProperties != null ) result = validate(validationItems, attributeItems, validationProperties);
if (isInstanceOf(element, Author.elementName())) Author author = new Author(); result.addUnmarshallElementInfo(author.unmarshall(element, validationProperties)); authors.add(author);
protected boolean isElementChecked(XmlName elementName) { if( elementName == null ) { return false; } return elementName.equals(Author.elementName()) | elementName.equals(Category.elementName()) | elementName.equals(Content.elementName()) | elementName.equals(Generator.elementName()) | elementName.equals(Contributor.elementName()) | elementName.equals(Id.elementName()) | elementName.equals(Link.elementName()) | elementName.equals(Published.elementName()) | elementName.equals(Rights.elementName()) | elementName.equals(Source.elementName()) | elementName.equals(Summary.elementName()) | elementName.equals(Title.elementName()) | elementName.equals(Updated.elementName()); }
/** * Marshall the data in this object to a XOM Element. The element * will have the full name that is specified in the constructor. * * @return A XOM Element. */ public Element marshall() { Element element = new Element(getQualifiedName(), xmlName.getNamespace()); if( name != null ) { element.appendChild(name.marshall()); } if( uri != null ) { element.appendChild(uri.marshall()); } if( email != null ) { element.appendChild(email.marshall()); } return element; }
throws UnmarshallException if( ! isInstanceOf( author, xmlName) ) handleIncorrectElement(author, validationProperties); ArrayList<SwordValidationInfo> attributeItems = new ArrayList<SwordValidationInfo>(); processUnexpectedAttributes(author, attributeItems); if( isInstanceOf(element, Name.elementName() )) else if( isInstanceOf(element, Uri.elementName())) else if( isInstanceOf(element, Email.elementName() )) if( validationProperties != null ) result = validate(validationItems, attributeItems, validationProperties);
if (isInstanceOf(element, Author.elementName())) Author author = new Author(); result.addUnmarshallElementInfo(author.unmarshall(element, validationProperties)); authors.add(author);
/** * add the author names from the bibliographic metadata. Does * not supply email addresses or URIs, both for privacy, and * because the data is not so readily available in DSpace. * */ protected void addAuthors() { if (deposit != null) { String username = this.deposit.getUsername(); Author author = new Author(); author.setName(username); entry.addAuthors(author); } }
protected boolean isElementChecked(XmlName elementName) { if (elementName == null) { return false; } return elementName.equals(Author.elementName()) | elementName.equals(Category.elementName()) | elementName.equals(Content.elementName()) | elementName.equals(Generator.elementName()) | elementName.equals(Contributor.elementName()) | elementName.equals(Id.elementName()) | elementName.equals(Link.elementName()) | elementName.equals(Published.elementName()) | elementName.equals(Rights.elementName()) | elementName.equals(Source.elementName()) | elementName.equals(Summary.elementName()) | elementName.equals(Title.elementName()) | elementName.equals(Updated.elementName()); }
/** * Marshall the data in this object to a XOM Element. The element * will have the full name that is specified in the constructor. * * @return A XOM Element. */ public Element marshall() { Element element = new Element(getQualifiedName(), xmlName.getNamespace()); if( name != null ) { element.appendChild(name.marshall()); } if( uri != null ) { element.appendChild(uri.marshall()); } if( email != null ) { element.appendChild(email.marshall()); } return element; }