|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface represents internal state of
TokenizerWrapper
. This state is
used by TokenizerWrapper to implement functions
inherited from Tokenizer
interface.
TokenzierWrapper
provides implementation
of this interface (DefaultTokenizerState
) but
you can implement this interface in a different way.
You can manipulate internal state of TokenzierWrapper
with TokenizerWrapper.getCurrentState()
and
TokenizerWrapper.setCurrentState(org.idoox.xml.TokenizerWrapper.TokenizerState)
methods. It is also possible
to use 'shortcut' functions declared directly on TokenizerWrapper
(e.g. TokenizerWrapper.setCurrentToken(org.idoox.xml.Token)
).
It could be more efficient to provide your own implementation
because you can provide a 'lazy implementation' which computes
things when they are really needed (e.g. the array of new prefixes).
DefaultTokenizerState
Method Summary | |
java.lang.String |
getContent()
Returns content which is used by TokenizerWrapper
to implement Tokenizer.readContent() .Note that this function is used only if type of token returned by getToken() is Tokenizer.CONTENT . |
java.util.Map |
getNamespaceDeclarations()
Returns map of namespace prefixes (mapping from prefixes to namespace URIs). |
java.util.Map |
getNewNamespaceDeclarations()
Returns map of newly declared namespace prefixes (complete mapping is defined by prefix map of underlying tokenizer and this map). |
java.lang.String[] |
getNewPrefixes()
Returns array of newly declared prefixes. |
Token |
getToken()
Returns token which will be used by TokenizerWrapper
to implement functions of Tokenizer (e.g. |
Method Detail |
public Token getToken()
TokenizerWrapper
to implement functions of Tokenizer
(e.g. Tokenizer.readToken(org.idoox.xml.Token)
,
Tokenizer.getLocalName()
, ...).
public java.lang.String getContent()
TokenizerWrapper
to implement Tokenizer.readContent()
.getToken()
is Tokenizer.CONTENT
.
public java.util.Map getNamespaceDeclarations()
getNewPrefixes()
must be
defined.
public java.util.Map getNewNamespaceDeclarations()
getNewPrefixes()
function
won't be used.
public java.lang.String[] getNewPrefixes()
getNamespaceDeclarations()
returns non-null this
function must return array of prefixes which are newly declared
(were not declared on the start token of the parent element).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |