Apigen

edu.uci.isr.apigen
Class ApiGen

java.lang.Object
  extended byedu.uci.isr.apigen.ApiGen

public class ApiGen
extends Object


Field Summary
protected  File dir
           
protected  SchemaLocationMap locMap
           
protected static String packageRootDirName
           
static String PRODUCT_NAME
           
static String PRODUCT_VERSION
           
protected  SchemaMap schemaMap
           
 
Constructor Summary
ApiGen(SchemaLocationMap locMap, File dir)
           
 
Method Summary
protected  void addPackageToPackageList(File packageListFile, String packageName)
           
static void argError(String[] args)
           
static void autoGenerate(String fileName, String outDir, List mapAdditions, List schemaAdditions)
           
protected static String capFirstLetter(String s)
           
protected  void copyFile(File baseUtilsDir, String outFile, boolean incCopyright)
           
protected  void copyFile(File baseUtilsDir, String outFile, String inFile, boolean incCopyright)
           
protected static Collection getAllXsdElements(XsdComplexType complexType)
           
protected static Collection getAllXsdElements(XsdExtension extension)
           
protected static Collection getAllXsdTypesUsed(XsdSchema schema)
           
protected  String getNodeTypeString(Node n)
           
protected static String getPackageTitle(String schemaURI)
           
protected  XsdAttribute getRefAttribute(XsdSchema schema, String unfixedRef)
           
protected  XsdElement getRefElement(XsdSchema schema, String unfixedRef)
           
protected  SchemaAndType getXsdType(XsdSchema schema, String unfixedTypeName)
           
static void main(String[] args)
           
protected  void mapSchema(String uri)
           
protected static String nullRemainingVars(String s)
           
protected  void processComplexSimpleType(XsdComplexType complexType, XsdSchema schema, TokenMap baseTokMap, File packageDir)
           
protected  void processComplexType(XsdComplexType complexType, XsdSchema schema, TokenMap baseTokMap, File packageDir)
           
 void processSchema(String uri)
           
protected  void processSimpleType(XsdSimpleType simpleType, XsdSchema schema, TokenMap baseTokMap, File packageDir)
           
protected  void processXSDSimpleType(String xsdTypeName, XsdSchema schema, TokenMap baseTokMap, File packageDir)
           
protected  void readInto(StringBuffer sb, TokenMap tokMap, String dataFile)
           
protected  StringBuffer readIntoBuffer(StringBuffer sb, Reader r)
           
protected static String toConstantCase(String s)
           
protected  void writeFile(File f, Reader r, boolean append)
           
protected  void writeFile(File f, String s, boolean append)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRODUCT_NAME

public static final String PRODUCT_NAME
See Also:
Constant Field Values

PRODUCT_VERSION

public static final String PRODUCT_VERSION

packageRootDirName

protected static final String packageRootDirName

locMap

protected SchemaLocationMap locMap

schemaMap

protected SchemaMap schemaMap

dir

protected File dir
Constructor Detail

ApiGen

public ApiGen(SchemaLocationMap locMap,
              File dir)
Method Detail

main

public static void main(String[] args)

argError

public static void argError(String[] args)

autoGenerate

public static void autoGenerate(String fileName,
                                String outDir,
                                List mapAdditions,
                                List schemaAdditions)

getPackageTitle

protected static String getPackageTitle(String schemaURI)

mapSchema

protected void mapSchema(String uri)

copyFile

protected void copyFile(File baseUtilsDir,
                        String outFile,
                        String inFile,
                        boolean incCopyright)

copyFile

protected void copyFile(File baseUtilsDir,
                        String outFile,
                        boolean incCopyright)

readInto

protected void readInto(StringBuffer sb,
                        TokenMap tokMap,
                        String dataFile)

processSchema

public void processSchema(String uri)

addPackageToPackageList

protected void addPackageToPackageList(File packageListFile,
                                       String packageName)
                                throws IOException
Throws:
IOException

processSimpleType

protected void processSimpleType(XsdSimpleType simpleType,
                                 XsdSchema schema,
                                 TokenMap baseTokMap,
                                 File packageDir)

processXSDSimpleType

protected void processXSDSimpleType(String xsdTypeName,
                                    XsdSchema schema,
                                    TokenMap baseTokMap,
                                    File packageDir)

processComplexSimpleType

protected void processComplexSimpleType(XsdComplexType complexType,
                                        XsdSchema schema,
                                        TokenMap baseTokMap,
                                        File packageDir)

processComplexType

protected void processComplexType(XsdComplexType complexType,
                                  XsdSchema schema,
                                  TokenMap baseTokMap,
                                  File packageDir)

getAllXsdElements

protected static Collection getAllXsdElements(XsdExtension extension)

getAllXsdElements

protected static Collection getAllXsdElements(XsdComplexType complexType)

getRefAttribute

protected XsdAttribute getRefAttribute(XsdSchema schema,
                                       String unfixedRef)

getRefElement

protected XsdElement getRefElement(XsdSchema schema,
                                   String unfixedRef)

getXsdType

protected SchemaAndType getXsdType(XsdSchema schema,
                                   String unfixedTypeName)

getNodeTypeString

protected String getNodeTypeString(Node n)

writeFile

protected void writeFile(File f,
                         String s,
                         boolean append)

writeFile

protected void writeFile(File f,
                         Reader r,
                         boolean append)

readIntoBuffer

protected StringBuffer readIntoBuffer(StringBuffer sb,
                                      Reader r)

getAllXsdTypesUsed

protected static Collection getAllXsdTypesUsed(XsdSchema schema)

capFirstLetter

protected static String capFirstLetter(String s)

toConstantCase

protected static String toConstantCase(String s)

nullRemainingVars

protected static String nullRemainingVars(String s)

Apigen