Package jadex.xml.reader
Class AReader
- java.lang.Object
-
- jadex.xml.reader.AReader
-
- Direct Known Subclasses:
Reader
public abstract class AReader extends java.lang.Object
XML Reader abstract class.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
bulklink
The link mode.static boolean
DEBUG
The debug flag.static java.lang.Object
NULL
The null object.static java.lang.ThreadLocal<AReadContext>
READ_CONTEXT
This thread local variable provides access to the read context, e.g. from the XML reporter, if required.protected XMLReporter
reporter
static java.lang.Object
STRING_MARKER
The string marker object.
-
Constructor Summary
Constructors Constructor Description AReader(boolean bulklink, XMLReporter reporter)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected AReadContext
createReadContext(TypeInfoPathManager tipmanager, IObjectReaderHandler handler, IXMLReader parser, XMLReporter reporter, java.lang.Object callcontext, java.lang.ClassLoader classloader)
protected abstract IXMLReader
createXMLReader(java.io.InputStream input)
protected abstract IXMLReader
createXMLReader(java.io.Reader input)
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.protected void
handleComment(AReadContext readcontext)
Handle the comment.protected void
handleContent(AReadContext readcontext)
Handle the content.protected void
handleEndElement(AReadContext readcontext)
Handle the end element.protected void
handleStartElement(AReadContext readcontext)
Handle the start element.static java.lang.Object
objectFromByteArray(AReader reader, byte[] val, java.lang.ClassLoader classloader, TypeInfoPathManager manager, IObjectReaderHandler handler)
static java.lang.Object
objectFromByteArray(AReader reader, byte[] val, java.lang.ClassLoader classloader, java.lang.Object context, TypeInfoPathManager manager, IObjectReaderHandler handler)
static java.lang.Object
objectFromInputStream(AReader reader, java.io.InputStream val, java.lang.ClassLoader classloader, TypeInfoPathManager manager, IObjectReaderHandler handler)
static java.lang.Object
objectFromInputStream(AReader reader, java.io.InputStream bis, java.lang.ClassLoader classloader, java.lang.Object context, TypeInfoPathManager manager, IObjectReaderHandler handler)
static java.lang.Object
objectFromXML(AReader reader, java.lang.String val, java.lang.ClassLoader classloader, TypeInfoPathManager manager, IObjectReaderHandler handler)
static java.lang.Object
objectFromXML(AReader reader, java.lang.String val, java.lang.ClassLoader classloader, java.lang.Object context, TypeInfoPathManager manager, IObjectReaderHandler handler)
java.lang.Object
read(TypeInfoPathManager tipmanager, IObjectReaderHandler handler, IXMLReader parser, java.lang.ClassLoader classloader, java.lang.Object callcontext)
Read properties from xml.java.lang.Object
read(TypeInfoPathManager tipmanager, IObjectReaderHandler handler, java.io.InputStream input, java.lang.ClassLoader classloader, java.lang.Object callcontext)
Read properties from xml.java.lang.Object
read(TypeInfoPathManager tipmanager, IObjectReaderHandler handler, java.io.Reader input, java.lang.ClassLoader classloader, java.lang.Object callcontext)
Read properties from xml.
-
-
-
Field Detail
-
DEBUG
public static final boolean DEBUG
The debug flag.- See Also:
- Constant Field Values
-
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.
-
reporter
protected XMLReporter reporter
-
-
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
-
createReadContext
protected AReadContext createReadContext(TypeInfoPathManager tipmanager, IObjectReaderHandler handler, IXMLReader parser, XMLReporter reporter, java.lang.Object callcontext, java.lang.ClassLoader classloader)
-
createXMLReader
protected abstract IXMLReader createXMLReader(java.io.Reader input)
-
createXMLReader
protected abstract IXMLReader createXMLReader(java.io.InputStream input)
-
-