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>arrayinfosThe map or array information.protected java.lang.ObjectcallcontextThe call context.protected MultiCollection<java.lang.Object,LinkData>childrenThe map of objects to link in bulk mode (object -> map of tags -> objects per tag).protected java.lang.ClassLoaderclassloaderThe classloader.protected java.lang.StringcommentThe current comment.protected IObjectReaderHandlerdefaulthandlerThe default object handler.protected IXMLReaderparserThe parser.protected TypeInfoPathManagerpathmanagerThe type info path manager.protected MultiCollection<java.lang.Integer,IPostProcessorCall>postprocessorsThe post processors.protected intreadignoreThe readignore counter (0=do not ignore).protected java.util.Map<java.lang.String,java.lang.Object>readobjectsThe read objects per id.protected XMLReporterreporterThe parser.protected java.lang.ObjectrootobjectThe root object.protected java.util.List<StackElement>stackThe 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 voidaddChild(java.lang.Object key, LinkData value)Add a child.voidaddStackElement(StackElement elem)intgetArrayCount(java.lang.Object parent)Get the current array counter.java.util.List<LinkData>getChildren(java.lang.Object key)Get children.java.lang.ClassLoadergetClassLoader()Get the classloader.java.lang.StringgetComment()Get the comment.IObjectReaderHandlergetDefaultHandler()Get the defaulthandler.ILocationgetLocation()IXMLReadergetParser()Get the parser.TypeInfoPathManagergetPathManager()Get the pathManager.MultiCollection<java.lang.Integer,IPostProcessorCall>getPostProcessors()Get the postprocessors.intgetReadIgnore()Get the readignore.java.util.Map<java.lang.String,java.lang.Object>getReadObjects()Get the readobjects.XMLReportergetReporter()Get the reporter.java.lang.ObjectgetRootObject()Get the root object.StackElement[]getStack()StackElementgetStackElement(int pos)Get stack element.intgetStackSize()StackElementgetTopStackElement()Get the top stack element.java.lang.ObjectgetUserContext()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.voidremoveStackElement()voidsetCallContext(java.lang.Object callcontext)Set the callcontext.voidsetClassLoader(java.lang.ClassLoader classloader)Set the classloader.voidsetComment(java.lang.String comment)Set the comment.voidsetPostProcessors(MultiCollection<java.lang.Integer,IPostProcessorCall> postprocessors)Set the postprocessors.voidsetReadIgnore(int readignore)Set the readignore.voidsetReadObjects(java.util.Map<java.lang.String,java.lang.Object> readobjects)Set the readobjects.voidsetStackElement(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:
getRootObjectin 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:
getUserContextin 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:
getClassLoaderin 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()
-
-