Class AReadContext

  • All Implemented Interfaces:
    IContext

    public class AReadContext
    extends java.lang.Object
    implements IContext
    Context for reader that stores all relevant information of the read process.
    • Field Detail

      • 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.
      • 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).
    • 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 interface IContext
        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 interface IContext
        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 interface IContext
        Returns:
        The classloader.
      • setClassLoader

        public void setClassLoader​(java.lang.ClassLoader classloader)
        Set the classloader.
        Parameters:
        classloader - The classloader to set.
      • 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)
      • getLocation

        public ILocation getLocation()