Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.enhydra.kelp.common.node
Class OtterXMLCNode  view OtterXMLCNode download OtterXMLCNode.java

java.lang.Object
  extended byorg.enhydra.kelp.common.node.OtterXMLCNode
All Implemented Interfaces:
OtterDocumentNode, OtterNode, PropertyKeys

public class OtterXMLCNode
extends java.lang.Object
implements OtterDocumentNode

Class declaration


Nested Class Summary
(package private)  class OtterXMLCNode.LocalException
          Class declaration
 
Field Summary
static int CLASS_NAME_CUSTOM
           
static int CLASS_NAME_DEFAULT
           
static int CLASS_NAME_MAPPED
           
private  OtterDocumentNode docNode
           
private  java.lang.String DOMFACTORY
           
private  java.lang.String IMPL
           
private  org.enhydra.kelp.common.bridge.MetaDataHandler metaDataHandler
           
private  java.lang.String POUND
           
(package private) static java.util.ResourceBundle res
           
 
Fields inherited from interface org.enhydra.kelp.common.node.PropertyKeys
DEFAULT_CONTENT, DEPLOY_BUILD, DEPLOY_CONTENT_TYPES, DEPLOY_ECHO, DEPLOY_INPUT_FILTER, DEPLOY_OVERWRITE, DEPLOY_PATH_BOOTSTRAP, DEPLOY_PATH_INPUT, DEPLOY_PATH_RESOURCE, DEPLOY_PATH_ROOT, DEPLOY_STARTUP_JAVA, DEPLOY_STARTUP_RUN, DEPLOY_TABLE_FIND, DEPLOY_TABLE_LENGTH, DEPLOY_TABLE_REPLACE, DEPLOY_WEB_APP, NAME_AUTO_PACK, NAME_GENTO, NAME_LIBRARIES, NAME_RESOURCE_STATIC, NAME_SELECTED, NAME_WORKING_DIR, NAME_XMLC_CUSTOM, NAME_XMLC_OPTION_FILEPATH, NAME_XMLC_PARAMETERS, NAME_XMLC_TYPE, VALUE_ENHYDRA, XMLC_BUILD, XMLC_DOC_TYPES, XMLC_MAP_PACKAGE_FROM, XMLC_MAP_PACKAGE_LENGTH, XMLC_MAP_PACKAGE_TO, XMLC_MAP_SCOPE, XMLC_OUTPUT_FILENAME, XMLC_PRINT_ACCESSOR, XMLC_PRINT_DOC, XMLC_PRINT_DOM, XMLC_PRINT_PARSE, XMLC_VERBOSE
 
Constructor Summary
OtterXMLCNode(OtterDocumentNode d)
          Create a node to use when calling XMLC.
 
Method Summary
private  java.lang.String[] addDomFactory(java.lang.String[] in)
           
private  java.lang.String baseOut()
           
private  java.lang.String[] getAllOptionFilenames()
          Method declaration
private  java.lang.String[] getAllParameters(boolean forPrint)
          Method declaration
 java.io.File getClassFile()
          Get the class file that we expect after XMLC has generated a java file and called javac to compile it.
 int getClassNameType()
          Method declaration
 java.lang.String getCustomClassName()
          Method declaration
 java.lang.Throwable getException()
          Get an exception that occured when invoking XMLC.
 java.lang.String getFilePath()
          Method declaration
 java.lang.String getGenerateToRoot()
           
private  java.io.File getGenToDirectory()
          Get the generate to directory and create the directory if needed.
private  java.lang.String getGenToPath()
          Get the generate to directory as a string.
 org.enhydra.kelp.common.bridge.MetaDataHandler getMetaDataHandler()
          Get the XMLC options selected this HTML/WML file.
 java.lang.Object getNativeNode()
          Method declaration
 java.io.File getOptionFileForRecomp()
           
private  java.lang.String getPackagePath()
          Method declaration
 OtterNode getParent()
           
 OtterProject getProject()
          Method declaration
 java.lang.String getProperty(java.lang.String n)
          Method declaration
 java.lang.String getXMLCOptionFilePath()
          Method declaration
 java.lang.String getXMLCParameters()
          Method declaration
private  void initClassName()
          Create a class name for the given HTML/WML file and map the package name as needed.
private  void initJavaSourceFile()
          Method declaration
private  void initMetaDataHandler()
          Initialize the XMLC options.
 void initProjectOptions()
          Method declaration
 boolean isNewJavaFound()
          True if we can find the Java source file that we expect XMLC to create.
 boolean isSelected()
          Method declaration
 boolean isStatic()
           
private  void parseOptions()
          Method declaration
 void preCompile()
          Method declaration
 void replaceGeneratedSource(boolean forRecomp)
          Add the generated Java source file to the IDE project.
 void save()
           
 void setClassNameType(int newType)
          Method declaration
 void setCustomClassName(java.lang.String n)
          Method declaration
 void setException(java.lang.Throwable e)
          Save Exception information for reporting.
 void setNativeNode(java.lang.Object o)
          Method declaration
 void setProperty(java.lang.String n, int v)
          Method declaration
 void setProperty(java.lang.String n, java.lang.String v)
          Method declaration
 void setSelected(boolean b)
          Method declaration
 void setStatic(boolean b)
           
 void setXMLCOptionFilePath(java.lang.String n)
          Method declaration
 void setXMLCParameters(java.lang.String p)
          Method declaration
private  void syncProjectToType(int type)
          Method declaration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

res

static java.util.ResourceBundle res

POUND

private final java.lang.String POUND
See Also:
Constant Field Values

DOMFACTORY

private final java.lang.String DOMFACTORY
See Also:
Constant Field Values

IMPL

