org.apache.torque.task
Class TorqueMergeXMLDoc
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.torque.task.TorqueMergeXMLDoc
public class TorqueMergeXMLDoc
- extends org.apache.tools.ant.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)
Fields inherited from class org.apache.tools.ant.Task |
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, setProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TorqueMergeXMLDoc
public TorqueMergeXMLDoc()
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 org.apache.tools.ant.BuildException
- Overrides:
execute
in class org.apache.tools.ant.Task
- Throws:
org.apache.tools.ant.BuildException
Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.