Package net.sf.saxon.expr
Class CollationMap
java.lang.Object
net.sf.saxon.expr.CollationMap
- All Implemented Interfaces:
Serializable
This object maps collation URIs to collations. Logically this function is part of the static
context, but it is often needed dynamically, so it is defined as a separate component that can
safely be retained at run-time.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCollationMap
(Configuration config) Create a collation mapCreate a copy of a collation map -
Method Summary
Modifier and TypeMethodDescriptionGet the default collationGet the name of the default collationgetNamedCollation
(String name) Get the collation with a given collation name.void
Set the name of the default collationvoid
setNamedCollation
(String absoluteURI, StringCollator collator) Register a named collation
-
Constructor Details
-
CollationMap
Create a collation map- Parameters:
config
- the Saxon configuration
-
CollationMap
Create a copy of a collation map- Parameters:
in
- the collation map to be copied
-
-
Method Details
-
setDefaultCollationName
Set the name of the default collation- Parameters:
name
- the default collation name (should be a URI, but this is not enforced)- Throws:
NullPointerException
- if the supplied name is null
-
getDefaultCollationName
Get the name of the default collation- Returns:
- the default collation name (should be a URI, but this is not enforced)
-
getDefaultCollation
Get the default collation- Returns:
- the default collation, as a StringCollator
-
setNamedCollation
Register a named collation- Parameters:
absoluteURI
- the name of the collation. This should be an absolute URI, but this is not enforcedcollator
- the StringCollator that implements the collating rules
-
getNamedCollation
Get the collation with a given collation name. If the collation name has not been registered in this CollationMap, the CollationURIResolver registered with the Configuration is called. If this cannot resolve the collation name, it should return null.- Parameters:
name
- the collation name (should be an absolute URI)- Returns:
- the StringCollator with this name if known, or null if not known
-