|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectXLink
@ThreadSafe public class XLink
The XML attributes defined by OGC in the
xlink schema.
The allowed combinations of any one attribute depend on the value of the special
type attribute. Following is a summary of the element types
(columns) on which the global attributes (rows) are allowed, with an indication
of whether a value is required (R) or optional (O)
(Source: W3C):
When
simpleextendedlocatorarcresourcetitletypeR R R R R R hrefO R roleO O O O arcroleO O titleO O O O O showO O actuateO O labelO O fromO toO
xlink attributes are found at unmarshalling time instead of an object definition,
those attributes are given to the ObjectLinker.resolve(Class, XLink) method. Users can
override that method in order to fetch an instance in some catalog for the given xlink
values.
| utility/geotk-xml-base (download) | View source code for this class |
| Nested Class Summary | |
|---|---|
static class |
XLink.Actuate
Communicates the desired timing of traversal from the starting resource to the ending resource. |
static class |
XLink.Show
Communicates the desired presentation of the ending resource on traversal from the starting resource. |
static class |
XLink.Type
The type of a xlink. |
| Constructor Summary | |
|---|---|
XLink()
Creates a new link. |
|
XLink(XLink link)
Creates a new link as a copy of the given link. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object object)
Compares this XLink with the given object for equality. |
void |
freeze()
Marks this xlink as unmodifiable. |
XLink.Actuate |
getActuate()
Returns the desired timing of traversal from the starting resource to the ending resource. |
URI |
getArcRole()
Returns a URI reference for some description of the arc role. |
String |
getFrom()
Returns the starting resource. |
URI |
getHRef()
Returns a URN to an external resources, or to an other part of a XML document, or an identifier. |
String |
getLabel()
Returns an identification of the target of a from or to attribute. |
URI |
getRole()
Returns a URI reference for some description of the arc role. |
XLink.Show |
getShow()
Returns the desired presentation of the ending resource on traversal from the starting resource. |
InternationalString |
getTitle()
Returns a human-readable string with a short description for the arc. |
String |
getTo()
Returns the ending resource. |
XLink.Type |
getType()
Returns the type of link. |
int |
hashCode()
Returns a hash code value for this XLink. |
void |
setActuate(XLink.Actuate actuate)
Sets the desired timing of traversal from the starting resource to the ending resource. |
void |
setArcRole(URI arcrole)
Sets a URI reference for some description of the arc role. |
void |
setFrom(String from)
Sets the starting resource. |
void |
setHRef(URI href)
Sets the URN to a resources. |
void |
setLabel(String label)
Sets an identification of the target of a from or to attribute. |
void |
setRole(URI role)
Sets the URI reference for some description of the arc role. |
void |
setShow(XLink.Show show)
Sets the desired presentation of the ending resource on traversal from the starting resource. |
void |
setTitle(InternationalString title)
Sets a human-readable string with a short description for the arc. |
void |
setTo(String to)
Sets the ending resource. |
void |
setType(XLink.Type type)
Sets the type of link. |
String |
toString()
Returns a string representation of this object. |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public XLink()
null.
public XLink(XLink link)
link - The link to copy, or null if none.| Method Detail |
|---|
public XLink.Type getType()
The default value is null. If the setType(XLink.Type) method has been
invoked with the AUTO enum, then this method
will infer a type from the attributes having a non-null value.
null.public void setType(XLink.Type type)
Type.AUTO (including null) will overwrite the value inferred automatically by
getType(). A AUTO value will enable automatic type detection.
type - The new type of link, or null if none.public URI getHRef()
Note: This serves a role similar toidref. Theidrefattribute allows an XML element to refer to another XML element that has a correspondingidattribute.
null if none.
public void setHRef(URI href)
throws IllegalStateException
href - A URN to a resources, or null if none.
UnsupportedOperationException - If this xlink is unmodifiable.
IllegalStateException - If the link type has been explicitely set.
and that type does not allow the "href" attribute.public URI getRole()
null if none.
public void setRole(URI role)
throws IllegalStateException
role - A URI reference for some description of the arc role, or null if none.
UnsupportedOperationException - If this xlink is unmodifiable.
IllegalStateException - If the link type has been explicitely set.
and that type does not allow the "role" attribute.public URI getArcRole()
null if none.
public void setArcRole(URI arcrole)
throws IllegalStateException
arcrole - A URI reference for some description of the arc role, or null if none.
UnsupportedOperationException - If this xlink is unmodifiable.
IllegalStateException - If the link type has been explicitely set.
and that type does not allow the "arcrole" attribute.public InternationalString getTitle()
null if none.
public void setTitle(InternationalString title)
throws IllegalStateException
title - A human-readable string with a short description for the arc,
or null if none.
UnsupportedOperationException - If this xlink is unmodifiable.
IllegalStateException - If the link type has been explicitely set.
and that type does not allow the "title" attribute.public XLink.Show getShow()
null if unspecified.
public void setShow(XLink.Show show)
throws IllegalStateException
show - The desired presentation of the ending resource, or null if unspecified.
UnsupportedOperationException - If this xlink is unmodifiable.
IllegalStateException - If the link type has been explicitely set.
and that type does not allow the "show" attribute.public XLink.Actuate getActuate()
null if unspecified.
public void setActuate(XLink.Actuate actuate)
throws IllegalStateException
actuate - The desired timing of traversal from the starting resource to the ending
resource, or null if unspecified.
UnsupportedOperationException - If this xlink is unmodifiable.
IllegalStateException - If the link type has been explicitely set.
and that type does not allow the "actuate" attribute.public String getLabel()
from or to attribute.
from or to attribute, or null.
public void setLabel(String label)
throws IllegalStateException
from or to attribute.
label - An identification of the target of a from or to attribute, or null.
UnsupportedOperationException - If this xlink is unmodifiable.
IllegalStateException - If the link type has been explicitely set.
and that type does not allow the "label" attribute.public String getFrom()
label attribute.
null.
public void setFrom(String from)
throws IllegalStateException
label attribute.
from - The starting resource, or null.
UnsupportedOperationException - If this xlink is unmodifiable.
IllegalStateException - If the link type has been explicitely set.
and that type does not allow the "from" attribute.public String getTo()
label attribute.
null.
public void setTo(String to)
throws IllegalStateException
label attribute.
to - The ending resource, or null.
UnsupportedOperationException - If this xlink is unmodifiable.
IllegalStateException - If the link type has been explicitely set.
and that type does not allow the "to" attribute.public void freeze()
xlink as unmodifiable. After this method call, any call to a setter
method will throw an UnsupportedOperationException.
After the first call to this method, any subsequent calls have no effect.
title attribute could be modifiable...public boolean equals(Object object)
XLink with the given object for equality.
equals in class Objectobject - The object to compare with this XLink.public int hashCode()
hashCode in class Objectpublic String toString()
XLink[type="locator", href="urn:ogc:def:method:EPSG::4326"]
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||