public final class XLinkAttributes extends AbstractAttributeGroup
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).
| Locator Attributes (for ddms:link) |
|---|
|
xlink:type: the type of link (optional, but fixed as "locator" if set) xlink:href: A target URL (optional) xlink:role: The URI reference identifies some resource that describes the intended property. (optional) xlink:title: Used to describe the meaning of a link or resource in a human-readable fashion, along the same lines as the role or arcrole attribute. (optional) xlink:label: The label attribute provides a name for the link (optional) |
| Resource Attributes (for ddms:revisionRecall) |
|---|
|
xlink:type: (optional, but fixed as "resource" if set) xlink:role: The URI reference identifies some resource that describes the intended property. When no value is supplied, no particular role value is to be inferred. (optional, but must be non-empty if set) xlink:title: Used to describe the meaning of a link or resource in a human-readable fashion, along the same lines as the role or arcrole attribute. (optional) xlink:label: The label attribute provides a name for the link (optional) |
| Simple Attributes (for ddms:taskID) |
|---|
|
xlink:type: (optional, but fixed as "simple" if set) xlink:href: A URL (optional, must be a URI) xlink:role: The URI reference identifies some resource that describes the intended property. When no value is supplied, no particular role value is to be inferred. (optional, but must be non-empty if set) xlink:title: Used to describe the meaning of a link or resource in a human-readable fashion, along the same lines as the role or arcrole attribute. (optional) xlink:arcrole: A URI reference describing an arc role (optional) xlink:show: A token which signifies the behavior intentions for traversal (optional) xlink:actuate: A token which signifies the behavior intentions for traversal (optional) |
| Modifier and Type | Class and Description |
|---|---|
static class |
XLinkAttributes.Builder
Builder for these attributes.
|
| 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 |
getLabel()
Accessor for the label
|
static XLinkAttributes |
getNonNullInstance(XLinkAttributes xlinkAttributes)
Returns a non-null instance of XLink attributes.
|
String |
getOutput(boolean isHTML,
String prefix)
Outputs to HTML or Text with a prefix at the beginning of each meta tag or line.
|
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() |
protected void |
validate()
Validates the attribute group.
|
getDDMSVersion, getValidationWarnings, getWarnings, validateSameVersionpublic 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 attribute (optional)title - the link title (optional)label - the name of the link (optional)InvalidDDMSException - if any required information is missing or malformedpublic XLinkAttributes(String href,
String role,
String title,
String label)
throws InvalidDDMSException
href - the link href (optional)role - the role attribute (optional)title - the link title (optional)label - the name of the link (optional)InvalidDDMSException - 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 href (optional)role - the role attribute (optional)title - the link title (optional)arcrole - the arcrole (optional)show - the show token (optional)actuate - the actuate token (optional)InvalidDDMSException - 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 validate()
throws InvalidDDMSException
| Rules |
|---|
|
|
validate in class AbstractAttributeGroupInvalidDDMSException - if any required information is missing or malformedpublic String getOutput(boolean isHTML,
String prefix)
AbstractAttributeGroupgetOutput in class AbstractAttributeGroupisHTML - true for HTML, false for Textprefix - the prefix to addAbstractAttributeGroup.getOutput(boolean, 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 - 2013 by Brian Uri!
Generated on 12/15/2013 10:22 AM
http://ddmsence.urizone.net/