|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.purl.sword.base.XmlElement
org.purl.sword.atom.TextConstruct
public class TextConstruct
Represents a text construct in the ATOM elements. This is a superclass of several elements within this implementation.
| Field Summary | |
|---|---|
static String |
ATTRIBUTE_TYPE
label for the type attribute. |
| Fields inherited from class org.purl.sword.base.XmlElement |
|---|
DATE_FORMAT, DATE_FORMATS, xmlName |
| Constructor Summary | |
|---|---|
TextConstruct(String name)
Create a new instance. |
|
TextConstruct(String prefix,
String name)
Create a new instance, specifying the prefix and local name. |
|
TextConstruct(String prefix,
String name,
String namespaceUri)
|
|
TextConstruct(XmlName name)
Create a new instance. |
|
| Method Summary | |
|---|---|
String |
getContent()
Get the content in this TextConstruct. |
ContentType |
getType()
Get the type. |
protected void |
initialise()
|
nu.xom.Element |
marshall()
Marshall the data in this object to an Element object. |
void |
setContent(String content)
Set the content. |
void |
setType(ContentType type)
Set the type. |
String |
toString()
Get a string representation. |
void |
unmarshall(nu.xom.Element text)
Unmarshall the text element into this object. |
SwordValidationInfo |
unmarshall(nu.xom.Element text,
Properties validationProperties)
|
protected SwordValidationInfo |
validate(ArrayList<SwordValidationInfo> existing,
ArrayList<SwordValidationInfo> attributeItems,
Properties validationContext)
Validate this element, checking that the content stored in the object matches the requirements for the object as defined in the SWORD profile. |
SwordValidationInfo |
validate(Properties validationContext)
Validate this element, checking that the content stored in the object matches the requirements for the object as defined in the SWORD profile. |
| Methods inherited from class org.purl.sword.base.XmlElement |
|---|
createValidAttributeInfo, getQualifiedName, getQualifiedName, getQualifiedNameWithPrefix, getXmlName, handleIncorrectElement, isInstanceOf, isInstanceOf, processUnexpectedAttributes, processUnexpectedAttributes, unmarshallBoolean, unmarshallInteger, unmarshallString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String ATTRIBUTE_TYPE
| Constructor Detail |
|---|
public TextConstruct(String prefix,
String name)
prefix - The prefix.name - The local name.public TextConstruct(String name)
name - The name that will be applied.public TextConstruct(XmlName name)
name - The name to set.
public TextConstruct(String prefix,
String name,
String namespaceUri)
prefix - name - namespaceUri - | Method Detail |
|---|
protected void initialise()
public nu.xom.Element marshall()
marshall in interface SwordElementInterface
public void unmarshall(nu.xom.Element text)
throws UnmarshallException
unmarshall in interface SwordElementInterfacetext - The text element.
UnmarshallException - If the specified element is not of
the correct type, where the localname is used
to specify the valid name. Also thrown
if there is an issue accessing the data.
public SwordValidationInfo unmarshall(nu.xom.Element text,
Properties validationProperties)
throws UnmarshallException
text - validate -
UnmarshallExceptionpublic SwordValidationInfo validate(Properties validationContext)
validate in class XmlElementvalidationContext - A property object that is used to pass any context
information through the hierarchy of elements. This
can be used to provide more appropriate validation
information.
protected SwordValidationInfo validate(ArrayList<SwordValidationInfo> existing,
ArrayList<SwordValidationInfo> attributeItems,
Properties validationContext)
existing - A list of any existing element information that is passed from
an unmarshall process. If this method is not called
following unmarshalling, this should be set to null.attributeItems - A list of any existing attribute information that
is passed from an unmarshall process. If this method is
not called following unmarshalling, this should be set
to null.validationContext - A property object that is used to pass any context
information through the hierarchy of elements. This
can be used to provide more appropriate validation
information.
public String getContent()
public void setContent(String content)
content - The content.public ContentType getType()
public void setType(ContentType type)
type - The type.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||