Package net.sf.saxon.serialize
Class CharacterMapIndex
- java.lang.Object
-
- net.sf.saxon.serialize.CharacterMapIndex
-
- All Implemented Interfaces:
java.lang.Iterable<CharacterMap>
public class CharacterMapIndex extends java.lang.Object implements java.lang.Iterable<CharacterMap>
This class represents a set of named character maps. Each character map in the set is identified by a unique QName.
-
-
Constructor Summary
Constructors Constructor Description CharacterMapIndex()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CharacterMapIndex
copy()
Copy this character map indexCharacterMap
getCharacterMap(StructuredQName name)
Get the character map with a given nameboolean
isEmpty()
Ask if the character map index is emptyjava.util.Iterator<CharacterMap>
iterator()
Get an iterator over all the character maps in the indexCharacterMapExpander
makeCharacterMapExpander(java.lang.String useMaps, Receiver next, SerializerFactory sf)
Make a CharacterMapExpander to handle the character map definitions in the serialization properties.void
putCharacterMap(StructuredQName name, CharacterMap charMap)
Add a character map with a given name
-
-
-
Method Detail
-
getCharacterMap
public CharacterMap getCharacterMap(StructuredQName name)
Get the character map with a given name- Parameters:
name
- the name of the required character map- Returns:
- the requested character map if present, or null otherwise
-
putCharacterMap
public void putCharacterMap(StructuredQName name, CharacterMap charMap)
Add a character map with a given name- Parameters:
name
- the name of the character mapcharMap
- the character map to be added
-
iterator
public java.util.Iterator<CharacterMap> iterator()
Get an iterator over all the character maps in the index- Specified by:
iterator
in interfacejava.lang.Iterable<CharacterMap>
- Returns:
- an iterator over the character maps
-
isEmpty
public boolean isEmpty()
Ask if the character map index is empty- Returns:
- true if the character map index contains no character maps
-
copy
public CharacterMapIndex copy()
Copy this character map index- Returns:
- a new character map index with the same contents. The character maps themselves are immutable and do not need to be copied
-
makeCharacterMapExpander
public CharacterMapExpander makeCharacterMapExpander(java.lang.String useMaps, Receiver next, SerializerFactory sf) throws XPathException
Make a CharacterMapExpander to handle the character map definitions in the serialization properties.This method is intended for internal use only.
- Parameters:
useMaps
- the expanded use-character-maps property: a space-separated list of names of character maps to be used, each one expressed as an expanded-QName in Clark notation (that is, {uri}local-name).next
- the next receiver in the pipelinesf
- the SerializerFactory - used to create a CharacterMapExpander. This callback is provided so that a user-defined SerializerFactory can customize the result of this function, for example by returning a subclass of the standard CharacterMapExpander.- Returns:
- a CharacterMapExpander if one is required, or null if not (for example, if the useMaps argument is an empty string).
- Throws:
XPathException
- if a name in the useMaps property cannot be resolved to a declared character map.
-
-