org.apache.torque.task
Class TorqueMergeXMLDoc

java.lang.Object
  extended by Task
      extended by org.apache.torque.task.TorqueMergeXMLDoc

public class TorqueMergeXMLDoc
extends Task

This ant task will merge the schema-desc.xml with schema.xml, if schema-description.xml exists

Author:
Kuali Rice Team (kuali-rice@googlegroups.com)

Constructor Summary
TorqueMergeXMLDoc()
           
 
Method Summary
 Document createNewXML(Document dbSchemaDoc, Document schemaWithDescDoc)
          merges the two xml document.
 void execute()
           
 File getDbSchema()
           
 void mergeSchemas(File schemaWithDesc, File dbSchema)
          performs the merge operation by taking two input files as input and then merges the file with description into the existing schema.xml file
 void setDbSchema(String dbSchemaString)
           
 void setDbSchemaString(String dbSchemaString)
           
static Document setDocument(File file)
          creates a document object from an input file
 void setSchemaWithDesc(String schemaWithDescString)
           
 void setSchemaWithDescString(String schemaWithDescString)
           
 void writeXMLToFile(Document newXMLDocument)
          writes the document object to an output file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TorqueMergeXMLDoc

public TorqueMergeXMLDoc()
Method Detail

setDbSchemaString

public void setDbSchemaString(String dbSchemaString)

setSchemaWithDescString

public void setSchemaWithDescString(String schemaWithDescString)

getDbSchema

public File getDbSchema()

setSchemaWithDesc

public void setSchemaWithDesc(String schemaWithDescString)

setDbSchema

public void setDbSchema(String dbSchemaString)

setDocument

public static Document setDocument(File file)
                            throws ParserConfigurationException,
                                   SAXException,
                                   IOException
creates a document object from an input file

Parameters:
file -
Returns:
Document object
Throws:
ParserConfigurationException
SAXException
IOException

mergeSchemas

public void mergeSchemas(File schemaWithDesc,
                         File dbSchema)
                  throws Exception
performs the merge operation by taking two input files as input and then merges the file with description into the existing schema.xml file

Parameters:
schemaWithDesc -
dbSchema -
Throws:
Exception

createNewXML

public Document createNewXML(Document dbSchemaDoc,
                             Document schemaWithDescDoc)
                      throws Exception
merges the two xml document. The resulting document will be same as schema.xml except it will have a description attribute for all its tables and columns.

Throws:
Exception

writeXMLToFile

public void writeXMLToFile(Document newXMLDocument)
                    throws Exception
writes the document object to an output file

Parameters:
newXMLDocument - output xml document
Throws:
Exception

execute

public void execute()
             throws BuildException
Throws:
BuildException


Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.