org.devaki.nextobjects.util
Class NOXMLFactory

java.lang.Object
  extended byorg.devaki.nextobjects.util.NOXMLFactory

public final class NOXMLFactory
extends java.lang.Object

this class is responsible for devaki-nextobjects XML input this is for load .cdm, .pdm, project.xml, ${project-schema}.xml

Author:
Emmanuel Florent
See Also:
http://maven.apache.org/reference/project-descriptor.html

Field Summary
static int DOCTYPE_CDM
          the Conceptual Model doctype
static int DOCTYPE_MAVEN
          Project.xml doctype
static int DOCTYPE_PDM
          the Physical Model doctype
static int DOCTYPE_TORQUE
          The Torque doctype
static int DOCTYPE_UNKNOW
          Unknow doctype
 
Method Summary
protected static BaseClass loadBaseClass(org.w3c.dom.Element child, BaseClass pBaseClass)
          Convert a JDom Elment into an Entity
protected static void loadBaseModel(org.w3c.dom.Element root, BaseModel pBaseModel)
          Convert a JDom Elment into an BaseModel
static void loadCdm(org.w3c.dom.Document doc, ConceptualModel pMerise)
          Convert a XML stream into an ConceptualModel
protected static void loadClassStyle(org.w3c.dom.Element child, BaseClass pBaseClass)
          Loads the style of a class
protected static Column loadColumn(org.w3c.dom.Element pChild, BaseClass pBaseClass)
          Convert a JDom Elment into a FK
protected static Constraint loadForeignKey(org.w3c.dom.Element pEltForeignKey, Table pTable)
          Convert a JDom Elment into a FK
static org.w3c.dom.Document loadModel(java.io.File file)
          Load a model from a file
static void loadPdm(org.w3c.dom.Document doc, PhysicalModel pPDM)
          Load a PDM from an XML stream
protected static void loadProjectDotXml(java.io.File file, BaseModel pBaseModel)
          load a project.xml tree for a given model
static int parseDocType(org.w3c.dom.Document doc)
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOCTYPE_CDM

public static final int DOCTYPE_CDM
the Conceptual Model doctype

See Also:
Constant Field Values

DOCTYPE_PDM

public static final int DOCTYPE_PDM
the Physical Model doctype

See Also:
Constant Field Values

DOCTYPE_TORQUE

public static final int DOCTYPE_TORQUE
The Torque doctype

See Also:
Constant Field Values

DOCTYPE_MAVEN

public static final int DOCTYPE_MAVEN
Project.xml doctype

See Also:
Constant Field Values

DOCTYPE_UNKNOW

public static final int DOCTYPE_UNKNOW
Unknow doctype

See Also:
Constant Field Values
Method Detail

loadCdm

public static void loadCdm(org.w3c.dom.Document doc,
                           ConceptualModel pMerise)
Convert a XML stream into an ConceptualModel

Parameters:
doc - the document
pMerise - the conceptual model

loadPdm

public static void loadPdm(org.w3c.dom.Document doc,
                           PhysicalModel pPDM)
Load a PDM from an XML stream

Parameters:
doc - the document
pPDM - the physical model

loadModel

public static org.w3c.dom.Document loadModel(java.io.File file)
Load a model from a file

Parameters:
file - the file
Returns:
the document
Throws:
java.io.IOException
JDOMException

parseDocType

public static int parseDocType(org.w3c.dom.Document doc)
Description of the Method

Parameters:
doc - Description of the Parameter
Returns:
Description of the Return Value

loadForeignKey

protected static Constraint loadForeignKey(org.w3c.dom.Element pEltForeignKey,
                                           Table pTable)
Convert a JDom Elment into a FK

Parameters:
pEltForeignKey - the tree node
pTable - the table
Returns:
the constraint

loadBaseModel

protected static void loadBaseModel(org.w3c.dom.Element root,
                                    BaseModel pBaseModel)
Convert a JDom Elment into an BaseModel

Parameters:
root - the tree element to parse
pBaseModel - the model to be loaded.

loadProjectDotXml

protected static void loadProjectDotXml(java.io.File file,
                                        BaseModel pBaseModel)
load a project.xml tree for a given model

Parameters:
file - the file
pBaseModel - the model

loadBaseClass

protected static BaseClass loadBaseClass(org.w3c.dom.Element child,
                                         BaseClass pBaseClass)
Convert a JDom Elment into an Entity

Parameters:
child - the tree node to parse
pBaseClass - the entity to load.
Returns:
the baseClass object

loadClassStyle

protected static void loadClassStyle(org.w3c.dom.Element child,
                                     BaseClass pBaseClass)
Loads the style of a class

Parameters:
child - the tree node to parse
pBaseClass - the class to load.

loadColumn

protected static Column loadColumn(org.w3c.dom.Element pChild,
                                   BaseClass pBaseClass)
Convert a JDom Elment into a FK

Parameters:
pChild - the tree node to parse
pBaseClass - the entity to load.
Returns:
the column


Copyright © 2002-2004 devaki.org. All Rights Reserved.