com.sri.emo.controller
Class ModelXMLReader

java.lang.Object
  extended by com.sri.emo.controller.ModelXMLReader

public class ModelXMLReader
extends Object

Reads Models from XML, nodes and all if desired.

Author:
Michael Rimov, Larry Hamel

Constructor Summary
ModelXMLReader()
          Default constructor.
 
Method Summary
 Map createNodesFromXml(boolean isFindAllIds, boolean isExternalRefRequired, List relatedNodes, List referenceNodes, Node rootnode, ExpressoRequest request, org.dom4j.Element root, List pickLists)
           
 void parseAndAddNodes(boolean isExternalRefRequired, ExpressoRequest request, HashMap allNodesByXML_ID, Node rootnode, List pickListElements)
           
 NodeType parseEntityAndParts(org.dom4j.Element origroot)
          Parses an entity and its associated parts.
 Map parseImportXmlAndCreateNodes(boolean isFindAllIds, boolean isExternalRefRequired, org.dom4j.Element root, ExpressoRequest request, String xpathSelectionPrefix)
          Parses and creates the appropriate nodes as received in the import.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelXMLReader

public ModelXMLReader()
Default constructor.

Method Detail

parseEntityAndParts

public NodeType parseEntityAndParts(org.dom4j.Element origroot)
                             throws NumberFormatException,
                                    DBException
Parses an entity and its associated parts.

Parameters:
origroot - Element the element in an XML document to parse.
Returns:
NodeType the instantiated NodeType that we just parsed. [It is already added or updated to the database]
Throws:
NumberFormatException - upon integer parsing error.
DBException - upon Database exception.

parseImportXmlAndCreateNodes

public Map parseImportXmlAndCreateNodes(boolean isFindAllIds,
                                        boolean isExternalRefRequired,
                                        org.dom4j.Element root,
                                        ExpressoRequest request,
                                        String xpathSelectionPrefix)
                                 throws DBException,
                                        Exception
Parses and creates the appropriate nodes as received in the import.

Parameters:
isFindAllIds - boolean
isExternalRefRequired - boolean
root - Element the root element we're parsing.
request - ExpressoRequest the ControllerRequset.
Returns:
Map keyed by 'ident' attribute. values == the actual node.
Throws:
DBException - upon add error.
Exception - upon exception.

createNodesFromXml

public Map createNodesFromXml(boolean isFindAllIds,
                              boolean isExternalRefRequired,
                              List relatedNodes,
                              List referenceNodes,
                              Node rootnode,
                              ExpressoRequest request,
                              org.dom4j.Element root,
                              List pickLists)
                       throws Exception
Throws:
Exception

parseAndAddNodes

public void parseAndAddNodes(boolean isExternalRefRequired,
                             ExpressoRequest request,
                             HashMap allNodesByXML_ID,
                             Node rootnode,
                             List pickListElements)
                      throws Exception
Throws:
Exception


Copyright © 2004-2006 Codeguild, Inc.. All Rights Reserved.