Sun Message Library for HL7

com.stc.hl7.installer
Class XSDOtdLibInstaller

java.lang.Object
  extended by com.stc.hl7.installer.XSDOtdLibInstaller

public class XSDOtdLibInstaller
extends java.lang.Object

XSDOtdLibInstaller installs an OTD Library into the SeeBeyond Repository. Each OTD is stored as a xsdObjectTypeDefinition The OTDs are referenced in a Project called OTDs with the Project path defined by the directory path in the SAR file.

Author:
Raghunadh Teegavarapu

Constructor Summary
XSDOtdLibInstaller()
          Constructs an empty XSDOtdLibInstaller
 
Method Summary
protected  java.util.Set buildXsdBuilderSpecs(XSDFileSet fileSet)
          Creates XSDBuilderSpec for each XSDFile
protected  void buildXSDOTD(com.stc.otd.xsd.builder.XsdBuilderSpec aSpec)
          Builds XSD OTDs
 void execute(java.io.File tmpDir, org.apache.tools.ant.Project antProject, java.lang.String projectPath, java.util.List fileSets)
          Create otds for the xsds and installs them into Repository
protected  com.stc.model.common.Project generateDirectoryStructure(java.lang.String otdPath)
          Creates the project directory structure
protected  java.util.Vector mergeTopNodeNames(java.lang.String baseFileName, java.lang.String baseTopNames, java.lang.String specificTopNames)
          Merges Top Node Names of XSDFileSet and XSDFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSDOtdLibInstaller

public XSDOtdLibInstaller()
Constructs an empty XSDOtdLibInstaller

Method Detail

execute

public void execute(java.io.File tmpDir,
                    org.apache.tools.ant.Project antProject,
                    java.lang.String projectPath,
                    java.util.List fileSets)
             throws org.apache.tools.ant.BuildException
Create otds for the xsds and installs them into Repository

Parameters:
tmpDir - A temporary directory on the file system
antProject - A reference to ant project
projectPath - A string representing the project path
fileSets - A set of XSDFiles
Throws:
org.apache.tools.ant.BuildException - exception upon error

buildXSDOTD

protected void buildXSDOTD(com.stc.otd.xsd.builder.XsdBuilderSpec aSpec)
                    throws java.lang.Exception
Builds XSD OTDs

Parameters:
aSpec - OtdBuilderspecification for XsdOtdBuilder
Throws:
java.lang.Exception - exception upon error

generateDirectoryStructure

protected com.stc.model.common.Project generateDirectoryStructure(java.lang.String otdPath)
                                                           throws java.lang.Exception
Creates the project directory structure

Parameters:
otdPath - otdPath
Returns:
Project com.stc.model.common.Project
Throws:
java.lang.Exception - exception upon error

buildXsdBuilderSpecs

protected java.util.Set buildXsdBuilderSpecs(XSDFileSet fileSet)
                                      throws java.lang.Exception
Creates XSDBuilderSpec for each XSDFile

Parameters:
fileSet - A set of XSDFile objects
Returns:
Set A set of XSDBuilderSpec objects
Throws:
java.lang.Exception - exception upon error

mergeTopNodeNames

protected java.util.Vector mergeTopNodeNames(java.lang.String baseFileName,
                                             java.lang.String baseTopNames,
                                             java.lang.String specificTopNames)
Merges Top Node Names of XSDFileSet and XSDFile

Parameters:
baseFileName - A string representing the base file name
baseTopNames - XSDFileSet top names
specificTopNames - XSDFile top names
Returns:
a vector of top node names

Sun Message Library for HL7