public final class XLinkAttributes extends AbstractAttributeGroup
| In DDMS | 2.0 | 3.0 | 3.1 | 4.0.1/4.1 | 5.0 |
This class only models the subset of attributes and values that are employed by the DDMS specification.
Determinations about whether an attribute is optional or required depend on the decorated class
(Link, RevisionRecall, or TaskID).
| History |
|---|
| None. |
| Nested Elements | |||
|---|---|---|---|
|
| Attributes (in a ddms:link) | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| Attributes (in a ddms:revisionRecall) | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| Attributes (in a ddms:taskID) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| Validation Rules | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| Modifier and Type | Class and Description |
|---|---|
static class |
XLinkAttributes.Builder
Builder for these attributes.
|
INCOMPATIBLE_VERSION_MESSAGE| Constructor and Description |
|---|
XLinkAttributes()
Constructor which builds from raw data for an unknown type.
|
XLinkAttributes(nu.xom.Element element)
Base constructor
|
XLinkAttributes(String role,
String title,
String label)
Constructor which builds from raw data for a resource link.
|
XLinkAttributes(String href,
String role,
String title,
String label)
Constructor which builds from raw data for a locator link.
|
XLinkAttributes(String href,
String role,
String title,
String arcrole,
String show,
String actuate)
Constructor which builds from raw data for a simple link.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTo(nu.xom.Element element)
Convenience method to add these attributes onto an existing XOM Element
|
boolean |
equals(Object obj) |
String |
getActuate()
Accessor for the actuate
|
String |
getArcrole()
Accessor for the arcrole
|
String |
getHref()
Accessor for the href
|
String |
getHTMLTextOutput(OutputFormat format,
String prefix)
Outputs to HTML or Text with a prefix at the beginning of each meta tag or line.
|
com.google.gson.JsonObject |
getJSONObject()
Renders this component as a JSON object, which can either be converted to
a JSON string or inserted into the parent JSON object.
|
String |
getLabel()
Accessor for the label
|
String |
getName()
Returns a name that describes this attribute group.
|
static XLinkAttributes |
getNonNullInstance(XLinkAttributes xlinkAttributes)
Returns a non-null instance of XLink attributes.
|
String |
getRole()
Accessor for the role
|
String |
getShow()
Accessor for the show
|
String |
getTitle()
Accessor for the title
|
String |
getType()
Accessor for the type
|
int |
hashCode() |
boolean |
isEmpty()
Checks if any attributes have been set.
|
protected void |
validate(DDMSVersion version)
Validates the attribute group.
|
protected void |
validateCompatibleVersion(DDMSVersion newParentVersion)
Compares the DDMS version of these attributes to another DDMS version
|
addJson, addJson, getNamespace, getValidationWarnings, getWarnings, setNamespacepublic XLinkAttributes(nu.xom.Element element)
throws InvalidDDMSException
element - the XOM element which is decorated with these attributes.InvalidDDMSExceptionpublic XLinkAttributes()
throws InvalidDDMSException
InvalidDDMSExceptionpublic XLinkAttributes(String role,
String title,
String label)
throws InvalidDDMSException
role - the role attributetitle - the link titlelabel - the name of the linkInvalidDDMSException - if any required information is missing or malformedpublic XLinkAttributes(String href,
String role,
String title,
String label)
throws InvalidDDMSException
href - the link hrefrole - the role attributetitle - the link titlelabel - the name of the linkInvalidDDMSException - if any required information is missing or malformedpublic XLinkAttributes(String href,
String role,
String title,
String arcrole,
String show,
String actuate)
throws InvalidDDMSException
href - the link hrefrole - the role attributetitle - the link titlearcrole - the arcroleshow - the show tokenactuate - the actuate tokenInvalidDDMSException - if any required information is missing or malformedpublic static XLinkAttributes getNonNullInstance(XLinkAttributes xlinkAttributes) throws InvalidDDMSException
xlinkAttributes - the attributes to return by defaultInvalidDDMSException - if there are problems creating the empty attributes instancepublic void addTo(nu.xom.Element element)
throws InvalidDDMSException
element - the element to decorateInvalidDDMSException - if the DDMS version of the element is differentprotected void validateCompatibleVersion(DDMSVersion newParentVersion) throws InvalidDDMSException
newParentVersion - the version to testInvalidDDMSException - if the versions do not matchprotected void validate(DDMSVersion version) throws InvalidDDMSException
validate in class AbstractAttributeGroupversion - the DDMS version to validate against. This cannot be stored in the attribute group because some
DDMSVersions have the same attribute XML namespace (e.g. XLink, ISM, NTK, GML after DDMS 2.0).InvalidDDMSException - if any required information is missing or malformedpublic com.google.gson.JsonObject getJSONObject()
AbstractAttributeGroupI consider this to be an internal method, that unfortunately must be marked as public to allow cross-package access when generating output. Use toJSON() as the formal, public method to generate output.
getJSONObject in class AbstractAttributeGroupAbstractAttributeGroup.getJSONObject()public boolean isEmpty()
AbstractAttributeGroupisEmpty in class AbstractAttributeGroupAbstractAttributeGroup.isEmpty()public String getName()
AbstractAttributeGroupgetName in class AbstractAttributeGroupAbstractAttributeGroup.getName()public String getHTMLTextOutput(OutputFormat format, String prefix)
AbstractAttributeGroupI consider this to be an internal method, that unfortunately must be marked as public to allow cross-package access when generating output. Use toHTML() and toText() as the formal, public methods to generate output.
getHTMLTextOutput in class AbstractAttributeGroupformat - the desired format of this outputprefix - the prefix to addAbstractAttributeGroup.getHTMLTextOutput(OutputFormat, String)public boolean equals(Object obj)
equals in class ObjectObject.equals(Object)public int hashCode()
hashCode in class ObjectObject.hashCode()public String getType()
public String getHref()
public String getRole()
public String getTitle()
public String getLabel()
public String getArcrole()
public String getShow()
public String getActuate()
Copyright 2010 - 2019 by Brian Uri!
Generated on 09/15/2016 12:36 PM
https://ddmsence.urizone.net/