Package jadex.xml
Class TypeInfo
- java.lang.Object
-
- jadex.xml.AbstractInfo
-
- jadex.xml.TypeInfo
-
public class TypeInfo extends AbstractInfo
Mapping from tag (or path fragment) to object.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class jadex.xml.AbstractInfo
AbstractInfo.SpecificityComparator
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.Object,AttributeInfo>attributeinfosThe attributes info (xmlname -> attrinfo).protected LinkingInfolinkinfoThe link info .protected MappingInfomapinfoThe map info contains all mapping relevant data, e.g.protected ObjectInfoobjectinfoThe object info for storing info about the object side, e.g.protected IObjectReaderHandlerreaderhandlerThe reader handler (if any).protected java.util.Map<QName,java.util.TreeSet<SubobjectInfo>>subobjectinfosreadThe sub objects (xmlpath -> subobject info).protected java.util.Map<AccessInfo,SubobjectInfo>subobjectinfoswriteThe sub objects (non-xml name -> subobject info).-
Fields inherited from class jadex.xml.AbstractInfo
id, idcnt, xmlinfo, xmlpathelementswithouttag
-
-
Constructor Summary
Constructors Constructor Description TypeInfo(XMLInfo xmlinfo, ObjectInfo objectinfo)Create a new type info.TypeInfo(XMLInfo xmlinfo, ObjectInfo objectinfo, MappingInfo mapinfo)Create a new type info.TypeInfo(XMLInfo xmlinfo, ObjectInfo objectinfo, MappingInfo mapinfo, LinkingInfo linkinfo)Create a new type info.TypeInfo(XMLInfo xmlinfo, ObjectInfo objectinfo, MappingInfo mapinfo, LinkingInfo linkinfo, IObjectReaderHandler readerhandler)Create a new type info.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<java.lang.Object,AttributeInfo>createAttributeInfos(AttributeInfo[] attributeinfos)Create the attribute info map (xml name(s) -> attribute info).protected java.util.Map<QName,java.util.TreeSet<SubobjectInfo>>createSubobjectInfosRead(SubobjectInfo[] subobjectinfos)Create subobject infos for each tag sorted by specificity.protected java.util.Map<AccessInfo,SubobjectInfo>createSubobjectInfosWrite(SubobjectInfo[] subobjectinfos)Create subobject infos for each tag sorted by specificity.protected SubobjectInfofindSubobjectInfo(java.util.Set<SubobjectInfo> soinfos, QName[] fullpath, java.util.Map<java.lang.String,java.lang.String> rawattributes)Find a subobject info.java.lang.ObjectgetAttributeInfo(java.lang.Object xmlname)Get the attribute info.java.util.Collection<AttributeInfo>getAttributeInfos()Get the attribute infos.java.lang.ObjectgetCommentInfo()Get the comment info.java.lang.ObjectgetContentInfo()Get the content info.AttributeInfo[]getDeclaredAttributeInfos()Get the declared attribute infos.SubobjectInfo[]getDeclaredSubobjectInfos()Get the declared subobject infos.java.lang.ObjectgetLinker()Get the linker.LinkingInfogetLinkInfo()Get the linkinfo.MappingInfogetMappingInfo()Get the mapping info.ObjectInfogetObjectInfo()Get the objectinfo.IPostProcessorgetPostProcessor()Get the post-processor.IPreProcessorgetPreProcessor()Get the pre-processor.IObjectReaderHandlergetReaderHandler()Get the reader handler associated to the object type (if any).SubobjectInfogetSubobjectInfoRead(QName tag, QName[] fullpath, java.util.Map<java.lang.String,java.lang.String> rawattributes)Get the most specific subobject info.java.util.Collection<SubobjectInfo>getSubobjectInfos()Get the subobject infos.SubobjectInfogetSubobjectInfoWrite(java.lang.Object attr)Get the subobject infos.TypeInfogetSupertype()Get the supertype.java.lang.ObjectgetTypeInfo()Get the type info.java.util.Set<java.lang.Object>getXMLAttributeNames()Get the xml attribute names.booleanisBulkLink()Test if the object should be bulk linked.booleanisCreateFromTag()Test if object should be created from tag name.booleanisIncludeFields()Get the includefields.booleanisIncludeMethods()Get the includemethods.voidsetReaderHandler(IObjectReaderHandler readerhandler)Set the reader handler associated to the object type (if any).-
Methods inherited from class jadex.xml.AbstractInfo
getFilter, getId, getXMLInfo, getXMLPath, getXMLPathDepth, getXMLPathElements, getXMLPathElementsWithoutElement, getXMLTag, toString
-
-
-
-
Field Detail
-
readerhandler
protected IObjectReaderHandler readerhandler
The reader handler (if any).
-
objectinfo
protected ObjectInfo objectinfo
The object info for storing info about the object side, e.g. the object type.
-
mapinfo
protected MappingInfo mapinfo
The map info contains all mapping relevant data, e.g. for attributes, subobjects etc.
-
linkinfo
protected LinkingInfo linkinfo
The link info .
-
attributeinfos
protected java.util.Map<java.lang.Object,AttributeInfo> attributeinfos
The attributes info (xmlname -> attrinfo).
-
subobjectinfoswrite
protected java.util.Map<AccessInfo,SubobjectInfo> subobjectinfoswrite
The sub objects (non-xml name -> subobject info).
-
subobjectinfosread
protected java.util.Map<QName,java.util.TreeSet<SubobjectInfo>> subobjectinfosread
The sub objects (xmlpath -> subobject info).
-
-
Constructor Detail
-
TypeInfo
public TypeInfo(XMLInfo xmlinfo, ObjectInfo objectinfo)
Create a new type info.
-
TypeInfo
public TypeInfo(XMLInfo xmlinfo, ObjectInfo objectinfo, MappingInfo mapinfo)
Create a new type info.
-
TypeInfo
public TypeInfo(XMLInfo xmlinfo, ObjectInfo objectinfo, MappingInfo mapinfo, LinkingInfo linkinfo)
Create a new type info.
-
TypeInfo
public TypeInfo(XMLInfo xmlinfo, ObjectInfo objectinfo, MappingInfo mapinfo, LinkingInfo linkinfo, IObjectReaderHandler readerhandler)
Create a new type info.
-
-
Method Detail
-
getTypeInfo
public java.lang.Object getTypeInfo()
Get the type info.- Returns:
- The type.
-
getObjectInfo
public ObjectInfo getObjectInfo()
Get the objectinfo.- Returns:
- The objectinfo.
-
getMappingInfo
public MappingInfo getMappingInfo()
Get the mapping info.- Returns:
- The mapinfo.
-
getLinkInfo
public LinkingInfo getLinkInfo()
Get the linkinfo.- Returns:
- The linkinfo.
-
getSupertype
public TypeInfo getSupertype()
Get the supertype.- Returns:
- The super type.
-
getCommentInfo
public java.lang.Object getCommentInfo()
Get the comment info.- Returns:
- The comment
-
getContentInfo
public java.lang.Object getContentInfo()
Get the content info.- Returns:
- The content info.
-
isIncludeFields
public boolean isIncludeFields()
Get the includefields.- Returns:
- The includefields.
-
isIncludeMethods
public boolean isIncludeMethods()
Get the includemethods.- Returns:
- The includemethods.
-
getAttributeInfo
public java.lang.Object getAttributeInfo(java.lang.Object xmlname)
Get the attribute info.- Parameters:
xmlname- The xml name of the attribute.- Returns:
- The attribute info.
-
getXMLAttributeNames
public java.util.Set<java.lang.Object> getXMLAttributeNames()
Get the xml attribute names.- Returns:
- The attribute names.
-
getAttributeInfos
public java.util.Collection<AttributeInfo> getAttributeInfos()
Get the attribute infos.- Returns:
- The attribute infos.
-
getDeclaredAttributeInfos
public AttributeInfo[] getDeclaredAttributeInfos()
Get the declared attribute infos.
-
getDeclaredSubobjectInfos
public SubobjectInfo[] getDeclaredSubobjectInfos()
Get the declared subobject infos.
-
getPostProcessor
public IPostProcessor getPostProcessor()
Get the post-processor.- Returns:
- The post-processor
-
getPreProcessor
public IPreProcessor getPreProcessor()
Get the pre-processor.- Returns:
- The pre-processor
-
getSubobjectInfos
public java.util.Collection<SubobjectInfo> getSubobjectInfos()
Get the subobject infos.- Returns:
- The subobject infos.
-
getSubobjectInfoWrite
public SubobjectInfo getSubobjectInfoWrite(java.lang.Object attr)
Get the subobject infos.- Returns:
- The subobject info.
-
getSubobjectInfoRead
public SubobjectInfo getSubobjectInfoRead(QName tag, QName[] fullpath, java.util.Map<java.lang.String,java.lang.String> rawattributes)
Get the most specific subobject info.- Parameters:
tag- The tag.fullpath- The full path.- Returns:
- The most specific subobject info.
-
isCreateFromTag
public boolean isCreateFromTag()
Test if object should be created from tag name.
-
getLinker
public java.lang.Object getLinker()
Get the linker.- Returns:
- The linker.
-
isBulkLink
public boolean isBulkLink()
Test if the object should be bulk linked.
-
findSubobjectInfo
protected SubobjectInfo findSubobjectInfo(java.util.Set<SubobjectInfo> soinfos, QName[] fullpath, java.util.Map<java.lang.String,java.lang.String> rawattributes)
Find a subobject info.
-
createSubobjectInfosWrite
protected java.util.Map<AccessInfo,SubobjectInfo> createSubobjectInfosWrite(SubobjectInfo[] subobjectinfos)
Create subobject infos for each tag sorted by specificity.- Parameters:
subobjectinfos- The subobject infos.- Returns:
- Map of subobject infos.
-
createSubobjectInfosRead
protected java.util.Map<QName,java.util.TreeSet<SubobjectInfo>> createSubobjectInfosRead(SubobjectInfo[] subobjectinfos)
Create subobject infos for each tag sorted by specificity.- Parameters:
subobjectinfos- The subobject infos.- Returns:
- Map of subobject infos.
-
createAttributeInfos
protected java.util.Map<java.lang.Object,AttributeInfo> createAttributeInfos(AttributeInfo[] attributeinfos)
Create the attribute info map (xml name(s) -> attribute info).
-
setReaderHandler
public void setReaderHandler(IObjectReaderHandler readerhandler)
Set the reader handler associated to the object type (if any).
-
getReaderHandler
public IObjectReaderHandler getReaderHandler()
Get the reader handler associated to the object type (if any).
-
-