public class MetadataTokenizer extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
adjust |
protected boolean |
inAttrList
Are we in an attribute list?
|
Constructor and Description |
---|
MetadataTokenizer() |
MetadataTokenizer(Reader reader)
Constructor
|
Modifier and Type | Method and Description |
---|---|
static MetadataToken |
buildCloseBraceToken() |
static MetadataToken |
buildCloseParenToken() |
static MetadataToken |
buildIdentifierToken(String identifier) |
static MetadataToken |
buildIdentifierToken(String identifier,
int parentID) |
static MetadataToken |
buildNameToken(String name) |
static MetadataToken |
buildOpenBraceToken() |
static MetadataToken |
buildOpenParenToken() |
static MetadataToken |
buildStringToken(String identifier) |
void |
close()
Closes the underlying reader
|
MetadataToken |
next() |
List<MetadataToken> |
parseTokens()
Parse the sequence of metadata attributes in input and return a list of
MetadataTokens
|
void |
setAdjust(int offset) |
void |
setInput(Reader reader)
Sets the reader that will be used as the input for the data that will be
tokenized.
|
MetadataToken |
transformToken(ASToken token)
transforms an ASToken to a MetaDataToken.
|
protected boolean inAttrList
protected int adjust
public MetadataTokenizer(Reader reader)
public MetadataTokenizer()
public void setInput(Reader reader) throws IOException
reader
- a Reader pointing to a source that will yield textIOException
public void setAdjust(int offset)
public MetadataToken next()
public void close() throws IOException
IOException
public List<MetadataToken> parseTokens()
public final MetadataToken transformToken(ASToken token)
token
- the token to transformpublic static final MetadataToken buildNameToken(String name)
public static final MetadataToken buildIdentifierToken(String identifier, int parentID)
public static final MetadataToken buildOpenBraceToken()
public static final MetadataToken buildCloseBraceToken()
public static final MetadataToken buildOpenParenToken()
public static final MetadataToken buildCloseParenToken()
public static final MetadataToken buildStringToken(String identifier)
public static final MetadataToken buildIdentifierToken(String identifier)
Copyright © 2016 The Apache Software Foundation. All rights reserved.