/** * Set the title. This will set the title type to ContentType.TEXT. * * @param title The title. */ public void setTitle(String title) { if (this.title == null) { this.title = new Title(); } this.title.setContent(title); this.title.setType(ContentType.TEXT); }
/** * Get the title. * * @return The title, or <code>null</code> if no title has been set. */ public String getTitle() { if (title == null) { return null; } return title.getContent(); }
if (isInstanceOf(element, Title.elementName())) { if (title == null) { title = new Title(); validationItems.add(title.unmarshall(element, validationProperties)); } else { SwordValidationInfo info = new SwordValidationInfo(Title.elementName(), SwordValidationInfo.DUPLICATE_ELEMENT, SwordValidationInfoType.WARNING);
Title title = new Title(); title.setContent("ERROR"); sed.setTitle(title); Calendar calendar = Calendar.getInstance();
title = new Title(); title.setContent("Untitled"); collection.appendChild(title.marshall());
Title title = entry.getTitle(); if (title != null) { System.out.print("Title: " + title.getContent() + " type: "); if (title.getType() != null) { System.out.println(title.getType().toString()); } else { System.out.println("Not specified.");
result.addValidationInfo(new SwordValidationInfo(Title.elementName(), SwordValidationInfo.MISSING_ELEMENT_ERROR, SwordValidationInfoType.ERROR)); } else if (title != null && validateAll) { result.addValidationInfo(title.validate(validationContext));
/** * Marshal the data in this element to an Element. * * @return An element that contains the data in this object. */ public Element marshall() { // convert data into XOM elements and return the 'root', i.e. the one // that represents the collection. Element workspace = new Element(xmlName.getQualifiedName(), xmlName.getNamespace()); if (title != null) { workspace.appendChild(title.marshall()); } for (Collection item : collections) { workspace.appendChild(item.marshall()); } return workspace; }
result.addValidationInfo(title.validate(validationContext));
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()); }
if( isInstanceOf(element, Title.elementName() ) ) title = new Title(); validationItems.add(title.unmarshall(element, validationProperties)); new SwordValidationInfo(Title.elementName(), SwordValidationInfo.DUPLICATE_ELEMENT, SwordValidationInfoType.WARNING);
throws IOException { SWORDErrorDocument sed = new SWORDErrorDocument(errorURI); Title title = new Title(); title.setContent("ERROR"); sed.setTitle(title); Calendar calendar = Calendar.getInstance();
title = new Title(); title.setContent("Untitled"); collection.appendChild(title.marshall());
if( title != null ) System.out.print("Title: " + title.getContent() + " type: " ); if( title.getType() != null ) System.out.println(title.getType().toString());
result.addValidationInfo(new SwordValidationInfo(Title.elementName(), SwordValidationInfo.MISSING_ELEMENT_ERROR, SwordValidationInfoType.ERROR)); result.addValidationInfo(title.validate(validationContext));
/** * Marshal the data in this element to an Element. * * @return An element that contains the data in this object. */ public Element marshall( ) { // convert data into XOM elements and return the 'root', i.e. the one // that represents the collection. Element workspace = new Element(xmlName.getQualifiedName(), xmlName.getNamespace()); if( title != null ) { workspace.appendChild(title.marshall()); } for( Collection item : collections ) { workspace.appendChild(item.marshall()); } return workspace; }
result.addValidationInfo(title.validate(validationContext));
/** * Set the title. The type for the title will be set to * <code>ContentType.TEXT</code> * * @param title The title. */ public final void setTitle(String title) { if (this.title == null) { this.title = new Title(); } this.title.setContent(title); this.title.setType(ContentType.TEXT); }
if( isInstanceOf(element, Title.elementName() ) ) title = new Title(); validationItems.add(title.unmarshall(element, validationProperties)); new SwordValidationInfo(Title.elementName(), SwordValidationInfo.DUPLICATE_ELEMENT, SwordValidationInfoType.WARNING);
Title title = new Title(); title.setContent("ERROR"); sed.setTitle(title); Calendar calendar = Calendar.getInstance();