|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.objectweb.jorm.xml2mi.lib.BasicMappingParser
ProxyParser is an implementation of the Parser interface. This object defines a parser which is able to dispatch operation to specific mapping parser, and able to build the corresponding meta information.
| Field Summary | |
protected Class |
currentClass
The current Class object. |
protected java.util.Map |
idvalue2genclassref
A Map of String objects. |
protected Logger |
logger
a simple logger to log |
protected LoggerFactory |
loggerFactory
a logger factory to create other loggers if needed |
protected Manager |
metaInfoManager
The meta information manager for managing meta-objects within the context of a mapper. |
protected PathExplorer |
pathExplorer
pathExplorer is able to return input or output stream from a given file. |
| Constructor Summary | |
BasicMappingParser()
|
|
| Method Summary | |
protected NameDef |
getClassRefNameDef(Class clazz,
java.lang.String fieldName,
java.lang.String name)
Seeks for a ClassRef object given a class, a field name. |
protected java.lang.String |
getFieldName(org.w3c.dom.Element nameDef)
Seeks for a father node of type field from a name-def node and returns the corresponding field name. |
protected int |
getGenClassNestingLevel(org.w3c.dom.Element fromElem,
java.lang.String fieldName)
Seeks for a father node of type field from a gen-class element or a name-def element. |
protected GenClassRef |
getGenClassRef(Class clazz,
java.lang.String fieldName,
int nestingLevel)
Seeks for a GenClassRef object given a class, a field name and a nesting level. |
protected NameDef |
getGenClassRefNameDef(Class clazz,
java.lang.String fieldName,
java.lang.String name,
int nestingLevel)
Seeks for a GenClassRef object given a class, a field name and a nesting level. |
protected NameDef |
getIdNameDef(java.lang.String linkend)
Returns a NameDef object given a NameDef name (name) and possibly the full qualified class name (fqcn) where it is defined. |
Logger |
getLogger()
Returns a logger to an component that wants to log things. |
LoggerFactory |
getLoggerFactory()
Returns a logger factory that allows the creation of new loggers. |
protected NameDef |
getRefNameDef(java.lang.String linkend,
java.lang.String tagName)
Returns a NameDef object given a NameDef name (name), a field or a scalarfield name (fn) and possibly the full qualified class name where it is defined. |
abstract void |
parseMapping(org.w3c.dom.Element mappingElem,
Mapping mapping)
Parses the mapping information related to a particular mapper and builds the corresponding Jorm meta-information. |
void |
setCurrentClass(Class currentClass)
Assigns the current Class object to a parser in order from it to retrieve the meta-objects (for example, PrimitiveElement objects) that are referenced from XML mapping elements. |
void |
setidvalue2genclassref(java.util.Map idvalue2genclassref)
Assigns an HashTable object to the MappingParser object. |
void |
setLogger(Logger logger)
Defines a logger object. |
void |
setLoggerFactory(LoggerFactory loggerfactory)
Defines the logger factory to obtain new loggers. |
void |
setMetaInfoManager(Manager mim)
Assigns a meta-information manager to a parser in order from it to create the meta-information related to the XML files it parses. |
void |
setmotable(java.util.Hashtable motable)
Assigns an HashTable object to the MappingParser object. |
void |
setPathExplorer(PathExplorer pathExpl)
Assigns a PathExplorer object for locating files that have to be parsed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Manager metaInfoManager
protected Class currentClass
protected Logger logger
protected LoggerFactory loggerFactory
protected PathExplorer pathExplorer
protected java.util.Map idvalue2genclassref
| Constructor Detail |
public BasicMappingParser()
| Method Detail |
public void setMetaInfoManager(Manager mim)
setMetaInfoManager in interface MappingParsermim - the meta-information Manager to be associated to this
parserpublic void setPathExplorer(PathExplorer pathExpl)
setPathExplorer in interface MappingParserpathExpl - The PathExplorer to be used for file locationpublic void setCurrentClass(Class currentClass)
setCurrentClass in interface MappingParsercurrentClass - the Jorm meta-object associated to the parsed class.protected NameDef getIdNameDef(java.lang.String linkend)
linkend - a String object whose structure is defined as follows: fqcn/name or name
protected NameDef getRefNameDef(java.lang.String linkend,
java.lang.String tagName)
linkend - a String object whose structure is defined as follows: /fqcn/fn/name or fn/name,
tagName a String object whose value matches "rdb-class-ref-mapping" or
"rdb-gen-class-ref-mapping".
protected java.lang.String getFieldName(org.w3c.dom.Element nameDef)
nameDef - the name-def element.
protected NameDef getClassRefNameDef(Class clazz,
java.lang.String fieldName,
java.lang.String name)
protected int getGenClassNestingLevel(org.w3c.dom.Element fromElem,
java.lang.String fieldName)
protected NameDef getGenClassRefNameDef(Class clazz,
java.lang.String fieldName,
java.lang.String name,
int nestingLevel)
protected GenClassRef getGenClassRef(Class clazz,
java.lang.String fieldName,
int nestingLevel)
public abstract void parseMapping(org.w3c.dom.Element mappingElem,
Mapping mapping)
throws PException
parseMapping in interface MappingParsermappingElem - the current XML node.mapping - a Mapping object.
PExceptionpublic void setidvalue2genclassref(java.util.Map idvalue2genclassref)
setidvalue2genclassref in interface MappingParseridvalue2genclassref - an HashTable that associates an id value with a GenClassRef object.public void setmotable(java.util.Hashtable motable)
setmotable in interface MappingParsermotable - an HashTable that associates a pd file to its corresponding MetaObject.public void setLogger(Logger logger)
setLogger in interface Loggablelogger - the logger objectpublic void setLoggerFactory(LoggerFactory loggerfactory)
setLoggerFactory in interface Loggableloggerfactory - The LoggerFactory object to obtain a logger objectpublic Logger getLogger()
Loggable
getLogger in interface Loggablepublic LoggerFactory getLoggerFactory()
Loggable
getLoggerFactory in interface Loggable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||