Class Anchor
java.lang.Object
org.apache.sis.xml.XLink
org.apache.sis.internal.jaxb.gcx.Anchor
- All Implemented Interfaces:
Serializable, CharSequence, Comparable<org.opengis.util.InternationalString>, org.opengis.util.InternationalString
The
Anchor element, which is included in CharacterString elements.
In XML documents, anchors are values with XLink attributes used in places
where we would normally expect a character sequence. Since Java properties of type
CharSequence cannot return XLink, we workaround that restriction
by providing this Anchor class as a XLink subtype implementing the
InternationalString interface, so it can be used with the above-cited Java
properties.- Since:
- 0.3
- Version:
- 0.8
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class XLink
XLink.Actuate, XLink.Show, XLink.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longDefined as a matter of principle (this class is not expected to be serialized).private StringOften a short textual description of the URI target. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncharcharAt(int index) Returns the character at the given index.intcompareTo(org.opengis.util.InternationalString other) Compares the value of this object with the given international string for order.booleanCompares thisAnchorwith the given object for equality.inthashCode()Returns a hash code value for this anchor type.intlength()Returns the number of characters in the value.subSequence(int start, int end) Returns the sequence of characters in the given range of index.toString()Returns the text as a string, ornullif none.Returns the text as a string, ornullif none.Methods inherited from class XLink
freeze, getActuate, getArcRole, getFrom, getHRef, getLabel, getRole, getShow, getTitle, getTo, getType, setActuate, setArcRole, setFrom, setHRef, setLabel, setRole, setShow, setTitle, setTo, setTypeMethods inherited from interface CharSequence
chars, codePoints
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDDefined as a matter of principle (this class is not expected to be serialized).- See Also:
-
value
Often a short textual description of the URI target. This is the value returned bytoString().
-
-
Constructor Details
-
Anchor
public Anchor()Creates a uninitializedAnchor. This constructor is required by JAXB. -
Anchor
-
Anchor
-
-
Method Details
-
toString
Returns the text as a string, ornullif none. The null value is needed for proper working ofGO_CharacterString.toString()method.- Specified by:
toStringin interfaceCharSequence- Specified by:
toStringin interfaceorg.opengis.util.InternationalString- Overrides:
toStringin classXLink
-
toString
-
length
public int length()Returns the number of characters in the value.- Specified by:
lengthin interfaceCharSequence
-
charAt
public char charAt(int index) Returns the character at the given index.- Specified by:
charAtin interfaceCharSequence
-
subSequence
Returns the sequence of characters in the given range of index. The returned object is an anchor with the same attribute values. It is caller responsibility to determine if those attributes are still appropriate for the sub-sequence.- Specified by:
subSequencein interfaceCharSequence
-
compareTo
public int compareTo(org.opengis.util.InternationalString other) Compares the value of this object with the given international string for order. Null values are sorted last.- Specified by:
compareToin interfaceComparable<org.opengis.util.InternationalString>- Parameters:
other- the string to compare with this anchor type.
-
equals
-
hashCode
-