private final java.lang.String IMPL
See Also:
Constant Field Values

CLASS_NAME_DEFAULT

public static final int CLASS_NAME_DEFAULT
See Also:
Constant Field Values

CLASS_NAME_CUSTOM

public static final int CLASS_NAME_CUSTOM
See Also:
Constant Field Values

CLASS_NAME_MAPPED

public static final int CLASS_NAME_MAPPED
See Also:
Constant Field Values

metaDataHandler

private org.enhydra.kelp.common.bridge.MetaDataHandler metaDataHandler

docNode

private OtterDocumentNode docNode
Constructor Detail

OtterXMLCNode

public OtterXMLCNode(OtterDocumentNode d)
Create a node to use when calling XMLC.

Method Detail

getXMLCOptionFilePath

public java.lang.String getXMLCOptionFilePath()
Method declaration

Specified by:
getXMLCOptionFilePath in interface OtterNode

setXMLCOptionFilePath

public void setXMLCOptionFilePath(java.lang.String n)
Method declaration

Specified by:
setXMLCOptionFilePath in interface OtterNode

getXMLCParameters

public java.lang.String getXMLCParameters()
Method declaration

Specified by:
getXMLCParameters in interface OtterNode

setXMLCParameters

public void setXMLCParameters(java.lang.String p)
Method declaration

Specified by:
setXMLCParameters in interface OtterNode

isSelected

public boolean isSelected()
Method declaration

Specified by:
isSelected in interface OtterNode

setSelected

public void setSelected(boolean b)
Method declaration

Specified by:
setSelected in interface OtterNode

isStatic

public boolean isStatic()
Specified by:
isStatic in interface OtterDocumentNode

setStatic

public void setStatic(boolean b)
Specified by:
setStatic in interface OtterDocumentNode

getFilePath

public java.lang.String getFilePath()
Method declaration

Specified by:
getFilePath in interface OtterNode

getCustomClassName

public java.lang.String getCustomClassName()
Method declaration


setCustomClassName

public void setCustomClassName(java.lang.String n)
Method declaration


getNativeNode

public java.lang.Object getNativeNode()
Method declaration

Specified by:
getNativeNode in interface OtterNode

setNativeNode

public void setNativeNode(java.lang.Object o)
Method declaration

Specified by:
setNativeNode in interface OtterNode

getProject

public OtterProject getProject()
Method declaration

Specified by:
getProject in interface OtterNode

getProperty

public java.lang.String getProperty(java.lang.String n)
Method declaration

Specified by:
getProperty in interface OtterNode

setProperty

public void setProperty(java.lang.String n,
                        java.lang.String v)
Method declaration

Specified by:
setProperty in interface OtterNode

setProperty

public void setProperty(java.lang.String n,
                        int v)
Method declaration

Specified by:
setProperty in interface OtterNode

getClassNameType

public int getClassNameType()
Method declaration


setClassNameType

public void setClassNameType(int newType)
Method declaration


getAllParameters

private java.lang.String[] getAllParameters(boolean forPrint)
Method declaration


addDomFactory

private java.lang.String[] addDomFactory(java.lang.String[] in)

getAllOptionFilenames

private java.lang.String[] getAllOptionFilenames()
Method declaration


syncProjectToType

private void syncProjectToType(int type)
Method declaration


setException

public void setException(java.lang.Throwable e)
Save Exception information for reporting. This lets exceptions from multiple nodes to be reported in a batch.

Specified by:
setException in interface OtterNode

getException

public java.lang.Throwable getException()
Get an exception that occured when invoking XMLC. Null if the node has not been compiled or was compiled without error.

Specified by:
getException in interface OtterNode

getParent

public OtterNode getParent()
Specified by:
getParent in interface OtterNode

save

public void save()
Specified by:
save in interface OtterNode

getMetaDataHandler

public org.enhydra.kelp.common.bridge.MetaDataHandler getMetaDataHandler()
Get the XMLC options selected this HTML/WML file.


replaceGeneratedSource

public void replaceGeneratedSource(boolean forRecomp)
Add the generated Java source file to the IDE project. Do not call this when using Win32 JBuilder as it can't handle the width of source lines generated by XMLC.


initProjectOptions

public void initProjectOptions()
Method declaration


getGenerateToRoot

public java.lang.String getGenerateToRoot()

initMetaDataHandler

private void initMetaDataHandler()
Initialize the XMLC options.


parseOptions

private void parseOptions()
                   throws org.enhydra.xml.xmlc.XMLCException,
                          java.io.IOException
Method declaration


initJavaSourceFile

private void initJavaSourceFile()
Method declaration


getGenToDirectory

private java.io.File getGenToDirectory()
Get the generate to directory and create the directory if needed. This is where the Java source files are created.


getGenToPath

private java.lang.String getGenToPath()
Get the generate to directory as a string. This is where XMLC will create Java source files.


getPackagePath

private java.lang.String getPackagePath()
Method declaration


initClassName

private void initClassName()
Create a class name for the given HTML/WML file and map the package name as needed. Mapping allows users to specify a package name to use for all the HTML/WML files in a directory.


baseOut

private java.lang.String baseOut()

getClassFile

public java.io.File getClassFile()
Get the class file that we expect after XMLC has generated a java file and called javac to compile it.


getOptionFileForRecomp

public java.io.File getOptionFileForRecomp()

isNewJavaFound

public boolean isNewJavaFound()
True if we can find the Java source file that we expect XMLC to create. This is used to in reporting compilation results.


preCompile

public void preCompile()
                throws org.enhydra.xml.xmlc.XMLCException,
                       java.io.IOException
Method declaration

Specified by:
preCompile in interface OtterDocumentNode