Package jadex.component
Class ComponentXMLReader
- java.lang.Object
-
- jadex.component.ComponentXMLReader
-
- Direct Known Subclasses:
ApplicationXMLReader
,BDIXMLReader
public class ComponentXMLReader extends java.lang.Object
Reader for loading component XML models into a Java representation states.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ComponentXMLReader.ExpressionProcessor
Parse expression text.
-
Field Summary
Fields Modifier and Type Field Description static IStringObjectConverter
classconv
static java.lang.String
CONTEXT_ENTRIES
Key for error entries in read context.static java.lang.String
CONTEXT_EXTERNALS
Key for error entries in read context.static java.lang.String
CONTEXT_RID
Key for resource identifier in read context.static java.lang.String
CONTEXT_ROOT
Key for root identifier in read context.protected IObjectReaderHandler
handler
The handler.protected TypeInfoPathManager
manager
The manager.protected java.util.Set[]
mappings
The mappings.protected AReader
reader
The reader instance.static IObjectStringConverter
reclassconv
static IObjectStringConverter
rescopeconv
static IStringObjectConverter
scopeconv
static IObjectStringConverter
stringarraytostring
static IStringObjectConverter
stringtostringarray
-
Constructor Summary
Constructors Constructor Description ComponentXMLReader(java.util.Set mappings)
Create a new reader.ComponentXMLReader(java.util.Set[] mappings)
Create a new reader.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
addMethodInfos(java.util.Map props, java.lang.String type, java.lang.String[] names)
Add method info.static IErrorReport
buildReport(java.lang.String modelname, java.lang.String filename, MultiCollection<Tuple,java.lang.String> entries, java.util.Map<java.lang.String,java.lang.String> externals)
Build the error report.java.util.Map<java.lang.String,java.lang.Object>
createContext()
Create the context for a read operation.protected java.lang.String
getModelType(java.lang.String filename)
Get the type of loaded models.static java.util.Set<TypeInfo>
getXMLMapping(java.util.Set<TypeInfo>[] mappings, java.lang.String uri)
Get the XML mapping.CacheableKernelModel
read(ResourceInfo rinfo, java.lang.ClassLoader classloader, IResourceIdentifier rid, IComponentIdentifier root)
Read properties from xml.
-
-
-
Field Detail
-
CONTEXT_ENTRIES
public static final java.lang.String CONTEXT_ENTRIES
Key for error entries in read context.- See Also:
- Constant Field Values
-
CONTEXT_EXTERNALS
public static final java.lang.String CONTEXT_EXTERNALS
Key for error entries in read context.- See Also:
- Constant Field Values
-
CONTEXT_RID
public static final java.lang.String CONTEXT_RID
Key for resource identifier in read context.- See Also:
- Constant Field Values
-
CONTEXT_ROOT
public static final java.lang.String CONTEXT_ROOT
Key for root identifier in read context.- See Also:
- Constant Field Values
-
reader
protected AReader reader
The reader instance.
-
manager
protected TypeInfoPathManager manager
The manager.
-
handler
protected IObjectReaderHandler handler
The handler.
-
mappings
protected java.util.Set[] mappings
The mappings.
-
classconv
public static final IStringObjectConverter classconv
-
reclassconv
public static final IObjectStringConverter reclassconv
-
scopeconv
public static final IStringObjectConverter scopeconv
-
rescopeconv
public static final IObjectStringConverter rescopeconv
-
stringtostringarray
public static final IStringObjectConverter stringtostringarray
-
stringarraytostring
public static final IObjectStringConverter stringarraytostring
-
-
Method Detail
-
createContext
public java.util.Map<java.lang.String,java.lang.Object> createContext()
Create the context for a read operation.
-
read
public CacheableKernelModel read(ResourceInfo rinfo, java.lang.ClassLoader classloader, IResourceIdentifier rid, IComponentIdentifier root) throws java.lang.Exception
Read properties from xml.- Parameters:
info
- The resource info.classloader
- The classloader.- Throws:
java.lang.Exception
-
getModelType
protected java.lang.String getModelType(java.lang.String filename)
Get the type of loaded models.
-
addMethodInfos
public static void addMethodInfos(java.util.Map props, java.lang.String type, java.lang.String[] names)
Add method info.
-
getXMLMapping
public static java.util.Set<TypeInfo> getXMLMapping(java.util.Set<TypeInfo>[] mappings, java.lang.String uri)
Get the XML mapping.
-
buildReport
public static IErrorReport buildReport(java.lang.String modelname, java.lang.String filename, MultiCollection<Tuple,java.lang.String> entries, java.util.Map<java.lang.String,java.lang.String> externals)
Build the error report.
-
-