Class AReader

  • Direct Known Subclasses:
    Reader

    public abstract class AReader
    extends java.lang.Object
    XML Reader abstract class.
    • Field Detail

      • STRING_MARKER

        public static final java.lang.Object STRING_MARKER
        The string marker object.
      • READ_CONTEXT

        public static final java.lang.ThreadLocal<AReadContext> READ_CONTEXT
        This thread local variable provides access to the read context, e.g. from the XML reporter, if required.
      • NULL

        public static final java.lang.Object NULL
        The null object.
      • bulklink

        protected boolean bulklink
        The link mode.
    • Constructor Detail

      • AReader

        public AReader​(boolean bulklink,
                       XMLReporter reporter)
    • Method Detail

      • objectFromXML

        public static java.lang.Object objectFromXML​(AReader reader,
                                                     java.lang.String val,
                                                     java.lang.ClassLoader classloader,
                                                     TypeInfoPathManager manager,
                                                     IObjectReaderHandler handler)
        Parameters:
        val - The string value.
        Returns:
        The encoded object.
      • objectFromXML

        public static java.lang.Object objectFromXML​(AReader reader,
                                                     java.lang.String val,
                                                     java.lang.ClassLoader classloader,
                                                     java.lang.Object context,
                                                     TypeInfoPathManager manager,
                                                     IObjectReaderHandler handler)
        Parameters:
        val - The string value.
        Returns:
        The encoded object.
      • objectFromByteArray

        public static java.lang.Object objectFromByteArray​(AReader reader,
                                                           byte[] val,
                                                           java.lang.ClassLoader classloader,
                                                           TypeInfoPathManager manager,
                                                           IObjectReaderHandler handler)
        Parameters:
        val - The string value.
        Returns:
        The encoded object.
      • objectFromByteArray

        public static java.lang.Object objectFromByteArray​(AReader reader,
                                                           byte[] val,
                                                           java.lang.ClassLoader classloader,
                                                           java.lang.Object context,
                                                           TypeInfoPathManager manager,
                                                           IObjectReaderHandler handler)
        Parameters:
        val - The string value.
        Returns:
        The encoded object.
      • objectFromInputStream

        public static java.lang.Object objectFromInputStream​(AReader reader,
                                                             java.io.InputStream val,
                                                             java.lang.ClassLoader classloader,
                                                             TypeInfoPathManager manager,
                                                             IObjectReaderHandler handler)
        Parameters:
        val - The string value.
        Returns:
        The encoded object.
      • objectFromInputStream

        public static java.lang.Object objectFromInputStream​(AReader reader,
                                                             java.io.InputStream bis,
                                                             java.lang.ClassLoader classloader,
                                                             java.lang.Object context,
                                                             TypeInfoPathManager manager,
                                                             IObjectReaderHandler handler)
        Parameters:
        val - The string value.
        Returns:
        The encoded object.
      • getSubobjectInfoRead

        public static SubobjectInfo getSubobjectInfoRead​(QName localname,
                                                         QName[] fullpath,
                                                         TypeInfo patypeinfo,
                                                         java.util.Map<java.lang.String,​java.lang.String> attrs)
        Get a subobject info for reading.
      • read

        public java.lang.Object read​(TypeInfoPathManager tipmanager,
                                     IObjectReaderHandler handler,
                                     java.io.Reader input,
                                     java.lang.ClassLoader classloader,
                                     java.lang.Object callcontext)
                              throws java.lang.Exception
        Read properties from xml.
        Parameters:
        input - The input stream.
        classloader - The classloader.
        context - The context.
        Throws:
        java.lang.Exception
      • read

        public java.lang.Object read​(TypeInfoPathManager tipmanager,
                                     IObjectReaderHandler handler,
                                     java.io.InputStream input,
                                     java.lang.ClassLoader classloader,
                                     java.lang.Object callcontext)
                              throws java.lang.Exception
        Read properties from xml.
        Parameters:
        input - The input stream.
        classloader - The classloader.
        context - The context.
        Throws:
        java.lang.Exception
      • read

        public java.lang.Object read​(TypeInfoPathManager tipmanager,
                                     IObjectReaderHandler handler,
                                     IXMLReader parser,
                                     java.lang.ClassLoader classloader,
                                     java.lang.Object callcontext)
                              throws java.lang.Exception
        Read properties from xml.
        Parameters:
        input - The input stream.
        classloader - The classloader.
        context - The context.
        Throws:
        java.lang.Exception
      • handleComment

        protected void handleComment​(AReadContext readcontext)
                              throws java.lang.Exception
        Handle the comment.
        Parameters:
        readcontext - The context for reading with all necessary information.
        Throws:
        java.lang.Exception
      • handleContent

        protected void handleContent​(AReadContext readcontext)
                              throws java.lang.Exception
        Handle the content.
        Parameters:
        readcontext - The context for reading with all necessary information.
        Throws:
        java.lang.Exception
      • handleStartElement

        protected void handleStartElement​(AReadContext readcontext)
                                   throws java.lang.Exception
        Handle the start element.
        Parameters:
        readcontext - The context for reading with all necessary information.
        Throws:
        java.lang.Exception
      • handleEndElement

        protected void handleEndElement​(AReadContext readcontext)
                                 throws java.lang.Exception
        Handle the end element.
        Parameters:
        readcontext - The context for reading with all necessary information.
        Throws:
        java.lang.Exception
      • createXMLReader

        protected abstract IXMLReader createXMLReader​(java.io.Reader input)
      • createXMLReader

        protected abstract IXMLReader createXMLReader​(java.io.InputStream input)