EXIficient

com.siemens.ct.exi.datatype.stringtable
Class StringTableDecoderImpl

java.lang.Object
  extended by com.siemens.ct.exi.datatype.stringtable.AbstractStringTable
      extended by com.siemens.ct.exi.datatype.stringtable.StringTableDecoderImpl
All Implemented Interfaces:
StringTableCommon, StringTableDecoder

public class StringTableDecoderImpl
extends AbstractStringTable
implements StringTableDecoder

TODO Description

Version:
0.3.20080915
Author:
Daniel.Peintner.EXT@siemens.com, Joerg.Heuer@siemens.com

Constructor Summary
StringTableDecoderImpl(boolean isSchemaInformed)
          The constructor will set all tables to their initial states.
 
Method Summary
 void addGlobalValue(java.lang.String value)
          Add a string value to the global value table.
 void addLocalName(java.lang.String uri, java.lang.String name)
          Add a name to the local name table.
 void addLocalValue(java.lang.String uri, java.lang.String localName, java.lang.String value)
          Add a value to the local value table.
 void addPrefix(java.lang.String uri, java.lang.String prefix)
          Add a prefix to the namespace prefix table.
 void addURI(java.lang.String uri)
          Add a URI to the URI table.
 java.lang.String getGlobalValue(int id)
          Get global value using the ID as the key.
 int getGlobalValueTableSize()
          Get the current size the global value table.
 int getLocalNameTableSize(java.lang.String uri)
          Get size of the local name table partition for a given URI.
 java.lang.String getLocalNameValue(java.lang.String uri, int id)
          Get string value of local name given URI and ID.
 java.lang.String getLocalValue(java.lang.String uri, java.lang.String localName, int id)
          Get string value of local value given QName and ID.
 int getLocalValueTableSize(java.lang.String uri, java.lang.String localName)
          Get size of the localName table partition identified by QName.
 int getPrefixTableSize(java.lang.String uri)
          Get the size of the prefix table partition identified by URI.
 java.lang.String getPrefixValue(java.lang.String uri, int id)
          Get string value of prefix given URI and prefix ID.
 int getURITableSize()
          Get the size of the URI table.
 java.lang.String getURIValue(int id)
          Get the URI string value using the ID as the key.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringTableDecoderImpl

public StringTableDecoderImpl(boolean isSchemaInformed)
The constructor will set all tables to their initial states. This includes loading the tables with inital values.

Method Detail

getURIValue

public java.lang.String getURIValue(int id)
Description copied from interface: StringTableDecoder
Get the URI string value using the ID as the key.

Specified by:
getURIValue in interface StringTableDecoder
Parameters:
id - - Identifier of URI in table.
Returns:
URI string value or null if URI not found.

getPrefixValue

public java.lang.String getPrefixValue(java.lang.String uri,
                                       int id)
Description copied from interface: StringTableDecoder
Get string value of prefix given URI and prefix ID.

Specified by:
getPrefixValue in interface StringTableDecoder
Parameters:
uri - - Namespace URI.
id - - Namespace identifier (table index).
Returns:
- Prefix value or null if not found.

getLocalNameValue

public java.lang.String getLocalNameValue(java.lang.String uri,
                                          int id)
Description copied from interface: StringTableDecoder
Get string value of local name given URI and ID.

Specified by:
getLocalNameValue in interface StringTableDecoder
Parameters:
uri - - Namespace URI.
id - - Identifier (table index) of local name.
Returns:
- Local name or null if not found.

getLocalValue

public java.lang.String getLocalValue(java.lang.String uri,
                                      java.lang.String localName,
                                      int id)
Description copied from interface: StringTableDecoder
Get string value of local value given QName and ID.

Specified by:
getLocalValue in interface StringTableDecoder
Parameters:
uri - - namespace URI
localName - - local-name
id - - Identifier (table index) of local name.
Returns:
- Local value or null if not found.

getGlobalValue

public java.lang.String getGlobalValue(int id)
Description copied from interface: StringTableDecoder
Get global value using the ID as the key.

Specified by:
getGlobalValue in interface StringTableDecoder
Parameters:
id - - Identifier of global value in table.
Returns:
String value or null if not found.

addURI

public void addURI(java.lang.String uri)
Description copied from interface: StringTableCommon
Add a URI to the URI table.

Specified by:
addURI in interface StringTableCommon
Parameters:
uri - - URI to be added.

getURITableSize

public int getURITableSize()
Description copied from interface: StringTableCommon
Get the size of the URI table.

Specified by:
getURITableSize in interface StringTableCommon

addPrefix

public void addPrefix(java.lang.String uri,
                      java.lang.String prefix)
Description copied from interface: StringTableCommon
Add a prefix to the namespace prefix table.

Specified by:
addPrefix in interface StringTableCommon
Parameters:
uri - - Namespace URI.
prefix - - Namespace prefix to be added.

getPrefixTableSize

public int getPrefixTableSize(java.lang.String uri)
Description copied from interface: StringTableCommon
Get the size of the prefix table partition identified by URI.

Specified by:
getPrefixTableSize in interface StringTableCommon
Parameters:
uri - - Namespace URI.
Returns:
- Current number of items (strings) in the table.

addLocalName

public void addLocalName(java.lang.String uri,
                         java.lang.String name)
Description copied from interface: StringTableCommon
Add a name to the local name table.

Specified by:
addLocalName in interface StringTableCommon
Parameters:
uri - - Namespace URI.
name - - Name to be added.

getLocalNameTableSize

public int getLocalNameTableSize(java.lang.String uri)
Description copied from interface: StringTableCommon
Get size of the local name table partition for a given URI.

Specified by:
getLocalNameTableSize in interface StringTableCommon
Parameters:
uri - - Namespace URI.
Returns:
- Number of items (strings) in the table.

addLocalValue

public void addLocalValue(java.lang.String uri,
                          java.lang.String localName,
                          java.lang.String value)
Description copied from interface: StringTableCommon
Add a value to the local value table.

Specified by:
addLocalValue in interface StringTableCommon
Parameters:
uri - - Namespace URI
localName - - local-name
value - - String value to be added.

getLocalValueTableSize

public int getLocalValueTableSize(java.lang.String uri,
                                  java.lang.String localName)
Description copied from interface: StringTableCommon
Get size of the localName table partition identified by QName.

Specified by:
getLocalValueTableSize in interface StringTableCommon
Parameters:
uri - - Namespace URI
localName - - local-name
Returns:
- Number of items (strings) in table.

addGlobalValue

public void addGlobalValue(java.lang.String value)
Description copied from interface: StringTableCommon
Add a string value to the global value table.

Specified by:
addGlobalValue in interface StringTableCommon
Parameters:
value - - Value to be added.

getGlobalValueTableSize

public int getGlobalValueTableSize()
Description copied from interface: StringTableCommon
Get the current size the global value table.

Specified by:
getGlobalValueTableSize in interface StringTableCommon
Returns:
Number of items (strings) in the table.

EXIficient