Package jadex.xml.reader
Class AReadContext
- java.lang.Object
-
- jadex.xml.reader.AReadContext
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.Object,java.lang.Integer>
arrayinfos
The map or array information.protected java.lang.Object
callcontext
The call context.protected MultiCollection<java.lang.Object,LinkData>
children
The map of objects to link in bulk mode (object -> map of tags -> objects per tag).protected java.lang.ClassLoader
classloader
The classloader.protected java.lang.String
comment
The current comment.protected IObjectReaderHandler
defaulthandler
The default object handler.protected IXMLReader
parser
The parser.protected TypeInfoPathManager
pathmanager
The type info path manager.protected MultiCollection<java.lang.Integer,IPostProcessorCall>
postprocessors
The post processors.protected int
readignore
The readignore counter (0=do not ignore).protected java.util.Map<java.lang.String,java.lang.Object>
readobjects
The read objects per id.protected XMLReporter
reporter
The parser.protected java.lang.Object
rootobject
The root object.protected java.util.List<StackElement>
stack
The stack.
-
Constructor Summary
Constructors Constructor Description AReadContext(TypeInfoPathManager pathmanager, IObjectReaderHandler handler, IXMLReader parser, XMLReporter reporter, java.lang.Object callcontext, java.lang.ClassLoader classloader)
AReadContext(TypeInfoPathManager pathmanager, IObjectReaderHandler handler, IXMLReader parser, XMLReporter reporter, java.lang.Object callcontext, java.lang.ClassLoader classloader, java.lang.Object root, java.util.List<StackElement> stack, StackElement topse, java.lang.String comment, java.util.Map<java.lang.String,java.lang.Object> readobjects, int readignore, MultiCollection<java.lang.Integer,IPostProcessorCall> postprocessors)
Create a new read context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChild(java.lang.Object key, LinkData value)
Add a child.void
addStackElement(StackElement elem)
int
getArrayCount(java.lang.Object parent)
Get the current array counter.java.util.List<LinkData>
getChildren(java.lang.Object key)
Get children.java.lang.ClassLoader
getClassLoader()
Get the classloader.java.lang.String
getComment()
Get the comment.IObjectReaderHandler
getDefaultHandler()
Get the defaulthandler.ILocation
getLocation()
IXMLReader
getParser()
Get the parser.TypeInfoPathManager
getPathManager()
Get the pathManager.MultiCollection<java.lang.Integer,IPostProcessorCall>
getPostProcessors()
Get the postprocessors.int
getReadIgnore()
Get the readignore.java.util.Map<java.lang.String,java.lang.Object>
getReadObjects()
Get the readobjects.XMLReporter
getReporter()
Get the reporter.java.lang.Object
getRootObject()
Get the root object.StackElement[]
getStack()
StackElement
getStackElement(int pos)
Get stack element.int
getStackSize()
StackElement
getTopStackElement()
Get the top stack element.java.lang.Object
getUserContext()
Get the callcontext.protected QName[]
getXMLPath()
Get the xml path for a stack.QName[]
getXMLPath(QName tag)
Get the xml path for a stack.java.util.List<LinkData>
removeChildren(java.lang.Object key)
Remove a child.void
removeStackElement()
void
setCallContext(java.lang.Object callcontext)
Set the callcontext.void
setClassLoader(java.lang.ClassLoader classloader)
Set the classloader.void
setComment(java.lang.String comment)
Set the comment.void
setPostProcessors(MultiCollection<java.lang.Integer,IPostProcessorCall> postprocessors)
Set the postprocessors.void
setReadIgnore(int readignore)
Set the readignore.void
setReadObjects(java.util.Map<java.lang.String,java.lang.Object> readobjects)
Set the readobjects.void
setStackElement(StackElement elem, int pos)
-
-
-
Field Detail
-
pathmanager
protected TypeInfoPathManager pathmanager
The type info path manager.
-
defaulthandler
protected IObjectReaderHandler defaulthandler
The default object handler.
-
parser
protected IXMLReader parser
The parser.
-
reporter
protected XMLReporter reporter
The parser.
-
classloader
protected java.lang.ClassLoader classloader
The classloader.
-
rootobject
protected java.lang.Object rootobject
The root object.
-
stack
protected java.util.List<StackElement> stack
The stack.
-
comment
protected java.lang.String comment
The current comment.
-
readobjects
protected java.util.Map<java.lang.String,java.lang.Object> readobjects
The read objects per id.
-
readignore
protected int readignore
The readignore counter (0=do not ignore).
-
callcontext
protected java.lang.Object callcontext
The call context.
-
postprocessors
protected MultiCollection<java.lang.Integer,IPostProcessorCall> postprocessors
The post processors.
-
arrayinfos
protected java.util.Map<java.lang.Object,java.lang.Integer> arrayinfos
The map or array information.
-
children
protected MultiCollection<java.lang.Object,LinkData> children
The map of objects to link in bulk mode (object -> map of tags -> objects per tag).
-
-
Constructor Detail
-
AReadContext
public AReadContext(TypeInfoPathManager pathmanager, IObjectReaderHandler handler, IXMLReader parser, XMLReporter reporter, java.lang.Object callcontext, java.lang.ClassLoader classloader)
- Parameters:
parser
-
-
AReadContext
public AReadContext(TypeInfoPathManager pathmanager, IObjectReaderHandler handler, IXMLReader parser, XMLReporter reporter, java.lang.Object callcontext, java.lang.ClassLoader classloader, java.lang.Object root, java.util.List<StackElement> stack, StackElement topse, java.lang.String comment, java.util.Map<java.lang.String,java.lang.Object> readobjects, int readignore, MultiCollection<java.lang.Integer,IPostProcessorCall> postprocessors)
Create a new read context.- Parameters:
parser
-root
-stack
-topse
-comment
-readobjects
-
-
-
Method Detail
-
getParser
public IXMLReader getParser()
Get the parser.- Returns:
- The parser.
-
getPathManager
public TypeInfoPathManager getPathManager()
Get the pathManager.- Returns:
- the pathManager.
-
getDefaultHandler
public IObjectReaderHandler getDefaultHandler()
Get the defaulthandler.- Returns:
- the defaulthandler.
-
getReporter
public XMLReporter getReporter()
Get the reporter.- Returns:
- The reporter.
-
getRootObject
public java.lang.Object getRootObject()
Get the root object.- Specified by:
getRootObject
in interfaceIContext
- Returns:
- The root object.
-
getStackElement
public StackElement getStackElement(int pos)
Get stack element.
-
getTopStackElement
public StackElement getTopStackElement()
Get the top stack element.- Returns:
- The top stack element (if any).
-
addStackElement
public void addStackElement(StackElement elem)
-
setStackElement
public void setStackElement(StackElement elem, int pos)
-
removeStackElement
public void removeStackElement()
-
getStackSize
public int getStackSize()
-
getComment
public java.lang.String getComment()
Get the comment.- Returns:
- The comment.
-
setComment
public void setComment(java.lang.String comment)
Set the comment.- Parameters:
comment
- The comment to set.
-
getReadObjects
public java.util.Map<java.lang.String,java.lang.Object> getReadObjects()
Get the readobjects.- Returns:
- The readobjects.
-
setReadObjects
public void setReadObjects(java.util.Map<java.lang.String,java.lang.Object> readobjects)
Set the readobjects.- Parameters:
readobjects
- The readobjects to set.
-
getReadIgnore
public int getReadIgnore()
Get the readignore.- Returns:
- The readignore.
-
setReadIgnore
public void setReadIgnore(int readignore)
Set the readignore.- Parameters:
readignore
- The readignore to set.
-
getUserContext
public java.lang.Object getUserContext()
Get the callcontext.- Specified by:
getUserContext
in interfaceIContext
- Returns:
- The callcontext.
-
setCallContext
public void setCallContext(java.lang.Object callcontext)
Set the callcontext.- Parameters:
callcontext
- The callcontext to set.
-
getClassLoader
public java.lang.ClassLoader getClassLoader()
Get the classloader.- Specified by:
getClassLoader
in interfaceIContext
- Returns:
- The classloader.
-
setClassLoader
public void setClassLoader(java.lang.ClassLoader classloader)
Set the classloader.- Parameters:
classloader
- The classloader to set.
-
getPostProcessors
public MultiCollection<java.lang.Integer,IPostProcessorCall> getPostProcessors()
Get the postprocessors.- Returns:
- The postprocessors.
-
setPostProcessors
public void setPostProcessors(MultiCollection<java.lang.Integer,IPostProcessorCall> postprocessors)
Set the postprocessors.- Parameters:
postprocessors
- The postprocessors to set.
-
getArrayCount
public int getArrayCount(java.lang.Object parent)
Get the current array counter.
-
getChildren
public java.util.List<LinkData> getChildren(java.lang.Object key)
Get children.
-
addChild
public void addChild(java.lang.Object key, LinkData value)
Add a child.
-
removeChildren
public java.util.List<LinkData> removeChildren(java.lang.Object key)
Remove a child.
-
getXMLPath
public QName[] getXMLPath(QName tag)
Get the xml path for a stack.- Parameters:
stack
- The stack.- Returns:
- The string representig the xml stack (e.g. tag1/tag2/tag3)
-
getXMLPath
protected QName[] getXMLPath()
Get the xml path for a stack.- Parameters:
stack
- The stack.- Returns:
- The string representig the xml stack (e.g. tag1/tag2/tag3)
-
getStack
public StackElement[] getStack()
-
getLocation
public ILocation getLocation()
-
-