SymbolTable
and returns the contents as if the table was serialized
in Ion in a standard fashion (in fact this serialization
defines the "standard fashion").
This does not support open content in symbol tables and
should. Support for open content will require additional
data be kept in the SymbolTable, probably as an
IonStruct or an IonReader or binary buffer.
The reader uses the _state member to track its progress
through the members of the outer struct, the import
list and the symbol list. It used _idx to track its
progress thought the elements of the import list and
the elements of the symbol list.
These are the states in a local symbol table:
| Modifier and Type | Class and Description |
|---|---|
| private static enum |
| Modifier and Type | Field and Description |
|---|---|
| private SymbolTable | |
| pack-priv int | _current_state
_state tracks the progress through the various members, including the substructures in the import list and symbol list. |
| pack-priv int | _flags
state variables that hold the values referenced by the current reader position. |
| private Iterator | |
| private SymbolTable[] | |
| pack-priv long | |
| pack-priv Iterator | |
| private final int | |
| pack-priv String | |
| private final SymbolTable | _symbol_table
The symbol table we are reading. |
| private static final int | |
| private static final int | |
| private static final int | HAS_NAME
these define the bit masked flags used to inform iteration over the optional values that may be present |
| private static final int | |
| private static final int | |
| private static final SymbolToken | |
| private static final SymbolToken | |
| pack-priv static final int | |
| pack-priv static final int | S_BOF
these are the states of the reader. |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public <T> T | Returns: This implementation always returns null.The type token of the requested facet type. facetType)Implements com. Returns a facet of this subject if supported. |
| public BigDecimal | bigDecimalValue()
Implements com. Returns the current value as a |
| public BigInteger | bigIntegerValue()
Implements com. Returns the current value as a |
| public boolean | booleanValue()
Implements com. Returns the current value as an boolean. |
| public int | byteSize()
Implements com. Gets the size in bytes of the current lob value. |
| public void | close()
Implements java. Closes this stream and releases any system resources associated with it. |
| public Date | dateValue()
Implements com. Returns the current value as a |
| public Decimal | decimalValue()
Implements com. Returns the current value as a |
| public double | doubleValue()
Implements com. Returns the current value as a double. |
| private static final String | |
| public int | getBytes(byte[]
destination to copy the value into, this must not be null. buffer, int the first position to copy into, this must be non null and
less than the length of buffer. offset, int the number of bytes available in the buffer to copy into,
this must be long enough to hold the whole value and not extend outside
of buffer. len)Implements com. Copies the current value into the passed in a byte array. |
| public int | getDepth()
Implements com. Returns the depth into the Ion value that this reader has traversed. |
| public int | getFieldId()
Implements com. /** Gets the symbol ID of the field name attached to the current value. |
| public String | getFieldName()
Implements com. Return the field name of the current value. |
| public SymbolToken | getFieldNameSymbol()
Implements com. Gets the current value's field name as a symbol token (text + ID). |
| public IntegerSize | getIntegerSize()
Implements com. Returns an |
| public SymbolTable | getSymbolTable()
Implements com. Returns the symbol table that is applicable to the current value. |
| public IonType | getType()
Implements com. Returns the type of the current value, or null if there is no current value. |
| public String[] | getTypeAnnotations()
Implements com. Return the annotations of the current value as an array of strings. |
| public SymbolToken[] | getTypeAnnotationSymbols()
Implements com. Gets the current value's annotations as symbol tokens (text + ID). |
| private final boolean | |
| pack-priv final boolean | |
| pack-priv final boolean | |
| pack-priv final boolean | |
| pack-priv final boolean | |
| public boolean | hasNext()
Implements com. Determines whether there is another value at the current depth;
in other words whether there is a sibling value that may be reached
using |
| pack-priv final boolean | |
| public int | |
| public boolean | isInStruct()
Implements com. Determines whether this reader is currently traversing the fields of an Ion struct. |
| public boolean | isNullValue()
Implements com. Determines whether the current value is a null Ion value of any type
(for example, |
| public Iterator | iterateTypeAnnotations()
Implements com. Return the annotations on the curent value as an iterator. |
| private final void | |
| public long | |
| public byte[] | newBytes()
Implements com. Returns the current value as a newly-allocated byte array. |
| public IonType | next()
Implements com. this computes the actual move to the next state It does take into account the existence or absence of various properties, such as the symbol table name which is only present in some symbol tables. |
| private final int | |
| private final void | |
| pack-priv static final int | |
| private final int | |
| private final int | |
| private final int | |
| private final int | |
| pack-priv static final IonType | |
| public void | stepIn()
Implements com. Positions the reader just before the contents of the current value, which must be a container (list, sexp, or struct). |
| public void | stepOut()
Implements com. Positions the iterator after the current parent's value, moving up one level in the data hierarchy. |
| public String | stringValue()
Implements com. Returns the current value as a Java String. |
| public SymbolToken | symbolValue()
Implements com. Returns the current value as a symbol token (text + ID). |
| private final boolean | |
| private static final void | |
| public Timestamp | timestampValue()
Implements com. Returns the current value as a |
| _current_import | back to summary |
|---|---|
| private SymbolTable _current_import | |
| _current_state | back to summary |
|---|---|
| pack-priv int _current_state _state tracks the progress through the various members, including the substructures in the import list and symbol list. The previous state is needed when we run into an end of container. | |
| _flags | back to summary |
|---|---|
| pack-priv int _flags state variables that hold the values referenced by the current reader position. These are filled in by nextStateDepthFirst() and used by the value getting methods. The iterators are opened when the user steps into one of the two lists (imports and symbols). | |
| _import_iterator | back to summary |
|---|---|
| private Iterator<SymbolTable> _import_iterator | |
| _imported_tables | back to summary |
|---|---|
| private SymbolTable[] _imported_tables | |
| _int_value | back to summary |
|---|---|
| pack-priv long _int_value | |
| _local_symbols | back to summary |
|---|---|
| pack-priv Iterator<String> _local_symbols | |
| _maxId | back to summary |
|---|---|
| private final int _maxId | |
| _string_value | back to summary |
|---|---|
| pack-priv String _string_value | |
| _symbol_table | back to summary |
|---|---|
| private final SymbolTable _symbol_table The symbol table we are reading. We MUST NOT call methods whose value may change! Otherwise there's a thread-safety problem. | |
| HAS_IMPORT_LIST | back to summary |
|---|---|
| private static final int HAS_IMPORT_LIST | |
| HAS_MAX_ID | back to summary |
|---|---|
| private static final int HAS_MAX_ID | |
| HAS_NAME | back to summary |
|---|---|
| private static final int HAS_NAME these define the bit masked flags used to inform iteration over the optional values that may be present | |
| HAS_SYMBOL_LIST | back to summary |
|---|---|
| private static final int HAS_SYMBOL_LIST | |
| HAS_VERSION | back to summary |
|---|---|
| private static final int HAS_VERSION | |
| ION_SHARED_SYMBOL_TABLE_SYM | back to summary |
|---|---|
| private static final SymbolToken ION_SHARED_SYMBOL_TABLE_SYM | |
| ION_SYMBOL_TABLE_SYM | back to summary |
|---|---|
| private static final SymbolToken ION_SYMBOL_TABLE_SYM | |
| S_AFTER_IMPORT_LIST | back to summary |
|---|---|
| pack-priv static final int S_AFTER_IMPORT_LIST | |
| S_BOF | back to summary |
|---|---|
| pack-priv static final int S_BOF these are the states of the reader. Each state tells the reader it is just before (or on as you might want to think about it) one of the possible values in the serialized image. | |
| S_EOF | back to summary |
|---|---|
| pack-priv static final int S_EOF | |
| S_IMPORT_LIST | back to summary |
|---|---|
| pack-priv static final int S_IMPORT_LIST | |
| S_IMPORT_LIST_CLOSE | back to summary |
|---|---|
| pack-priv static final int S_IMPORT_LIST_CLOSE | |
| S_IMPORT_MAX_ID | back to summary |
|---|---|
| pack-priv static final int S_IMPORT_MAX_ID | |
| S_IMPORT_NAME | back to summary |
|---|---|
| pack-priv static final int S_IMPORT_NAME | |
| S_IMPORT_STRUCT | back to summary |
|---|---|
| pack-priv static final int S_IMPORT_STRUCT | |
| S_IMPORT_STRUCT_CLOSE | back to summary |
|---|---|
| pack-priv static final int S_IMPORT_STRUCT_CLOSE | |
| S_IMPORT_VERSION | back to summary |
|---|---|
| pack-priv static final int S_IMPORT_VERSION | |
| S_IN_IMPORT_STRUCT | back to summary |
|---|---|
| pack-priv static final int S_IN_IMPORT_STRUCT | |
| S_IN_IMPORTS | back to summary |
|---|---|
| pack-priv static final int S_IN_IMPORTS | |
| S_IN_STRUCT | back to summary |
|---|---|
| pack-priv static final int S_IN_STRUCT | |
| S_IN_SYMBOLS | back to summary |
|---|---|
| pack-priv static final int S_IN_SYMBOLS | |
| S_MAX_ID | back to summary |
|---|---|
| pack-priv static final int S_MAX_ID | |
| S_NAME | back to summary |
|---|---|
| pack-priv static final int S_NAME | |
| S_STRUCT | back to summary |
|---|---|
| pack-priv static final int S_STRUCT | |
| S_STRUCT_CLOSE | back to summary |
|---|---|
| pack-priv static final int S_STRUCT_CLOSE | |
| S_SYMBOL | back to summary |
|---|---|
| pack-priv static final int S_SYMBOL | |
| S_SYMBOL_LIST | back to summary |
|---|---|
| pack-priv static final int S_SYMBOL_LIST | |
| S_SYMBOL_LIST_CLOSE | back to summary |
|---|---|
| pack-priv static final int S_SYMBOL_LIST_CLOSE | |
| S_VERSION | back to summary |
|---|---|
| pack-priv static final int S_VERSION | |
| SymbolTableReader | back to summary |
|---|---|
| public SymbolTableReader(SymbolTable symbol_table) | |
| asFacet | back to summary |
|---|---|
| public <T> T asFacet(Class<T> facetType) Implements com. Doc from com. Returns a facet of this subject if supported.
| |
| bigDecimalValue | back to summary |
|---|---|
| public BigDecimal bigDecimalValue() Implements com. Doc from com. Returns the current value as a
This method is only valid when
| |
| bigIntegerValue | back to summary |
|---|---|
| public BigInteger bigIntegerValue() Implements com. Doc from com. Returns the current value as a | |
| booleanValue | back to summary |
|---|---|
| public boolean booleanValue() Implements com. Doc from com. Returns the current value as an boolean.
This is only valid when | |
| byteSize | back to summary |
|---|---|
| public int byteSize() Implements com. Doc from com. Gets the size in bytes of the current lob value.
This is only valid when
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| dateValue | back to summary |
|---|---|
| public Date dateValue() Implements com. Doc from com. Returns the current value as a | |
| decimalValue | back to summary |
|---|---|
| public Decimal decimalValue() Implements com. Doc from com. Returns the current value as a | |
| doubleValue | back to summary |
|---|---|
| public double doubleValue() Implements com. Doc from com. Returns the current value as a double. This is only valid if there is an underlying value and the value is either float, or decimal. | |
| get_state_name | back to summary |
|---|---|
| private static final String get_state_name(int state) | |
| getBytes | back to summary |
|---|---|
| public int getBytes(byte[] buffer, int offset, int len) Implements com. Doc from com. Copies the current value into the passed in a byte array.
This is only valid when
| |
| getDepth | back to summary |
|---|---|
| public int getDepth() Implements com. Doc from com. Returns the depth into the Ion value that this reader has traversed.
At top level the depth is 0, and it increases by one on each call to
| |
| getFieldId | back to summary |
|---|---|
| public int getFieldId() Implements com. Doc from com. /** Gets the symbol ID of the field name attached to the current value. This is an "expert method": correct use requires deep understanding of the Ion binary format. You almost certainly don't want to use it.
| |
| getFieldName | back to summary |
|---|---|
| public String getFieldName() Implements com. Doc from com. Return the field name of the current value. Or null if there is no valid current value or if the current value is not a field of a struct. | |
| getFieldNameSymbol | back to summary |
|---|---|
| public SymbolToken getFieldNameSymbol() Implements com. Doc from com. Gets the current value's field name as a symbol token (text + ID).
If the text of the token isn't known, the result's
| |
| getIntegerSize | back to summary |
|---|---|
| public IntegerSize getIntegerSize() Implements com. Doc from com. Returns an | |
| getSymbolTable | back to summary |
|---|---|
| public SymbolTable getSymbolTable() Implements com. Doc from com. Returns the symbol table that is applicable to the current value. This may be either a system or local symbol table. | |
| getType | back to summary |
|---|---|
| public IonType getType() Implements com. Doc from com. Returns the type of the current value, or null if there is no current value. | |
| getTypeAnnotations | back to summary |
|---|---|
| public String[] getTypeAnnotations() Implements com. Doc from com. Return the annotations of the current value as an array of strings.
| |
| getTypeAnnotationSymbols | back to summary |
|---|---|
| public SymbolToken[] getTypeAnnotationSymbols() Implements com. Doc from com. Gets the current value's annotations as symbol tokens (text + ID).
| |
| has_next_helper | back to summary |
|---|---|
| private final boolean has_next_helper() | |
| hasImports | back to summary |
|---|---|
| pack-priv final boolean hasImports() | |
| hasLocalSymbols | back to summary |
|---|---|
| pack-priv final boolean hasLocalSymbols() | |
| hasMaxId | back to summary |
|---|---|
| pack-priv final boolean hasMaxId() | |
| hasName | back to summary |
|---|---|
| pack-priv final boolean hasName() | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements com. Doc from com. Determines whether there is another value at the current depth;
in other words whether there is a sibling value that may be reached
using Warning this method alters the internal state of the reader such
that you cannot reliably get values from the "current" element. The only
thing you should call after | |
| hasVersion | back to summary |
|---|---|
| pack-priv final boolean hasVersion() | |
| intValue | back to summary |
|---|---|
| public int intValue() Implements com. Doc from com. Returns the current value as an int. This is only valid if there is an underlying value and the value is of a numeric type (int, float, or decimal). | |
| isInStruct | back to summary |
|---|---|
| public boolean isInStruct() Implements com. Doc from com. Determines whether this reader is currently traversing the fields of an Ion struct. It returns false if the iteration is in a list, a sexp, or a datagram. | |
| isNullValue | back to summary |
|---|---|
| public boolean isNullValue() Implements com. Doc from com. Determines whether the current value is a null Ion value of any type
(for example, | |
| iterateTypeAnnotations | back to summary |
|---|---|
| public Iterator Implements com. Doc from com. Return the annotations on the curent value as an iterator. The iterator is empty (hasNext() returns false on the first call) if there are no annotations on the current value.
Implementations *may* throw Note the iterator returned by this method is only valid while
the reader remains positioned on the current value (i.e., before
next, step in, or step out). Use cases that require storing a
value's annotations after advancing past that value should either
copy them from the iterator or call | |
| loadStateData | back to summary |
|---|---|
| private final void loadStateData(int new_state) | |
| longValue | back to summary |
|---|---|
| public long longValue() Implements com. Doc from com. Returns the current value as a long. This is only valid if there is an underlying value and the value is of a numeric type (int, float, or decimal). | |
| newBytes | back to summary |
|---|---|
| public byte[] newBytes() Implements com. Doc from com. Returns the current value as a newly-allocated byte array.
This is only valid when | |
| next | back to summary |
|---|---|
| public IonType next() Implements com. this computes the actual move to the next state It does take into account the existence or absence of various properties, such as the symbol table name which is only present in some symbol tables. This also fills in a variety of current state variables that are used to return correct values by the "get" methods.
| |
| nextImport | back to summary |
|---|---|
| private final int nextImport() | |
| set_flag | back to summary |
|---|---|
| private final void set_flag(int flag_bit, boolean flag_state) | |
| stateDepth | back to summary |
|---|---|
| pack-priv static final int stateDepth(int state) | |
| stateFirstInStruct | back to summary |
|---|---|
| private final int stateFirstInStruct() | |
| stateFollowingImportList | back to summary |
|---|---|
| private final int stateFollowingImportList(SymbolTableReader. | |
| stateFollowingLocalSymbols | back to summary |
|---|---|
| private final int stateFollowingLocalSymbols() | |
| stateFollowingMaxId | back to summary |
|---|---|
| private final int stateFollowingMaxId() | |
| stateType | back to summary |
|---|---|
| pack-priv static final IonType stateType(int state) | |
| stepIn | back to summary |
|---|---|
| public void stepIn() Implements com. Doc from com. Positions the reader just before the contents of the current value,
which must be a container (list, sexp, or struct).
There's no current value immediately after stepping in, so the next
thing you'll want to do is call
Stepping into a null container (
At any time | |
| stepOut | back to summary |
|---|---|
| public void stepOut() Implements com. Doc from com. Positions the iterator after the current parent's value, moving up one
level in the data hierarchy.
There's no current value immediately after stepping out, so the next
thing you'll want to do is call | |
| stringValue | back to summary |
|---|---|
| public String stringValue() Implements com. Doc from com. Returns the current value as a Java String.
This is only valid when | |
| symbolValue | back to summary |
|---|---|
| public SymbolToken symbolValue() Implements com. Doc from com. Returns the current value as a symbol token (text + ID).
This is only valid when
| |
| test_flag | back to summary |
|---|---|
| private final boolean test_flag(int flag_bit) | |
| throwUnrecognizedState | back to summary |
|---|---|
| private static final void throwUnrecognizedState(int state) | |
| timestampValue | back to summary |
|---|---|
| public Timestamp timestampValue() Implements com. Doc from com. Returns the current value as a | |
| Modifier and Type | Field and Description |
|---|---|
| public static final SymbolTableReader. | |
| public static final SymbolTableReader. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static SymbolTableReader. | |
| public static SymbolTableReader. |
| NEXT | back to summary |
|---|---|
| public static final SymbolTableReader. | |
| STEPOUT | back to summary |
|---|---|
| public static final SymbolTableReader. | |
| Op | back to summary |
|---|---|
| private Op() | |
| valueOf | back to summary |
|---|---|
| public static SymbolTableReader. | |
| values | back to summary |
|---|---|
| public static SymbolTableReader. | |