DLESE Tools
v1.6.0

org.dlese.dpc.xml.schema
Class ReaderStack

java.lang.Object
  extended by org.dlese.dpc.xml.schema.ReaderStack

public class ReaderStack
extends Object

Mains a pushdown stack of SchemaReaders for use in StructureWalker to resolve qualified names and find GobalDef instances from the GlobalDefMap.

Version:
$Id: ReaderStack.java,v 1.3 2009/03/20 23:34:01 jweather Exp $
Author:
ostwald

Constructor Summary
ReaderStack(GlobalDefMap globalDefMap)
          Constructor for the ReaderStack object
 
Method Summary
 void clear()
          NOT YET DOCUMENTED
 boolean contains(String uri)
          NOT YET DOCUMENTED
 GlobalDef getGlobalDef(String typeName)
           
 int getIndexOfItem(String uri)
          Gets the indexOfItem attribute of the ReaderStack object
 SchemaReader getItem(String uri)
          Finds a particular Item from the items list
 SchemaReader getItemAt(int index)
          Gets the itemAt attribute of the ReaderStack object
 List getItems()
          Returns a list of Item instances - one for each element in the choice ReaderStack
 List getItemUris()
          Gets the itemUris attribute of the ReaderStack object
 Namespace getNamespaceForPrefix(String prefix)
          Search the stack (moving from local to more global SchemaReaders) for the namespace belonging to the given prefix.
 SchemaReader getReaderForPrefix(String prefix)
          Traverse the stack to find a SchemaReader that defines a namespace for the given prefix.
static String getReaderUri(SchemaReader reader)
          Gets the readerUri attribute of the ReaderStack class
 SchemaReader getTos()
          Gets the tos attribute of the ReaderStack object
 SchemaReader pop()
          NOT YET DOCUMENTED
static void prtln(String s)
          NOT YET DOCUMENTED
 void push(SchemaReader reader)
          NOT YET DOCUMENTED
 int size()
          NOT YET DOCUMENTED
 String toString()
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReaderStack

public ReaderStack(GlobalDefMap globalDefMap)
Constructor for the ReaderStack object

Method Detail

getReaderForPrefix

public SchemaReader getReaderForPrefix(String prefix)
Traverse the stack to find a SchemaReader that defines a namespace for the given prefix. Return null if a reader is not found.


getNamespaceForPrefix

public Namespace getNamespaceForPrefix(String prefix)
Search the stack (moving from local to more global SchemaReaders) for the namespace belonging to the given prefix.


getItemAt

public SchemaReader getItemAt(int index)
Gets the itemAt attribute of the ReaderStack object

Parameters:
index - NOT YET DOCUMENTED
Returns:
The itemAt value

push

public void push(SchemaReader reader)
NOT YET DOCUMENTED

Parameters:
reader - NOT YET DOCUMENTED

getTos

public SchemaReader getTos()
Gets the tos attribute of the ReaderStack object

Returns:
The tos value

getGlobalDef

public GlobalDef getGlobalDef(String typeName)

pop

public SchemaReader pop()
NOT YET DOCUMENTED

Returns:
NOT YET DOCUMENTED

size

public int size()
NOT YET DOCUMENTED

Returns:
NOT YET DOCUMENTED

getItems

public List getItems()
Returns a list of Item instances - one for each element in the choice ReaderStack

Returns:
The items value

contains

public boolean contains(String uri)
NOT YET DOCUMENTED

Parameters:
uri - NOT YET DOCUMENTED
Returns:
NOT YET DOCUMENTED

getItemUris

public List getItemUris()
Gets the itemUris attribute of the ReaderStack object

Returns:
The itemUris value

getReaderUri

public static String getReaderUri(SchemaReader reader)
Gets the readerUri attribute of the ReaderStack class

Parameters:
reader - NOT YET DOCUMENTED
Returns:
The readerUri value

clear

public void clear()
NOT YET DOCUMENTED


getIndexOfItem

public int getIndexOfItem(String uri)
Gets the indexOfItem attribute of the ReaderStack object

Parameters:
uri - NOT YET DOCUMENTED
Returns:
The indexOfItem value

getItem

public SchemaReader getItem(String uri)
Finds a particular Item from the items list

Parameters:
uri - NOT YET DOCUMENTED
Returns:
The item value

toString

public String toString()
Description of the Method

Overrides:
toString in class Object
Returns:
Description of the Return Value

prtln

public static void prtln(String s)
NOT YET DOCUMENTED

Parameters:
s - NOT YET DOCUMENTED

DLESE Tools
v1.6.0