Package org.apache.sis.xml
Enum XPointer
- All Implemented Interfaces:
Serializable
,Comparable<XPointer>
,java.lang.constant.Constable
Parsers of pointers in x-paths, adapted to the syntax found in GML documents.
- Since:
- 1.2
- Version:
- 1.3
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
endOfURI
(CharSequence uri, int offset) If the given character sequences seems to be a URI, returns the presumed end of that URN.Parses a URL which contains a pointer to a XML fragment.private int
startOfFragment
(String url) Returns the index where the document fragment starts in the given URL, or -1 if none.static XPointer
Returns the enum constant of this type with the specified name.static XPointer[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
UOM
Pointer to units of measurement. Example:"http://www.isotc211.org/2005/resources/uom/gmxUom.xml#xpointer(//*[@gml:id='m'])"
)
-
-
Field Details
-
documents
The documents expected at the end of the URL, before the fragment. One of those document should be present. -
identifier
The text prefixing the identifier.
-
-
Constructor Details
-
XPointer
Creates a new enumeration value.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
startOfFragment
Returns the index where the document fragment starts in the given URL, or -1 if none. For now we accept any path as long as it ends with the"gmxUom.xml"
file (for example) because resources may be hosted on different servers, or the path may be relative instead of absolute. -
reference
Parses a URL which contains a pointer to a XML fragment. The current implementation recognizes the following examples:UOM
:"http://www.isotc211.org/2005/resources/uom/gmxUom.xml#xpointer(//*[@gml:id='m'])"
)
- Parameters:
url
- the URL to parse.- Returns:
- the reference, or
null
if none.
-
endOfURI
If the given character sequences seems to be a URI, returns the presumed end of that URN. Otherwise returns -1. Examples:"urn:ogc:def:uom:EPSG::9001"
"http://www.isotc211.org/2005/resources/uom/gmxUom.xml#xpointer(//*[@gml:id='m'])"
- Parameters:
uri
- the URI candidate to verify.offset
- index of the first character to verify.- Returns:
- index after the last character of the presumed URI, or -1 if this method thinks that the given character sequence is not a URI.
-