|
What this is
This file is included in the DevDaily.com
"Java Source Code
Warehouse" project. The intent of this project is to help you "Learn
Java by Example" TM.
Other links
The source code
/**
* This generated bean class S2bConfig
* matches the schema element 's2bConfig'.
*
*
* This class matches the root element of the XML Schema,
* and is the root of the bean graph.
*
* s2bConfig : S2bConfig
* schemaType : java.lang.String
* traceParse : boolean[0,1]
* traceGen : boolean[0,1]
* traceMisc : boolean[0,1]
* traceDot : boolean[0,1]
* filename : java.io.File[0,1] [Switch]
* fileIn : java.io.InputStream[0,1]
* docRoot : java.lang.String[0,1] [Switch]
* rootDir : java.io.File [Switch]
* packagePath : java.lang.String[0,1] [Switch]
* indent : java.lang.String
* indentAmount : int[0,1] [Switch]
* mddFile : java.io.File[0,1] [Switch]
* mddIn : java.io.InputStream[0,1]
* metaDD : org.netbeans.modules.schema2beansdev.metadd.MetaDD[0,1]
* doGeneration : boolean
* scalarException : boolean [Switch]
* dumpToString : boolean[0,1] [Switch]
* vetoable : boolean[0,1] [Switch]
* standalone : boolean[0,1] [Switch]
* auto : boolean[0,1] [Switch]
* messageOut : java.io.PrintStream[0,1]
* outputStreamProvider : org.netbeans.modules.schema2beansdev.GenBeans.OutputStreamProvider[0,1]
* throwErrors : boolean[0,1] [Switch]
* generateXMLIO : boolean
* generateValidate : boolean[0,1] [Switch]
* generatePropertyEvents : boolean[0,1] [Switch]
* generateStoreEvents : boolean[0,1]
* generateTransactions : boolean[0,1] [Switch]
* attributesAsProperties : boolean[0,1] [Switch]
* generateDelegator : boolean[0,1] [Switch]
* delegateDir : java.io.File[0,1] [Switch]
* delegatePackage : java.lang.String[0,1] [Switch]
* generateCommonInterface : java.lang.String[0,1] [Switch]
* defaultsAccessable : boolean[0,1] [Switch]
* useInterfaces : boolean[0,1] [Switch]
* generateInterfaces : boolean[0,1] [Switch]
* keepElementPositions : boolean[0,1] [Switch]
* removeUnreferencedNodes : boolean[0,1] [Switch]
* inputURI : java.lang.String[0,1]
* indexedPropertyType : java.lang.String [Switch]
* doCompile : boolean[0,1] [Switch]
* generateSwitches : boolean[0,1] [Switch]
* dumpBeanTree : java.io.File[0,1] [Switch]
* generateDotGraph : java.io.File[0,1] [Switch]
* processComments : boolean[0,1] [Switch]
* processDocType : boolean[0,1] [Switch]
* checkUpToDate : boolean[0,1] [Switch]
* generateParentRefs : boolean[0,1]
* generateHasChanged : boolean[0,1] [Switch]
* newestSourceTime : long[0,1]
* writeBeanGraphFile : java.io.File[0,1] [Switch]
* readBeanGraphFiles : java.io.File[0,n] [Switch]
* readBeanGraphs : org.netbeans.modules.schema2beansdev.beangraph.BeanGraph[0,n]
* minFeatures : boolean[0,1] [Switch]
* forME : boolean[0,1] [Switch]
* generateTagsFile : boolean[0,1] [Switch]
* codeGeneratorFactory : org.netbeans.modules.schema2beansdev.CodeGeneratorFactory[0,1]
* generateTimeStamp : boolean [Switch]
* quiet : boolean [Switch]
* writeConfig : java.io.File[0,1] [Switch]
* readConfig : java.io.File[0,n] [Switch]
* makeDefaults : boolean [Switch]
* setDefaults : boolean[0,1] [Switch]
* trimNonStrings : boolean[0,1] [Switch]
* useRuntime : boolean[0,1] [Switch]
* extendBaseBean : boolean[0,1] [Switch]
* finder : java.lang.String[0,n] [Switch]
*
* @Generated
*/
package org.netbeans.modules.schema2beansdev;
public class S2bConfig {
public static final String SCHEMATYPE = "SchemaType"; // NOI18N
public static final String TRACEPARSE = "TraceParse"; // NOI18N
public static final String TRACEGEN = "TraceGen"; // NOI18N
public static final String TRACEMISC = "TraceMisc"; // NOI18N
public static final String TRACEDOT = "TraceDot"; // NOI18N
public static final String FILENAME = "Filename"; // NOI18N
public static final String FILEIN = "FileIn"; // NOI18N
public static final String DOCROOT = "DocRoot"; // NOI18N
public static final String ROOTDIR = "RootDir"; // NOI18N
public static final String PACKAGEPATH = "PackagePath"; // NOI18N
public static final String INDENT = "Indent"; // NOI18N
public static final String INDENTAMOUNT = "IndentAmount"; // NOI18N
public static final String MDDFILE = "MddFile"; // NOI18N
public static final String MDDIN = "MddIn"; // NOI18N
public static final String METADD = "MetaDD"; // NOI18N
public static final String DOGENERATION = "DoGeneration"; // NOI18N
public static final String SCALAREXCEPTION = "ScalarException"; // NOI18N
public static final String DUMPTOSTRING = "DumpToString"; // NOI18N
public static final String VETOABLE = "Vetoable"; // NOI18N
public static final String STANDALONE = "Standalone"; // NOI18N
public static final String AUTO = "Auto"; // NOI18N
public static final String MESSAGEOUT = "MessageOut"; // NOI18N
public static final String OUTPUTSTREAMPROVIDER = "OutputStreamProvider"; // NOI18N
public static final String THROWERRORS = "ThrowErrors"; // NOI18N
public static final String GENERATEXMLIO = "GenerateXMLIO"; // NOI18N
public static final String GENERATEVALIDATE = "GenerateValidate"; // NOI18N
public static final String GENERATEPROPERTYEVENTS = "GeneratePropertyEvents"; // NOI18N
public static final String GENERATESTOREEVENTS = "GenerateStoreEvents"; // NOI18N
public static final String GENERATETRANSACTIONS = "GenerateTransactions"; // NOI18N
public static final String ATTRIBUTESASPROPERTIES = "AttributesAsProperties"; // NOI18N
public static final String GENERATEDELEGATOR = "GenerateDelegator"; // NOI18N
public static final String DELEGATEDIR = "DelegateDir"; // NOI18N
public static final String DELEGATEPACKAGE = "DelegatePackage"; // NOI18N
public static final String GENERATECOMMONINTERFACE = "GenerateCommonInterface"; // NOI18N
public static final String DEFAULTSACCESSABLE = "DefaultsAccessable"; // NOI18N
public static final String USEINTERFACES = "UseInterfaces"; // NOI18N
public static final String GENERATEINTERFACES = "GenerateInterfaces"; // NOI18N
public static final String KEEPELEMENTPOSITIONS = "KeepElementPositions"; // NOI18N
public static final String REMOVEUNREFERENCEDNODES = "RemoveUnreferencedNodes"; // NOI18N
public static final String INPUTURI = "InputURI"; // NOI18N
public static final String INDEXEDPROPERTYTYPE = "IndexedPropertyType"; // NOI18N
public static final String DOCOMPILE = "DoCompile"; // NOI18N
public static final String GENERATESWITCHES = "GenerateSwitches"; // NOI18N
public static final String DUMPBEANTREE = "DumpBeanTree"; // NOI18N
public static final String GENERATEDOTGRAPH = "GenerateDotGraph"; // NOI18N
public static final String PROCESSCOMMENTS = "ProcessComments"; // NOI18N
public static final String PROCESSDOCTYPE = "ProcessDocType"; // NOI18N
public static final String CHECKUPTODATE = "CheckUpToDate"; // NOI18N
public static final String GENERATEPARENTREFS = "GenerateParentRefs"; // NOI18N
public static final String GENERATEHASCHANGED = "GenerateHasChanged"; // NOI18N
public static final String NEWESTSOURCETIME = "NewestSourceTime"; // NOI18N
public static final String WRITEBEANGRAPHFILE = "WriteBeanGraphFile"; // NOI18N
public static final String READBEANGRAPHFILES = "ReadBeanGraphFiles"; // NOI18N
public static final String READBEANGRAPHS = "ReadBeanGraphs"; // NOI18N
public static final String MINFEATURES = "MinFeatures"; // NOI18N
public static final String FORME = "ForME"; // NOI18N
public static final String GENERATETAGSFILE = "GenerateTagsFile"; // NOI18N
public static final String CODEGENERATORFACTORY = "CodeGeneratorFactory"; // NOI18N
public static final String GENERATETIMESTAMP = "GenerateTimeStamp"; // NOI18N
public static final String QUIET = "Quiet"; // NOI18N
public static final String WRITECONFIG = "WriteConfig"; // NOI18N
public static final String READCONFIG = "ReadConfig"; // NOI18N
public static final String MAKEDEFAULTS = "MakeDefaults"; // NOI18N
public static final String SETDEFAULTS = "SetDefaults"; // NOI18N
public static final String TRIMNONSTRINGS = "TrimNonStrings"; // NOI18N
public static final String USERUNTIME = "UseRuntime"; // NOI18N
public static final String EXTENDBASEBEAN = "ExtendBaseBean"; // NOI18N
public static final String FINDER = "Finder"; // NOI18N
private java.lang.String _SchemaType = "xmlschema";
private boolean _TraceParse;
private boolean _TraceGen;
private boolean _TraceMisc;
private boolean _TraceDot;
private java.io.File _Filename;
private java.io.InputStream _FileIn;
private java.lang.String _DocRoot;
private java.io.File _RootDir = new java.io.File(".");
private java.lang.String _PackagePath;
private java.lang.String _Indent = "\t";
private int _IndentAmount;
private java.io.File _MddFile;
private java.io.InputStream _MddIn;
private org.netbeans.modules.schema2beansdev.metadd.MetaDD _MetaDD;
private boolean _DoGeneration = true;
private boolean _ScalarException = true;
private boolean _DumpToString;
private boolean _Vetoable;
private boolean _Standalone;
private boolean _Auto;
private java.io.PrintStream _MessageOut;
private org.netbeans.modules.schema2beansdev.GenBeans.OutputStreamProvider _OutputStreamProvider;
private boolean _ThrowErrors;
private boolean _GenerateXMLIO = true;
private boolean _GenerateValidate;
private boolean _GeneratePropertyEvents;
private boolean _GenerateStoreEvents;
private boolean _GenerateTransactions;
private boolean _AttributesAsProperties;
private boolean _GenerateDelegator;
private java.io.File _DelegateDir;
private java.lang.String _DelegatePackage;
private java.lang.String _GenerateCommonInterface;
private boolean _DefaultsAccessable;
private boolean _UseInterfaces;
private boolean _GenerateInterfaces;
private boolean _KeepElementPositions;
private boolean _RemoveUnreferencedNodes;
private java.lang.String _InputURI;
private java.lang.String _IndexedPropertyType = "java.util.ArrayList";
private boolean _DoCompile;
private boolean _GenerateSwitches;
private java.io.File _DumpBeanTree;
private java.io.File _GenerateDotGraph;
private boolean _ProcessComments;
private boolean _ProcessDocType;
private boolean _CheckUpToDate;
private boolean _GenerateParentRefs;
private boolean _GenerateHasChanged;
private long _NewestSourceTime;
private java.io.File _WriteBeanGraphFile;
private java.util.List _ReadBeanGraphFiles = new java.util.ArrayList(); // List
private java.util.List _ReadBeanGraphs = new java.util.ArrayList(); // List
private boolean _MinFeatures;
private boolean _ForME;
private boolean _GenerateTagsFile;
private org.netbeans.modules.schema2beansdev.CodeGeneratorFactory _CodeGeneratorFactory;
private boolean _GenerateTimeStamp = true;
private boolean _Quiet;
private java.io.File _WriteConfig;
private java.util.List _ReadConfig = new java.util.ArrayList(); // List
private boolean _MakeDefaults = true;
private boolean _SetDefaults;
private boolean _TrimNonStrings;
private boolean _UseRuntime;
private boolean _ExtendBaseBean;
private java.util.List _Finder = new java.util.ArrayList(); // List
private java.lang.String schemaLocation;
/**
* Normal starting point constructor.
*/
public S2bConfig() {
}
/**
* Required parameters constructor
*/
public S2bConfig(java.lang.String schemaType, java.io.File rootDir, java.lang.String indent, boolean doGeneration, boolean scalarException, boolean generateXMLIO, java.lang.String indexedPropertyType, boolean generateTimeStamp, boolean quiet, boolean makeDefaults) {
_SchemaType = schemaType;
_RootDir = rootDir;
_Indent = indent;
_DoGeneration = doGeneration;
_ScalarException = scalarException;
_GenerateXMLIO = generateXMLIO;
_IndexedPropertyType = indexedPropertyType;
_GenerateTimeStamp = generateTimeStamp;
_Quiet = quiet;
_MakeDefaults = makeDefaults;
}
/**
* Deep copy
*/
public S2bConfig(org.netbeans.modules.schema2beansdev.S2bConfig source) {
this(source, false);
}
/**
* Deep copy
* @param justData just copy the XML relevant data
*/
public S2bConfig(org.netbeans.modules.schema2beansdev.S2bConfig source, boolean justData) {
_SchemaType = source._SchemaType;
_TraceParse = source._TraceParse;
_TraceGen = source._TraceGen;
_TraceMisc = source._TraceMisc;
_TraceDot = source._TraceDot;
_Filename = (source._Filename == null) ? null : new java.io.File(source._Filename.getAbsolutePath());
_FileIn = source._FileIn;
_DocRoot = source._DocRoot;
_RootDir = (source._RootDir == null) ? null : new java.io.File(source._RootDir.getAbsolutePath());
_PackagePath = source._PackagePath;
_Indent = source._Indent;
_IndentAmount = source._IndentAmount;
_MddFile = (source._MddFile == null) ? null : new java.io.File(source._MddFile.getAbsolutePath());
_MddIn = source._MddIn;
_MetaDD = (source._MetaDD == null) ? null : new org.netbeans.modules.schema2beansdev.metadd.MetaDD(source._MetaDD);
_DoGeneration = source._DoGeneration;
_ScalarException = source._ScalarException;
_DumpToString = source._DumpToString;
_Vetoable = source._Vetoable;
_Standalone = source._Standalone;
_Auto = source._Auto;
_MessageOut = (source._MessageOut == null) ? null : new java.io.PrintStream(source._MessageOut);
_OutputStreamProvider = source._OutputStreamProvider;
_ThrowErrors = source._ThrowErrors;
_GenerateXMLIO = source._GenerateXMLIO;
_GenerateValidate = source._GenerateValidate;
_GeneratePropertyEvents = source._GeneratePropertyEvents;
_GenerateStoreEvents = source._GenerateStoreEvents;
_GenerateTransactions = source._GenerateTransactions;
_AttributesAsProperties = source._AttributesAsProperties;
_GenerateDelegator = source._GenerateDelegator;
_DelegateDir = (source._DelegateDir == null) ? null : new java.io.File(source._DelegateDir.getAbsolutePath());
_DelegatePackage = source._DelegatePackage;
_GenerateCommonInterface = source._GenerateCommonInterface;
_DefaultsAccessable = source._DefaultsAccessable;
_UseInterfaces = source._UseInterfaces;
_GenerateInterfaces = source._GenerateInterfaces;
_KeepElementPositions = source._KeepElementPositions;
_RemoveUnreferencedNodes = source._RemoveUnreferencedNodes;
_InputURI = source._InputURI;
_IndexedPropertyType = source._IndexedPropertyType;
_DoCompile = source._DoCompile;
_GenerateSwitches = source._GenerateSwitches;
_DumpBeanTree = (source._DumpBeanTree == null) ? null : new java.io.File(source._DumpBeanTree.getAbsolutePath());
_GenerateDotGraph = (source._GenerateDotGraph == null) ? null : new java.io.File(source._GenerateDotGraph.getAbsolutePath());
_ProcessComments = source._ProcessComments;
_ProcessDocType = source._ProcessDocType;
_CheckUpToDate = source._CheckUpToDate;
_GenerateParentRefs = source._GenerateParentRefs;
_GenerateHasChanged = source._GenerateHasChanged;
_NewestSourceTime = source._NewestSourceTime;
_WriteBeanGraphFile = (source._WriteBeanGraphFile == null) ? null : new java.io.File(source._WriteBeanGraphFile.getAbsolutePath());
for (java.util.Iterator it = source._ReadBeanGraphFiles.iterator();
it.hasNext(); ) {
java.io.File srcElement = (java.io.File)it.next();
_ReadBeanGraphFiles.add((srcElement == null) ? null : new java.io.File(srcElement.getAbsolutePath()));
}
for (java.util.Iterator it = source._ReadBeanGraphs.iterator();
it.hasNext(); ) {
org.netbeans.modules.schema2beansdev.beangraph.BeanGraph srcElement = (org.netbeans.modules.schema2beansdev.beangraph.BeanGraph)it.next();
_ReadBeanGraphs.add((srcElement == null) ? null : new org.netbeans.modules.schema2beansdev.beangraph.BeanGraph(srcElement));
}
_MinFeatures = source._MinFeatures;
_ForME = source._ForME;
_GenerateTagsFile = source._GenerateTagsFile;
_CodeGeneratorFactory = source._CodeGeneratorFactory;
_GenerateTimeStamp = source._GenerateTimeStamp;
_Quiet = source._Quiet;
_WriteConfig = (source._WriteConfig == null) ? null : new java.io.File(source._WriteConfig.getAbsolutePath());
for (java.util.Iterator it = source._ReadConfig.iterator();
it.hasNext(); ) {
java.io.File srcElement = (java.io.File)it.next();
_ReadConfig.add((srcElement == null) ? null : new java.io.File(srcElement.getAbsolutePath()));
}
_MakeDefaults = source._MakeDefaults;
_SetDefaults = source._SetDefaults;
_TrimNonStrings = source._TrimNonStrings;
_UseRuntime = source._UseRuntime;
_ExtendBaseBean = source._ExtendBaseBean;
for (java.util.Iterator it = source._Finder.iterator();
it.hasNext(); ) {
java.lang.String srcElement = (java.lang.String)it.next();
_Finder.add(srcElement);
}
schemaLocation = source.schemaLocation;
}
// This attribute is mandatory
public void setSchemaType(java.lang.String value) {
_SchemaType = value;
}
public java.lang.String getSchemaType() {
return _SchemaType;
}
// This attribute is optional
public void setTraceParse(boolean value) {
_TraceParse = value;
}
public boolean isTraceParse() {
return _TraceParse;
}
// This attribute is optional
public void setTraceGen(boolean value) {
_TraceGen = value;
}
public boolean isTraceGen() {
return _TraceGen;
}
// This attribute is optional
public void setTraceMisc(boolean value) {
_TraceMisc = value;
}
public boolean isTraceMisc() {
return _TraceMisc;
}
// This attribute is optional
public void setTraceDot(boolean value) {
_TraceDot = value;
}
public boolean isTraceDot() {
return _TraceDot;
}
// This attribute is optional
public void setFilename(java.io.File value) {
_Filename = value;
}
public java.io.File getFilename() {
return _Filename;
}
// This attribute is optional
public void setFileIn(java.io.InputStream value) {
_FileIn = value;
}
public java.io.InputStream getFileIn() {
return _FileIn;
}
// This attribute is optional
public void setDocRoot(java.lang.String value) {
_DocRoot = value;
}
public java.lang.String getDocRoot() {
return _DocRoot;
}
// This attribute is mandatory
public void setRootDir(java.io.File value) {
_RootDir = value;
}
public java.io.File getRootDir() {
return _RootDir;
}
// This attribute is optional
public void setPackagePath(java.lang.String value) {
_PackagePath = value;
}
public java.lang.String getPackagePath() {
return _PackagePath;
}
// This attribute is mandatory
public void setIndent(java.lang.String value) {
_Indent = value;
}
public java.lang.String getIndent() {
return _Indent;
}
// This attribute is optional
public void setIndentAmount(int value) {
_IndentAmount = value;
}
public int getIndentAmount() {
return _IndentAmount;
}
// This attribute is optional
public void setMddFile(java.io.File value) {
_MddFile = value;
}
public java.io.File getMddFile() {
return _MddFile;
}
// This attribute is optional
public void setMddIn(java.io.InputStream value) {
_MddIn = value;
}
public java.io.InputStream getMddIn() {
return _MddIn;
}
// This attribute is optional
public void setMetaDD(org.netbeans.modules.schema2beansdev.metadd.MetaDD value) {
_MetaDD = value;
}
public org.netbeans.modules.schema2beansdev.metadd.MetaDD getMetaDD() {
return _MetaDD;
}
// This attribute is mandatory
public void setDoGeneration(boolean value) {
_DoGeneration = value;
}
public boolean isDoGeneration() {
return _DoGeneration;
}
// This attribute is mandatory
public void setScalarException(boolean value) {
_ScalarException = value;
}
public boolean isScalarException() {
return _ScalarException;
}
// This attribute is optional
public void setDumpToString(boolean value) {
_DumpToString = value;
}
public boolean isDumpToString() {
return _DumpToString;
}
// This attribute is optional
public void setVetoable(boolean value) {
_Vetoable = value;
}
public boolean isVetoable() {
return _Vetoable;
}
// This attribute is optional
public void setStandalone(boolean value) {
_Standalone = value;
}
public boolean isStandalone() {
return _Standalone;
}
// This attribute is optional
public void setAuto(boolean value) {
_Auto = value;
}
public boolean isAuto() {
return _Auto;
}
// This attribute is optional
public void setMessageOut(java.io.PrintStream value) {
_MessageOut = value;
}
public java.io.PrintStream getMessageOut() {
return _MessageOut;
}
// This attribute is optional
public void setOutputStreamProvider(org.netbeans.modules.schema2beansdev.GenBeans.OutputStreamProvider value) {
_OutputStreamProvider = value;
}
public org.netbeans.modules.schema2beansdev.GenBeans.OutputStreamProvider getOutputStreamProvider() {
return _OutputStreamProvider;
}
// This attribute is optional
public void setThrowErrors(boolean value) {
_ThrowErrors = value;
}
public boolean isThrowErrors() {
return _ThrowErrors;
}
// This attribute is mandatory
public void setGenerateXMLIO(boolean value) {
_GenerateXMLIO = value;
}
public boolean isGenerateXMLIO() {
return _GenerateXMLIO;
}
// This attribute is optional
public void setGenerateValidate(boolean value) {
_GenerateValidate = value;
}
public boolean isGenerateValidate() {
return _GenerateValidate;
}
// This attribute is optional
public void setGeneratePropertyEvents(boolean value) {
_GeneratePropertyEvents = value;
}
public boolean isGeneratePropertyEvents() {
return _GeneratePropertyEvents;
}
// This attribute is optional
public void setGenerateStoreEvents(boolean value) {
_GenerateStoreEvents = value;
}
public boolean isGenerateStoreEvents() {
return _GenerateStoreEvents;
}
// This attribute is optional
public void setGenerateTransactions(boolean value) {
_GenerateTransactions = value;
}
public boolean isGenerateTransactions() {
return _GenerateTransactions;
}
// This attribute is optional
public void setAttributesAsProperties(boolean value) {
_AttributesAsProperties = value;
}
public boolean isAttributesAsProperties() {
return _AttributesAsProperties;
}
// This attribute is optional
public void setGenerateDelegator(boolean value) {
_GenerateDelegator = value;
}
public boolean isGenerateDelegator() {
return _GenerateDelegator;
}
// This attribute is optional
public void setDelegateDir(java.io.File value) {
_DelegateDir = value;
}
public java.io.File getDelegateDir() {
return _DelegateDir;
}
// This attribute is optional
public void setDelegatePackage(java.lang.String value) {
_DelegatePackage = value;
}
public java.lang.String getDelegatePackage() {
return _DelegatePackage;
}
// This attribute is optional
public void setGenerateCommonInterface(java.lang.String value) {
_GenerateCommonInterface = value;
}
public java.lang.String getGenerateCommonInterface() {
return _GenerateCommonInterface;
}
// This attribute is optional
public void setDefaultsAccessable(boolean value) {
_DefaultsAccessable = value;
}
public boolean isDefaultsAccessable() {
return _DefaultsAccessable;
}
// This attribute is optional
public void setUseInterfaces(boolean value) {
_UseInterfaces = value;
}
public boolean isUseInterfaces() {
return _UseInterfaces;
}
// This attribute is optional
public void setGenerateInterfaces(boolean value) {
_GenerateInterfaces = value;
}
public boolean isGenerateInterfaces() {
return _GenerateInterfaces;
}
// This attribute is optional
public void setKeepElementPositions(boolean value) {
_KeepElementPositions = value;
}
public boolean isKeepElementPositions() {
return _KeepElementPositions;
}
// This attribute is optional
public void setRemoveUnreferencedNodes(boolean value) {
_RemoveUnreferencedNodes = value;
}
public boolean isRemoveUnreferencedNodes() {
return _RemoveUnreferencedNodes;
}
// This attribute is optional
public void setInputURI(java.lang.String value) {
_InputURI = value;
}
public java.lang.String getInputURI() {
return _InputURI;
}
// This attribute is mandatory
public void setIndexedPropertyType(java.lang.String value) {
_IndexedPropertyType = value;
}
public java.lang.String getIndexedPropertyType() {
return _IndexedPropertyType;
}
// This attribute is optional
public void setDoCompile(boolean value) {
_DoCompile = value;
}
public boolean isDoCompile() {
return _DoCompile;
}
// This attribute is optional
public void setGenerateSwitches(boolean value) {
_GenerateSwitches = value;
}
public boolean isGenerateSwitches() {
return _GenerateSwitches;
}
// This attribute is optional
public void setDumpBeanTree(java.io.File value) {
_DumpBeanTree = value;
}
public java.io.File getDumpBeanTree() {
return _DumpBeanTree;
}
// This attribute is optional
public void setGenerateDotGraph(java.io.File value) {
_GenerateDotGraph = value;
}
public java.io.File getGenerateDotGraph() {
return _GenerateDotGraph;
}
// This attribute is optional
public void setProcessComments(boolean value) {
_ProcessComments = value;
}
public boolean isProcessComments() {
return _ProcessComments;
}
// This attribute is optional
public void setProcessDocType(boolean value) {
_ProcessDocType = value;
}
public boolean isProcessDocType() {
return _ProcessDocType;
}
// This attribute is optional
public void setCheckUpToDate(boolean value) {
_CheckUpToDate = value;
}
public boolean isCheckUpToDate() {
return _CheckUpToDate;
}
// This attribute is optional
public void setGenerateParentRefs(boolean value) {
_GenerateParentRefs = value;
}
public boolean isGenerateParentRefs() {
return _GenerateParentRefs;
}
// This attribute is optional
public void setGenerateHasChanged(boolean value) {
_GenerateHasChanged = value;
}
public boolean isGenerateHasChanged() {
return _GenerateHasChanged;
}
// This attribute is optional
public void setNewestSourceTime(long value) {
_NewestSourceTime = value;
}
public long getNewestSourceTime() {
return _NewestSourceTime;
}
// This attribute is optional
public void setWriteBeanGraphFile(java.io.File value) {
_WriteBeanGraphFile = value;
}
public java.io.File getWriteBeanGraphFile() {
return _WriteBeanGraphFile;
}
// This attribute is an array, possibly empty
public void setReadBeanGraphFiles(java.io.File[] value) {
if (value == null)
value = new java.io.File[0];
_ReadBeanGraphFiles.clear();
((java.util.ArrayList) _ReadBeanGraphFiles).ensureCapacity(value.length);
for (int i = 0; i < value.length; ++i) {
_ReadBeanGraphFiles.add(value[i]);
}
}
public void setReadBeanGraphFiles(int index, java.io.File value) {
_ReadBeanGraphFiles.set(index, value);
}
public java.io.File[] getReadBeanGraphFiles() {
java.io.File[] arr = new java.io.File[_ReadBeanGraphFiles.size()];
return (java.io.File[]) _ReadBeanGraphFiles.toArray(arr);
}
public java.util.List fetchReadBeanGraphFilesList() {
return _ReadBeanGraphFiles;
}
public java.io.File getReadBeanGraphFiles(int index) {
return (java.io.File)_ReadBeanGraphFiles.get(index);
}
// Return the number of readBeanGraphFiles
public int sizeReadBeanGraphFiles() {
return _ReadBeanGraphFiles.size();
}
public int addReadBeanGraphFiles(java.io.File value) {
_ReadBeanGraphFiles.add(value);
int positionOfNewItem = _ReadBeanGraphFiles.size()-1;
return positionOfNewItem;
}
/**
* Search from the end looking for @param value, and then remove it.
*/
public int removeReadBeanGraphFiles(java.io.File value) {
int pos = _ReadBeanGraphFiles.indexOf(value);
if (pos >= 0) {
_ReadBeanGraphFiles.remove(pos);
}
return pos;
}
// This attribute is an array, possibly empty
public void setReadBeanGraphs(org.netbeans.modules.schema2beansdev.beangraph.BeanGraph[] value) {
if (value == null)
value = new org.netbeans.modules.schema2beansdev.beangraph.BeanGraph[0];
_ReadBeanGraphs.clear();
((java.util.ArrayList) _ReadBeanGraphs).ensureCapacity(value.length);
for (int i = 0; i < value.length; ++i) {
_ReadBeanGraphs.add(value[i]);
}
}
public void setReadBeanGraphs(int index, org.netbeans.modules.schema2beansdev.beangraph.BeanGraph value) {
_ReadBeanGraphs.set(index, value);
}
public org.netbeans.modules.schema2beansdev.beangraph.BeanGraph[] getReadBeanGraphs() {
org.netbeans.modules.schema2beansdev.beangraph.BeanGraph[] arr = new org.netbeans.modules.schema2beansdev.beangraph.BeanGraph[_ReadBeanGraphs.size()];
return (org.netbeans.modules.schema2beansdev.beangraph.BeanGraph[]) _ReadBeanGraphs.toArray(arr);
}
public java.util.List fetchReadBeanGraphsList() {
return _ReadBeanGraphs;
}
public org.netbeans.modules.schema2beansdev.beangraph.BeanGraph getReadBeanGraphs(int index) {
return (org.netbeans.modules.schema2beansdev.beangraph.BeanGraph)_ReadBeanGraphs.get(index);
}
// Return the number of readBeanGraphs
public int sizeReadBeanGraphs() {
return _ReadBeanGraphs.size();
}
public int addReadBeanGraphs(org.netbeans.modules.schema2beansdev.beangraph.BeanGraph value) {
_ReadBeanGraphs.add(value);
int positionOfNewItem = _ReadBeanGraphs.size()-1;
return positionOfNewItem;
}
/**
* Search from the end looking for @param value, and then remove it.
*/
public int removeReadBeanGraphs(org.netbeans.modules.schema2beansdev.beangraph.BeanGraph value) {
int pos = _ReadBeanGraphs.indexOf(value);
if (pos >= 0) {
_ReadBeanGraphs.remove(pos);
}
return pos;
}
// This attribute is optional
public void setMinFeatures(boolean value) {
_MinFeatures = value;
}
public boolean isMinFeatures() {
return _MinFeatures;
}
// This attribute is optional
public void setForME(boolean value) {
_ForME = value;
}
public boolean isForME() {
return _ForME;
}
// This attribute is optional
public void setGenerateTagsFile(boolean value) {
_GenerateTagsFile = value;
}
public boolean isGenerateTagsFile() {
return _GenerateTagsFile;
}
// This attribute is optional
public void setCodeGeneratorFactory(org.netbeans.modules.schema2beansdev.CodeGeneratorFactory value) {
_CodeGeneratorFactory = value;
}
public org.netbeans.modules.schema2beansdev.CodeGeneratorFactory getCodeGeneratorFactory() {
return _CodeGeneratorFactory;
}
// This attribute is mandatory
public void setGenerateTimeStamp(boolean value) {
_GenerateTimeStamp = value;
}
public boolean isGenerateTimeStamp() {
return _GenerateTimeStamp;
}
// This attribute is mandatory
public void setQuiet(boolean value) {
_Quiet = value;
}
public boolean isQuiet() {
return _Quiet;
}
// This attribute is optional
public void setWriteConfig(java.io.File value) {
_WriteConfig = value;
}
public java.io.File getWriteConfig() {
return _WriteConfig;
}
// This attribute is an array, possibly empty
public void setReadConfig(java.io.File[] value) {
if (value == null)
value = new java.io.File[0];
_ReadConfig.clear();
((java.util.ArrayList) _ReadConfig).ensureCapacity(value.length);
for (int i = 0; i < value.length; ++i) {
_ReadConfig.add(value[i]);
}
}
public void setReadConfig(int index, java.io.File value) {
_ReadConfig.set(index, value);
}
public java.io.File[] getReadConfig() {
java.io.File[] arr = new java.io.File[_ReadConfig.size()];
return (java.io.File[]) _ReadConfig.toArray(arr);
}
public java.util.List fetchReadConfigList() {
return _ReadConfig;
}
public java.io.File getReadConfig(int index) {
return (java.io.File)_ReadConfig.get(index);
}
// Return the number of readConfig
public int sizeReadConfig() {
return _ReadConfig.size();
}
public int addReadConfig(java.io.File value) {
_ReadConfig.add(value);
int positionOfNewItem = _ReadConfig.size()-1;
return positionOfNewItem;
}
/**
* Search from the end looking for @param value, and then remove it.
*/
public int removeReadConfig(java.io.File value) {
int pos = _ReadConfig.indexOf(value);
if (pos >= 0) {
_ReadConfig.remove(pos);
}
return pos;
}
// This attribute is mandatory
public void setMakeDefaults(boolean value) {
_MakeDefaults = value;
}
public boolean isMakeDefaults() {
return _MakeDefaults;
}
// This attribute is optional
public void setSetDefaults(boolean value) {
_SetDefaults = value;
}
public boolean isSetDefaults() {
return _SetDefaults;
}
// This attribute is optional
public void setTrimNonStrings(boolean value) {
_TrimNonStrings = value;
}
public boolean isTrimNonStrings() {
return _TrimNonStrings;
}
// This attribute is optional
public void setUseRuntime(boolean value) {
_UseRuntime = value;
}
public boolean isUseRuntime() {
return _UseRuntime;
}
// This attribute is optional
public void setExtendBaseBean(boolean value) {
_ExtendBaseBean = value;
}
public boolean isExtendBaseBean() {
return _ExtendBaseBean;
}
// This attribute is an array, possibly empty
public void setFinder(java.lang.String[] value) {
if (value == null)
value = new java.lang.String[0];
_Finder.clear();
((java.util.ArrayList) _Finder).ensureCapacity(value.length);
for (int i = 0; i < value.length; ++i) {
_Finder.add(value[i]);
}
}
public void setFinder(int index, java.lang.String value) {
_Finder.set(index, value);
}
public java.lang.String[] getFinder() {
java.lang.String[] arr = new java.lang.String[_Finder.size()];
return (java.lang.String[]) _Finder.toArray(arr);
}
public java.util.List fetchFinderList() {
return _Finder;
}
public java.lang.String getFinder(int index) {
return (java.lang.String)_Finder.get(index);
}
// Return the number of finder
public int sizeFinder() {
return _Finder.size();
}
public int addFinder(java.lang.String value) {
_Finder.add(value);
int positionOfNewItem = _Finder.size()-1;
return positionOfNewItem;
}
/**
* Search from the end looking for @param value, and then remove it.
*/
public int removeFinder(java.lang.String value) {
int pos = _Finder.indexOf(value);
if (pos >= 0) {
_Finder.remove(pos);
}
return pos;
}
public void _setSchemaLocation(String location) {
schemaLocation = location;
}
public String _getSchemaLocation() {
return schemaLocation;
}
public void write(java.io.File f) throws java.io.IOException {
java.io.OutputStream out = new java.io.FileOutputStream(f);
try {
write(out);
} finally {
out.close();
}
}
public void write(java.io.OutputStream out) throws java.io.IOException {
write(out, null);
}
public void write(java.io.OutputStream out, String encoding) throws java.io.IOException {
java.io.Writer w;
if (encoding == null) {
encoding = "UTF-8"; // NOI18N
}
w = new java.io.BufferedWriter(new java.io.OutputStreamWriter(out, encoding));
write(w, encoding);
w.flush();
}
/**
* Print this Java Bean to @param out including an XML header.
* @param encoding is the encoding style that @param out was opened with.
*/
public void write(java.io.Writer out, String encoding) throws java.io.IOException {
out.write("\n"); // NOI18N
writeNode(out, "s2bConfig", ""); // NOI18N
}
public void writeNode(java.io.Writer out) throws java.io.IOException {
String myName;
myName = "s2bConfig";
writeNode(out, myName, ""); // NOI18N
}
public void writeNode(java.io.Writer out, String nodeName, String indent) throws java.io.IOException {
writeNode(out, nodeName, null, indent, new java.util.HashMap());
}
/**
* It's not recommended to call this method directly.
*/
public void writeNode(java.io.Writer out, String nodeName, String namespace, String indent, java.util.Map namespaceMap) throws java.io.IOException {
out.write(indent);
out.write("<");
if (namespace != null) {
out.write((String)namespaceMap.get(namespace));
out.write(":");
}
out.write(nodeName);
if (schemaLocation != null) {
namespaceMap.put("http://www.w3.org/2001/XMLSchema-instance", "xsi");
out.write(" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='");
out.write(schemaLocation);
out.write("'"); // NOI18N
}
out.write(">\n");
String nextIndent = indent + " ";
if (_SchemaType != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _SchemaType, false);
out.write("\n"); // NOI18N
}
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_TraceParse ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_TraceGen ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_TraceMisc ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_TraceDot ? "true" : "false");
out.write("\n"); // NOI18N
if (_Filename != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _Filename.toString(), false);
out.write("\n"); // NOI18N
}
if (_FileIn != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _FileIn.toString(), false);
out.write("\n"); // NOI18N
}
if (_DocRoot != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _DocRoot, false);
out.write("\n"); // NOI18N
}
if (_RootDir != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _RootDir.toString(), false);
out.write("\n"); // NOI18N
}
if (_PackagePath != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _PackagePath, false);
out.write("\n"); // NOI18N
}
if (_Indent != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _Indent, false);
out.write("\n"); // NOI18N
}
out.write(nextIndent);
out.write(""); // NOI18N
out.write(""+_IndentAmount);
out.write("\n"); // NOI18N
if (_MddFile != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _MddFile.toString(), false);
out.write("\n"); // NOI18N
}
if (_MddIn != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _MddIn.toString(), false);
out.write("\n"); // NOI18N
}
if (_MetaDD != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _MetaDD.toString(), false);
out.write("\n"); // NOI18N
}
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_DoGeneration ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_ScalarException ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_DumpToString ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_Vetoable ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_Standalone ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_Auto ? "true" : "false");
out.write("\n"); // NOI18N
if (_MessageOut != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _MessageOut.toString(), false);
out.write("\n"); // NOI18N
}
if (_OutputStreamProvider != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _OutputStreamProvider.toString(), false);
out.write("\n"); // NOI18N
}
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_ThrowErrors ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_GenerateXMLIO ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_GenerateValidate ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_GeneratePropertyEvents ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_GenerateStoreEvents ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_GenerateTransactions ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_AttributesAsProperties ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_GenerateDelegator ? "true" : "false");
out.write("\n"); // NOI18N
if (_DelegateDir != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _DelegateDir.toString(), false);
out.write("\n"); // NOI18N
}
if (_DelegatePackage != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _DelegatePackage, false);
out.write("\n"); // NOI18N
}
if (_GenerateCommonInterface != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _GenerateCommonInterface, false);
out.write("\n"); // NOI18N
}
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_DefaultsAccessable ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_UseInterfaces ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_GenerateInterfaces ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_KeepElementPositions ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_RemoveUnreferencedNodes ? "true" : "false");
out.write("\n"); // NOI18N
if (_InputURI != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _InputURI, false);
out.write("\n"); // NOI18N
}
if (_IndexedPropertyType != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _IndexedPropertyType, false);
out.write("\n"); // NOI18N
}
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_DoCompile ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_GenerateSwitches ? "true" : "false");
out.write("\n"); // NOI18N
if (_DumpBeanTree != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _DumpBeanTree.toString(), false);
out.write("\n"); // NOI18N
}
if (_GenerateDotGraph != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _GenerateDotGraph.toString(), false);
out.write("\n"); // NOI18N
}
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_ProcessComments ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_ProcessDocType ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_CheckUpToDate ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_GenerateParentRefs ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_GenerateHasChanged ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(""+_NewestSourceTime);
out.write("\n"); // NOI18N
if (_WriteBeanGraphFile != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _WriteBeanGraphFile.toString(), false);
out.write("\n"); // NOI18N
}
for (java.util.Iterator it = _ReadBeanGraphFiles.iterator();
it.hasNext(); ) {
java.io.File element = (java.io.File)it.next();
if (element != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, element.toString(), false);
out.write("\n"); // NOI18N
}
}
for (java.util.Iterator it = _ReadBeanGraphs.iterator();
it.hasNext(); ) {
org.netbeans.modules.schema2beansdev.beangraph.BeanGraph element = (org.netbeans.modules.schema2beansdev.beangraph.BeanGraph)it.next();
if (element != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, element.toString(), false);
out.write("\n"); // NOI18N
}
}
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_MinFeatures ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_ForME ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_GenerateTagsFile ? "true" : "false");
out.write("\n"); // NOI18N
if (_CodeGeneratorFactory != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _CodeGeneratorFactory.toString(), false);
out.write("\n"); // NOI18N
}
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_GenerateTimeStamp ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_Quiet ? "true" : "false");
out.write("\n"); // NOI18N
if (_WriteConfig != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, _WriteConfig.toString(), false);
out.write("\n"); // NOI18N
}
for (java.util.Iterator it = _ReadConfig.iterator(); it.hasNext();
) {
java.io.File element = (java.io.File)it.next();
if (element != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, element.toString(), false);
out.write("\n"); // NOI18N
}
}
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_MakeDefaults ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_SetDefaults ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_TrimNonStrings ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_UseRuntime ? "true" : "false");
out.write("\n"); // NOI18N
out.write(nextIndent);
out.write(""); // NOI18N
out.write(_ExtendBaseBean ? "true" : "false");
out.write("\n"); // NOI18N
for (java.util.Iterator it = _Finder.iterator(); it.hasNext(); ) {
java.lang.String element = (java.lang.String)it.next();
if (element != null) {
out.write(nextIndent);
out.write(""); // NOI18N
org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(out, element, false);
out.write("\n"); // NOI18N
}
}
out.write(indent);
out.write("");
if (namespace != null) {
out.write((String)namespaceMap.get(namespace));
out.write(":");
}
out.write(nodeName);
out.write(">\n");
}
public static S2bConfig read(java.io.File f) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException {
java.io.InputStream in = new java.io.FileInputStream(f);
try {
return read(in);
} finally {
in.close();
}
}
public static S2bConfig read(java.io.InputStream in) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException {
return read(new org.xml.sax.InputSource(in), false, null, null);
}
/**
* Warning: in readNoEntityResolver character and entity references will
* not be read from any DTD in the XML source.
* However, this way is faster since no DTDs are looked up
* (possibly skipping network access) or parsed.
*/
public static S2bConfig readNoEntityResolver(java.io.InputStream in) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException {
return read(new org.xml.sax.InputSource(in), false,
new org.xml.sax.EntityResolver() {
public org.xml.sax.InputSource resolveEntity(String publicId, String systemId) {
java.io.ByteArrayInputStream bin = new java.io.ByteArrayInputStream(new byte[0]);
return new org.xml.sax.InputSource(bin);
}
}
, null);
}
public static S2bConfig read(org.xml.sax.InputSource in, boolean validate, org.xml.sax.EntityResolver er, org.xml.sax.ErrorHandler eh) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException {
javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance();
dbf.setValidating(validate);
dbf.setNamespaceAware(true);
javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder();
if (er != null) db.setEntityResolver(er);
if (eh != null) db.setErrorHandler(eh);
org.w3c.dom.Document doc = db.parse(in);
return read(doc);
}
public static S2bConfig read(org.w3c.dom.Document document) {
S2bConfig aS2bConfig = new S2bConfig();
aS2bConfig.readFromDocument(document);
return aS2bConfig;
}
protected void readFromDocument(org.w3c.dom.Document document) {
readNode(document.getDocumentElement());
}
public void readNode(org.w3c.dom.Node node) {
readNode(node, new java.util.HashMap());
}
public void readNode(org.w3c.dom.Node node, java.util.Map namespacePrefixes) {
if (node.hasAttributes()) {
org.w3c.dom.NamedNodeMap attrs = node.getAttributes();
org.w3c.dom.Attr attr;
java.lang.String attrValue;
boolean firstNamespaceDef = true;
for (int attrNum = 0; attrNum < attrs.getLength(); ++attrNum) {
attr = (org.w3c.dom.Attr) attrs.item(attrNum);
String attrName = attr.getName();
if (attrName.startsWith("xmlns:")) {
if (firstNamespaceDef) {
firstNamespaceDef = false;
// Dup prefix map, so as to not write over previous values, and to make it easy to clear out our entries.
namespacePrefixes = new java.util.HashMap(namespacePrefixes);
}
String attrNSPrefix = attrName.substring(6, attrName.length());
namespacePrefixes.put(attrNSPrefix, attr.getValue());
}
}
String xsiPrefix = "xsi";
for (java.util.Iterator it = namespacePrefixes.keySet().iterator();
it.hasNext(); ) {
String prefix = (String) it.next();
String ns = (String) namespacePrefixes.get(prefix);
if ("http://www.w3.org/2001/XMLSchema-instance".equals(ns)) {
xsiPrefix = prefix;
break;
}
}
attr = (org.w3c.dom.Attr) attrs.getNamedItem(""+xsiPrefix+":schemaLocation");
if (attr != null) {
attrValue = attr.getValue();
schemaLocation = attrValue;
}
}
org.w3c.dom.NodeList children = node.getChildNodes();
for (int i = 0, size = children.getLength(); i < size; ++i) {
org.w3c.dom.Node childNode = children.item(i);
String childNodeName = (childNode.getLocalName() == null ? childNode.getNodeName().intern() : childNode.getLocalName().intern());
String childNodeValue = "";
if (childNode.getFirstChild() != null) {
childNodeValue = childNode.getFirstChild().getNodeValue();
}
if (childNodeName == "schemaType") {
_SchemaType = childNodeValue;
}
else if (childNodeName == "traceParse") {
if (childNode.getFirstChild() == null)
_TraceParse = true;
else
_TraceParse = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "traceGen") {
if (childNode.getFirstChild() == null)
_TraceGen = true;
else
_TraceGen = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "traceMisc") {
if (childNode.getFirstChild() == null)
_TraceMisc = true;
else
_TraceMisc = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "traceDot") {
if (childNode.getFirstChild() == null)
_TraceDot = true;
else
_TraceDot = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "filename") {
_Filename = new java.io.File(childNodeValue);
}
else if (childNodeName == "fileIn") {
// Don't know how to create a java.io.InputStream
}
else if (childNodeName == "docRoot") {
_DocRoot = childNodeValue;
}
else if (childNodeName == "rootDir") {
_RootDir = new java.io.File(childNodeValue);
}
else if (childNodeName == "packagePath") {
_PackagePath = childNodeValue;
}
else if (childNodeName == "indent") {
_Indent = childNodeValue;
}
else if (childNodeName == "indentAmount") {
_IndentAmount = Integer.parseInt(childNodeValue);
}
else if (childNodeName == "mddFile") {
_MddFile = new java.io.File(childNodeValue);
}
else if (childNodeName == "mddIn") {
// Don't know how to create a java.io.InputStream
}
else if (childNodeName == "metaDD") {
// Don't know how to create a org.netbeans.modules.schema2beansdev.metadd.MetaDD
}
else if (childNodeName == "doGeneration") {
if (childNode.getFirstChild() == null)
_DoGeneration = true;
else
_DoGeneration = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "scalarException") {
if (childNode.getFirstChild() == null)
_ScalarException = true;
else
_ScalarException = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "dumpToString") {
if (childNode.getFirstChild() == null)
_DumpToString = true;
else
_DumpToString = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "vetoable") {
if (childNode.getFirstChild() == null)
_Vetoable = true;
else
_Vetoable = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "standalone") {
if (childNode.getFirstChild() == null)
_Standalone = true;
else
_Standalone = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "auto") {
if (childNode.getFirstChild() == null)
_Auto = true;
else
_Auto = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "messageOut") {
// Don't know how to create a java.io.PrintStream
}
else if (childNodeName == "outputStreamProvider") {
// Don't know how to create a org.netbeans.modules.schema2beansdev.GenBeans.OutputStreamProvider
}
else if (childNodeName == "throwErrors") {
if (childNode.getFirstChild() == null)
_ThrowErrors = true;
else
_ThrowErrors = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "generateXMLIO") {
if (childNode.getFirstChild() == null)
_GenerateXMLIO = true;
else
_GenerateXMLIO = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "generateValidate") {
if (childNode.getFirstChild() == null)
_GenerateValidate = true;
else
_GenerateValidate = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "generatePropertyEvents") {
if (childNode.getFirstChild() == null)
_GeneratePropertyEvents = true;
else
_GeneratePropertyEvents = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "generateStoreEvents") {
if (childNode.getFirstChild() == null)
_GenerateStoreEvents = true;
else
_GenerateStoreEvents = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "generateTransactions") {
if (childNode.getFirstChild() == null)
_GenerateTransactions = true;
else
_GenerateTransactions = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "attributesAsProperties") {
if (childNode.getFirstChild() == null)
_AttributesAsProperties = true;
else
_AttributesAsProperties = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "generateDelegator") {
if (childNode.getFirstChild() == null)
_GenerateDelegator = true;
else
_GenerateDelegator = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "delegateDir") {
_DelegateDir = new java.io.File(childNodeValue);
}
else if (childNodeName == "delegatePackage") {
_DelegatePackage = childNodeValue;
}
else if (childNodeName == "generateCommonInterface") {
_GenerateCommonInterface = childNodeValue;
}
else if (childNodeName == "defaultsAccessable") {
if (childNode.getFirstChild() == null)
_DefaultsAccessable = true;
else
_DefaultsAccessable = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "useInterfaces") {
if (childNode.getFirstChild() == null)
_UseInterfaces = true;
else
_UseInterfaces = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "generateInterfaces") {
if (childNode.getFirstChild() == null)
_GenerateInterfaces = true;
else
_GenerateInterfaces = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "keepElementPositions") {
if (childNode.getFirstChild() == null)
_KeepElementPositions = true;
else
_KeepElementPositions = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "removeUnreferencedNodes") {
if (childNode.getFirstChild() == null)
_RemoveUnreferencedNodes = true;
else
_RemoveUnreferencedNodes = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "inputURI") {
_InputURI = childNodeValue;
}
else if (childNodeName == "indexedPropertyType") {
_IndexedPropertyType = childNodeValue;
}
else if (childNodeName == "doCompile") {
if (childNode.getFirstChild() == null)
_DoCompile = true;
else
_DoCompile = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "generateSwitches") {
if (childNode.getFirstChild() == null)
_GenerateSwitches = true;
else
_GenerateSwitches = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "dumpBeanTree") {
_DumpBeanTree = new java.io.File(childNodeValue);
}
else if (childNodeName == "generateDotGraph") {
_GenerateDotGraph = new java.io.File(childNodeValue);
}
else if (childNodeName == "processComments") {
if (childNode.getFirstChild() == null)
_ProcessComments = true;
else
_ProcessComments = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "processDocType") {
if (childNode.getFirstChild() == null)
_ProcessDocType = true;
else
_ProcessDocType = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "checkUpToDate") {
if (childNode.getFirstChild() == null)
_CheckUpToDate = true;
else
_CheckUpToDate = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "generateParentRefs") {
if (childNode.getFirstChild() == null)
_GenerateParentRefs = true;
else
_GenerateParentRefs = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "generateHasChanged") {
if (childNode.getFirstChild() == null)
_GenerateHasChanged = true;
else
_GenerateHasChanged = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "newestSourceTime") {
_NewestSourceTime = Long.parseLong(childNodeValue);
}
else if (childNodeName == "writeBeanGraphFile") {
_WriteBeanGraphFile = new java.io.File(childNodeValue);
}
else if (childNodeName == "readBeanGraphFiles") {
java.io.File aReadBeanGraphFiles;
aReadBeanGraphFiles = new java.io.File(childNodeValue);
_ReadBeanGraphFiles.add(aReadBeanGraphFiles);
}
else if (childNodeName == "readBeanGraphs") {
org.netbeans.modules.schema2beansdev.beangraph.BeanGraph aReadBeanGraphs;
// Don't know how to create a org.netbeans.modules.schema2beansdev.beangraph.BeanGraph
}
else if (childNodeName == "minFeatures") {
if (childNode.getFirstChild() == null)
_MinFeatures = true;
else
_MinFeatures = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "forME") {
if (childNode.getFirstChild() == null)
_ForME = true;
else
_ForME = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "generateTagsFile") {
if (childNode.getFirstChild() == null)
_GenerateTagsFile = true;
else
_GenerateTagsFile = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "codeGeneratorFactory") {
// Don't know how to create a org.netbeans.modules.schema2beansdev.CodeGeneratorFactory
}
else if (childNodeName == "generateTimeStamp") {
if (childNode.getFirstChild() == null)
_GenerateTimeStamp = true;
else
_GenerateTimeStamp = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "quiet") {
if (childNode.getFirstChild() == null)
_Quiet = true;
else
_Quiet = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "writeConfig") {
_WriteConfig = new java.io.File(childNodeValue);
}
else if (childNodeName == "readConfig") {
java.io.File aReadConfig;
aReadConfig = new java.io.File(childNodeValue);
_ReadConfig.add(aReadConfig);
}
else if (childNodeName == "makeDefaults") {
if (childNode.getFirstChild() == null)
_MakeDefaults = true;
else
_MakeDefaults = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "setDefaults") {
if (childNode.getFirstChild() == null)
_SetDefaults = true;
else
_SetDefaults = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "trimNonStrings") {
if (childNode.getFirstChild() == null)
_TrimNonStrings = true;
else
_TrimNonStrings = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "useRuntime") {
if (childNode.getFirstChild() == null)
_UseRuntime = true;
else
_UseRuntime = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "extendBaseBean") {
if (childNode.getFirstChild() == null)
_ExtendBaseBean = true;
else
_ExtendBaseBean = java.lang.Boolean.valueOf(childNodeValue).booleanValue();
}
else if (childNodeName == "finder") {
java.lang.String aFinder;
aFinder = childNodeValue;
_Finder.add(aFinder);
}
else {
// Found extra unrecognized childNode
}
}
}
/**
* Takes some text to be printed into an XML stream and escapes any
* characters that might make it invalid XML (like '<').
*/
public static void writeXML(java.io.Writer out, String msg) throws java.io.IOException {
writeXML(out, msg, true);
}
public static void writeXML(java.io.Writer out, String msg, boolean attribute) throws java.io.IOException {
if (msg == null)
return;
int msgLength = msg.length();
for (int i = 0; i < msgLength; ++i) {
char c = msg.charAt(i);
writeXML(out, c, attribute);
}
}
public static void writeXML(java.io.Writer out, char msg, boolean attribute) throws java.io.IOException {
if (msg == '&')
out.write("&");
else if (msg == '<')
out.write("<");
else if (msg == '>')
out.write(">");
else if (attribute) {
if (msg == '"')
out.write(""");
else if (msg == '\'')
out.write("'");
else if (msg == '\n')
out.write("
");
else if (msg == '\t')
out.write(" ");
else
out.write(msg);
}
else
out.write(msg);
}
public static class ValidateException extends Exception {
private java.lang.Object failedBean;
private String failedPropertyName;
private FailureType failureType;
public ValidateException(String msg, String failedPropertyName, java.lang.Object failedBean) {
super(msg);
this.failedBean = failedBean;
this.failedPropertyName = failedPropertyName;
}
public ValidateException(String msg, FailureType ft, String failedPropertyName, java.lang.Object failedBean) {
super(msg);
this.failureType = ft;
this.failedBean = failedBean;
this.failedPropertyName = failedPropertyName;
}
public String getFailedPropertyName() {return failedPropertyName;}
public FailureType getFailureType() {return failureType;}
public java.lang.Object getFailedBean() {return failedBean;}
public static class FailureType {
private final String name;
private FailureType(String name) {this.name = name;}
public String toString() { return name;}
public static final FailureType NULL_VALUE = new FailureType("NULL_VALUE");
public static final FailureType DATA_RESTRICTION = new FailureType("DATA_RESTRICTION");
public static final FailureType ENUM_RESTRICTION = new FailureType("ENUM_RESTRICTION");
public static final FailureType MUTUALLY_EXCLUSIVE = new FailureType("MUTUALLY_EXCLUSIVE");
}
}
public void validate() throws org.netbeans.modules.schema2beansdev.S2bConfig.ValidateException {
boolean restrictionFailure = false;
// Validating property schemaType
if (getSchemaType() == null) {
throw new org.netbeans.modules.schema2beansdev.S2bConfig.ValidateException("getSchemaType() == null", org.netbeans.modules.schema2beansdev.S2bConfig.ValidateException.FailureType.NULL_VALUE, "schemaType", this); // NOI18N
}
// Validating property traceParse
// Validating property traceGen
// Validating property traceMisc
// Validating property traceDot
// Validating property filename
// Validating property fileIn
// Validating property docRoot
// Validating property rootDir
if (getRootDir() == null) {
throw new org.netbeans.modules.schema2beansdev.S2bConfig.ValidateException("getRootDir() == null", org.netbeans.modules.schema2beansdev.S2bConfig.ValidateException.FailureType.NULL_VALUE, "rootDir", this); // NOI18N
}
// Validating property packagePath
// Validating property indent
if (getIndent() == null) {
throw new org.netbeans.modules.schema2beansdev.S2bConfig.ValidateException("getIndent() == null", org.netbeans.modules.schema2beansdev.S2bConfig.ValidateException.FailureType.NULL_VALUE, "indent", this); // NOI18N
}
// Validating property indentAmount
// Validating property mddFile
// Validating property mddIn
// Validating property metaDD
// Validating property doGeneration
// Validating property scalarException
// Validating property dumpToString
// Validating property vetoable
// Validating property standalone
// Validating property auto
// Validating property messageOut
// Validating property outputStreamProvider
// Validating property throwErrors
// Validating property generateXMLIO
// Validating property generateValidate
// Validating property generatePropertyEvents
// Validating property generateStoreEvents
// Validating property generateTransactions
// Validating property attributesAsProperties
// Validating property generateDelegator
// Validating property delegateDir
// Validating property delegatePackage
// Validating property generateCommonInterface
// Validating property defaultsAccessable
// Validating property useInterfaces
// Validating property generateInterfaces
// Validating property keepElementPositions
// Validating property removeUnreferencedNodes
// Validating property inputURI
// Validating property indexedPropertyType
if (getIndexedPropertyType() == null) {
throw new org.netbeans.modules.schema2beansdev.S2bConfig.ValidateException("getIndexedPropertyType() == null", org.netbeans.modules.schema2beansdev.S2bConfig.ValidateException.FailureType.NULL_VALUE, "indexedPropertyType", this); // NOI18N
}
// Validating property doCompile
// Validating property generateSwitches
// Validating property dumpBeanTree
// Validating property generateDotGraph
// Validating property processComments
// Validating property processDocType
// Validating property checkUpToDate
// Validating property generateParentRefs
// Validating property generateHasChanged
// Validating property newestSourceTime
// Validating property writeBeanGraphFile
// Validating property readBeanGraphFiles
// Validating property readBeanGraphs
// Validating property minFeatures
// Validating property forME
// Validating property generateTagsFile
// Validating property codeGeneratorFactory
// Validating property generateTimeStamp
// Validating property quiet
// Validating property writeConfig
// Validating property readConfig
// Validating property makeDefaults
// Validating property setDefaults
// Validating property trimNonStrings
// Validating property useRuntime
// Validating property extendBaseBean
// Validating property finder
}
/**
* @return true if error, then should display help
*/
public boolean parseArguments(String[] args) {
for (int argNum = 0, size = args.length; argNum < size; ++argNum) {
String arg = args[argNum].toLowerCase().intern();
if (arg == "-f") {
if (argNum+1 >= size) {
missingArgument(args, arg);
continue;
}
setFilename(new java.io.File(args[++argNum]));
continue;
}
if (arg == "-d") {
if (argNum+1 >= size) {
missingArgument(args, arg);
continue;
}
setDocRoot(args[++argNum]);
continue;
}
if (arg == "-r") {
if (argNum+1 >= size) {
missingArgument(args, arg);
continue;
}
setRootDir(new java.io.File(args[++argNum]));
continue;
}
if (arg == "-p") {
if (argNum+1 >= size) {
missingArgument(args, arg);
continue;
}
setPackagePath(args[++argNum]);
continue;
}
if (arg == "-sp") {
if (argNum+1 >= size) {
missingArgument(args, arg);
continue;
}
setIndentAmount(Integer.parseInt(args[++argNum]));
continue;
}
if (arg == "-mdd") {
if (argNum+1 >= size) {
missingArgument(args, arg);
continue;
}
setMddFile(new java.io.File(args[++argNum]));
continue;
}
if (arg == "-noe") {
setScalarException(true);
continue;
}
if (arg == "-nonoe") {
setScalarException(false);
continue;
}
if (arg == "-ts") {
setDumpToString(true);
continue;
}
if (arg == "-nots") {
setDumpToString(false);
continue;
}
if (arg == "-veto") {
setVetoable(true);
continue;
}
if (arg == "-noveto") {
setVetoable(false);
continue;
}
if (arg == "-st") {
setStandalone(true);
continue;
}
if (arg == "-nost") {
setStandalone(false);
continue;
}
if (arg == "-auto") {
setAuto(true);
continue;
}
if (arg == "-noauto") {
setAuto(false);
continue;
}
if (arg == "-throw") {
setThrowErrors(true);
continue;
}
if (arg == "-nothrow") {
setThrowErrors(false);
continue;
}
if (arg == "-validate") {
setGenerateValidate(true);
continue;
}
if (arg == "-novalidate") {
setGenerateValidate(false);
continue;
}
if (arg == "-propertyevents") {
setGeneratePropertyEvents(true);
continue;
}
if (arg == "-nopropertyevents") {
setGeneratePropertyEvents(false);
continue;
}
if (arg == "-transactions") {
setGenerateTransactions(true);
continue;
}
if (arg == "-notransactions") {
setGenerateTransactions(false);
continue;
}
if (arg == "-attrprop") {
setAttributesAsProperties(true);
continue;
}
if (arg == "-noattrprop") {
setAttributesAsProperties(false);
continue;
}
if (arg == "-delegator") {
setGenerateDelegator(true);
continue;
}
if (arg == "-nodelegator") {
setGenerateDelegator(false);
continue;
}
if (arg == "-delegatedir") {
if (argNum+1 >= size) {
missingArgument(args, arg);
continue;
}
setDelegateDir(new java.io.File(args[++argNum]));
continue;
}
if (arg == "-delegatepackage") {
if (argNum+1 >= size) {
missingArgument(args, arg);
continue;
}
setDelegatePackage(args[++argNum]);
continue;
}
if (arg == "-commoninterfacename") {
if (argNum+1 >= size) {
missingArgument(args, arg);
continue;
}
setGenerateCommonInterface(args[++argNum]);
continue;
}
if (arg == "-defaultsaccessable") {
setDefaultsAccessable(true);
continue;
}
if (arg == "-nodefaultsaccessable") {
setDefaultsAccessable(false);
continue;
}
if (arg == "-useinterfaces") {
setUseInterfaces(true);
continue;
}
if (arg == "-nouseinterfaces") {
setUseInterfaces(false);
continue;
}
if (arg == "-geninterfaces") {
setGenerateInterfaces(true);
continue;
}
if (arg == "-nogeninterfaces") {
setGenerateInterfaces(false);
continue;
}
if (arg == "-keepelementpositions") {
setKeepElementPositions(true);
continue;
}
if (arg == "-nokeepelementpositions") {
setKeepElementPositions(false);
continue;
}
if (arg == "-removeunreferencednodes") {
setRemoveUnreferencedNodes(true);
continue;
}
if (arg == "-noremoveunreferencednodes") {
setRemoveUnreferencedNodes(false);
continue;
}
if (arg == "-indexedpropertytype") {
if (argNum+1 >= size) {
missingArgument(args, arg);
continue;
}
setIndexedPropertyType(args[++argNum]);
continue;
}
if (arg == "-compile") {
setDoCompile(true);
continue;
}
if (arg == "-nocompile") {
setDoCompile(false);
continue;
}
if (arg == "-generateswitches") {
setGenerateSwitches(true);
continue;
}
if (arg == "-nogenerateswitches") {
setGenerateSwitches(false);
continue;
}
if (arg == "-dumpbeantree") {
if (argNum+1 >= size) {
missingArgument(args, arg);
continue;
}
setDumpBeanTree(new java.io.File(args[++argNum]));
continue;
}
if (arg == "-gendotgraph") {
if (argNum+1 >= size) {
missingArgument(args, arg);
continue;
}
setGenerateDotGraph(new java.io.File(args[++argNum]));
continue;
}
if (arg == "-comments") {
setProcessComments(true);
continue;
}
if (arg == "-nocomments") {
setProcessComments(false);
continue;
}
if (arg == "-doctype") {
setProcessDocType(true);
continue;
}
if (arg == "-nodoctype") {
setProcessDocType(false);
continue;
}
if (arg == "-checkuptodate") {
setCheckUpToDate(true);
continue;
}
if (arg == "-nocheckuptodate") {
setCheckUpToDate(false);
continue;
}
if (arg == "-haschanged") {
setGenerateHasChanged(true);
continue;
}
if (arg == "-nohaschanged") {
setGenerateHasChanged(false);
continue;
}
if (arg == "-writebeangraph") {
if (argNum+1 >= size) {
missingArgument(args, arg);
continue;
}
setWriteBeanGraphFile(new java.io.File(args[++argNum]));
continue;
}
if (arg == "-readbeangraph") {
if (argNum+1 >= size) {
missingArgument(args, arg);
continue;
}
addReadBeanGraphFiles(new java.io.File(args[++argNum]));
continue;
}
if (arg == "-min") {
setMinFeatures(true);
continue;
}
if (arg == "-nomin") {
setMinFeatures(false);
continue;
}
if (arg == "-forme") {
setForME(true);
continue;
}
if (arg == "-noforme") {
setForME(false);
continue;
}
if (arg == "-tagsfile") {
setGenerateTagsFile(true);
continue;
}
if (arg == "-notagsfile") {
setGenerateTagsFile(false);
continue;
}
if (arg == "-generatetimestamp") {
setGenerateTimeStamp(true);
continue;
}
if (arg == "-nogeneratetimestamp") {
setGenerateTimeStamp(false);
continue;
}
if (arg == "-quiet") {
setQuiet(true);
continue;
}
if (arg == "-noquiet") {
setQuiet(false);
continue;
}
if (arg == "-writeconfig") {
if (argNum+1 >= size) {
missingArgument(args, arg);
continue;
}
setWriteConfig(new java.io.File(args[++argNum]));
continue;
}
if (arg == "-readconfig") {
if (argNum+1 >= size) {
missingArgument(args, arg);
continue;
}
addReadConfig(new java.io.File(args[++argNum]));
continue;
}
if (arg == "-makedefaults") {
setMakeDefaults(true);
continue;
}
if (arg == "-nomakedefaults") {
setMakeDefaults(false);
continue;
}
if (arg == "-setdefaults") {
setSetDefaults(true);
continue;
}
if (arg == "-nosetdefaults") {
setSetDefaults(false);
continue;
}
if (arg == "-trimnonstrings") {
setTrimNonStrings(true);
continue;
}
if (arg == "-notrimnonstrings") {
setTrimNonStrings(false);
continue;
}
if (arg == "-useruntime") {
setUseRuntime(true);
continue;
}
if (arg == "-nouseruntime") {
setUseRuntime(false);
continue;
}
if (arg == "-extendbasebean") {
setExtendBaseBean(true);
continue;
}
if (arg == "-noextendbasebean") {
setExtendBaseBean(false);
continue;
}
if (arg == "-finder") {
if (argNum+1 >= size) {
missingArgument(args, arg);
continue;
}
addFinder(args[++argNum]);
continue;
}
if (arg == "-help" || arg == "--help") {
return true;
}
argNum = unknownArgument(args, arg, argNum);
}
return false;
}
protected int unknownArgument(String[] args, String arg, int argNum) {
throw new IllegalArgumentException("Found unknown argument '"+arg+"'");
}
protected void missingArgument(String[] args, String arg) {
throw new IllegalArgumentException("Not enough arguments. Need 1 more for '"+arg+"'");
}
protected void missingMandatoryArgument(String arg) {
throw new IllegalArgumentException("Missing argument '"+arg+"'");
}
public void showHelp(java.io.PrintStream out) {
out.println(" [-f filename] [-d docRoot] [-r filename] [-p packagePath] [-sp indentAmount]\n [-mdd filename] [-noe] [-nonoe] [-ts] [-nots] [-veto] [-noveto]\n [-st] [-nost] [-auto] [-noauto] [-throw] [-nothrow] [-validate] [-novalidate]\n [-propertyEvents] [-nopropertyEvents] [-transactions] [-notransactions]\n [-attrProp] [-noattrProp] [-delegator] [-nodelegator] [-delegateDir filename]\n [-delegatePackage delegatePackage] [-commonInterfaceName generateCommonInterface]\n [-defaultsAccessable] [-nodefaultsAccessable] [-useInterfaces] [-nouseInterfaces]\n [-genInterfaces] [-nogenInterfaces] [-keepElementPositions] [-nokeepElementPositions]\n [-removeUnreferencedNodes] [-noremoveUnreferencedNodes] [-indexedPropertyType indexedPropertyType]\n [-compile] [-nocompile] [-generateSwitches] [-nogenerateSwitches]\n [-dumpBeanTree filename] [-genDotGraph filename] [-comments] [-nocomments]\n [-docType] [-nodocType] [-checkUpToDate] [-nocheckUpToDate] [-hasChanged] [-nohasChanged]\n [-writeBeanGraph filename] [-readBeanGraph filename] [-min] [-nomin]\n [-forME] [-noforME] [-tagsFile] [-notagsFile] [-generateTimeStamp] [-nogenerateTimeStamp]\n [-quiet] [-noquiet] [-writeConfig filename] [-readConfig filename]\n [-makeDefaults] [-nomakeDefaults] [-setDefaults] [-nosetDefaults]\n [-trimNonStrings] [-notrimNonStrings] [-useRuntime] [-nouseRuntime]\n [-extendBaseBean] [-noextendBaseBean] [-finder finder]\n");
out.print(" -f\tfile name of the schema\n -d\tDTD root element name (for example webapp or ejb-jar)\n -r\tbase root directory (root of the package path)\n -p\tpackage name\n -sp\tset the indentation to use 'number' spaces instead of the default tab (\\t) value\n -mdd\tprovides extra information that the schema cannot provide. If the file doesn't exist, a skeleton file is created and no bean generation happens.\n -noe\tdo not throw the NoSuchElement exception when a scalar property has no value, return a default '0' value instead (BaseBean only).\n -ts\tthe toString() of the bean returns the full content\\n of the bean sub-tree instead of its simple name.\n -veto\tgenerate vetoable properties (only for non-bean properties).\n -st\tstandalone mode - do not generate NetBeans dependencies\n -auto\tDon't ask the user any questions.\n -throw\tgenerate code that prefers to pass exceptions\\n through instead of converting them to RuntimeException (recommended).\n -validate\tGenerate a validate method for doing validation.\n -propertyEvents\tGenerate methods for dealing with property events (always on for BaseBean type).\n -transactions\texperimental feature\n -attrProp\tAttributes become like any other property\n -delegator\tGenerate a delegator class for every bean generated.\n -delegateDir\tThe base directory to write every delegate into.\n -delegatePackage\tThe package to use for the delegates.\n -commonInterfaceName\tName the common interface between all beans.\n -defaultsAccessable\tGenerate methods to be able to get at default values.\n -useInterfaces\tGetters and setters signatures would use the first defined interface on the bean.\n -genInterfaces\tFor every bean generated, generate an interfaces for it's accessors.\n -keepElementPositions\tKeep track of the positions of elements (no BaseBean support).\n -removeUnreferencedNodes\tDo not generate unreferenced nodes from the bean graph.\n -indexedPropertyType\tThe name of the class to use for indexed properties.\n -compile\tCompile all generated classes using javac.\n -generateSwitches\tGenerate parseArguments()\n -dumpBeanTree\tWrite out the bean tree to filename.\n -genDotGraph\tGenerate a .dot style file for use with GraphViz (http://www.graphviz.org/).\n -comments\tProcess and keep comments (always on for BaseBean type).\n -docType\tProcess and keep Document Types (always on for BaseBean type).\"\n -checkUpToDate\tOnly do generation if the source files are newer than the to be generated files.\n -hasChanged\tKeep track of whether or not the beans have changed.\n -writeBeanGraph\tWrite out a beangraph XML file. Useful for connecting separate bean graphs.\n -readBeanGraph\tRead in and use the results of another bean graph.\n -min\tGenerate the minimum Java Beans. Reduce features in favor of reduced class file size.\n -forME\tGenerate code for use on J2ME.\n -tagsFile\tGenerate a class that has all schema element and attribute names\n -generateTimeStamp\tOutput a born on date into generated files.\n -quiet\tDon't be as verbose.\n -writeConfig\tWrite out Config as a file; this includes all command line switches. Useful for seeing what switches are set, and for reloading a bunch of switches with -readConfig.\n -readConfig\tRead in Config file. See -writeConfig.\n -makeDefaults\tMake properties that require a value have a default value even if the schema didn't say it had a default (defaults to true).\n -setDefaults\tFill in defaults.\n -trimNonStrings\tTrim non strings while reading XML.\n -useRuntime\tMake use of the schema2beans runtime (always on for BaseBean type).\n -extendBaseBean\tMake every bean extend BaseBean (always on for BaseBean type). For those who like -javabean's better performance, but can't seem to get away from BaseBean.\n -finder\tAdd a finder method. Format: \"on {start} find {selector} by {key}\". Example: \"on /ejb-jar/enterprise-beans find session by ejb-name\".\n");
}
public void changePropertyByName(String name, Object value) {
if (name == null) return;
name = name.intern();
if (name == "schemaType")
setSchemaType((java.lang.String)value);
else if (name == "traceParse")
setTraceParse(((java.lang.Boolean)value).booleanValue());
else if (name == "traceGen")
setTraceGen(((java.lang.Boolean)value).booleanValue());
else if (name == "traceMisc")
setTraceMisc(((java.lang.Boolean)value).booleanValue());
else if (name == "traceDot")
setTraceDot(((java.lang.Boolean)value).booleanValue());
else if (name == "filename")
setFilename((java.io.File)value);
else if (name == "fileIn")
setFileIn((java.io.InputStream)value);
else if (name == "docRoot")
setDocRoot((java.lang.String)value);
else if (name == "rootDir")
setRootDir((java.io.File)value);
else if (name == "packagePath")
setPackagePath((java.lang.String)value);
else if (name == "indent")
setIndent((java.lang.String)value);
else if (name == "indentAmount")
setIndentAmount(((java.lang.Integer)value).intValue());
else if (name == "mddFile")
setMddFile((java.io.File)value);
else if (name == "mddIn")
setMddIn((java.io.InputStream)value);
else if (name == "metaDD")
setMetaDD((org.netbeans.modules.schema2beansdev.metadd.MetaDD)value);
else if (name == "doGeneration")
setDoGeneration(((java.lang.Boolean)value).booleanValue());
else if (name == "scalarException")
setScalarException(((java.lang.Boolean)value).booleanValue());
else if (name == "dumpToString")
setDumpToString(((java.lang.Boolean)value).booleanValue());
else if (name == "vetoable")
setVetoable(((java.lang.Boolean)value).booleanValue());
else if (name == "standalone")
setStandalone(((java.lang.Boolean)value).booleanValue());
else if (name == "auto")
setAuto(((java.lang.Boolean)value).booleanValue());
else if (name == "messageOut")
setMessageOut((java.io.PrintStream)value);
else if (name == "outputStreamProvider")
setOutputStreamProvider((org.netbeans.modules.schema2beansdev.GenBeans.OutputStreamProvider)value);
else if (name == "throwErrors")
setThrowErrors(((java.lang.Boolean)value).booleanValue());
else if (name == "generateXMLIO")
setGenerateXMLIO(((java.lang.Boolean)value).booleanValue());
else if (name == "generateValidate")
setGenerateValidate(((java.lang.Boolean)value).booleanValue());
else if (name == "generatePropertyEvents")
setGeneratePropertyEvents(((java.lang.Boolean)value).booleanValue());
else if (name == "generateStoreEvents")
setGenerateStoreEvents(((java.lang.Boolean)value).booleanValue());
else if (name == "generateTransactions")
setGenerateTransactions(((java.lang.Boolean)value).booleanValue());
else if (name == "attributesAsProperties")
setAttributesAsProperties(((java.lang.Boolean)value).booleanValue());
else if (name == "generateDelegator")
setGenerateDelegator(((java.lang.Boolean)value).booleanValue());
else if (name == "delegateDir")
setDelegateDir((java.io.File)value);
else if (name == "delegatePackage")
setDelegatePackage((java.lang.String)value);
else if (name == "generateCommonInterface")
setGenerateCommonInterface((java.lang.String)value);
else if (name == "defaultsAccessable")
setDefaultsAccessable(((java.lang.Boolean)value).booleanValue());
else if (name == "useInterfaces")
setUseInterfaces(((java.lang.Boolean)value).booleanValue());
else if (name == "generateInterfaces")
setGenerateInterfaces(((java.lang.Boolean)value).booleanValue());
else if (name == "keepElementPositions")
setKeepElementPositions(((java.lang.Boolean)value).booleanValue());
else if (name == "removeUnreferencedNodes")
setRemoveUnreferencedNodes(((java.lang.Boolean)value).booleanValue());
else if (name == "inputURI")
setInputURI((java.lang.String)value);
else if (name == "indexedPropertyType")
setIndexedPropertyType((java.lang.String)value);
else if (name == "doCompile")
setDoCompile(((java.lang.Boolean)value).booleanValue());
else if (name == "generateSwitches")
setGenerateSwitches(((java.lang.Boolean)value).booleanValue());
else if (name == "dumpBeanTree")
setDumpBeanTree((java.io.File)value);
else if (name == "generateDotGraph")
setGenerateDotGraph((java.io.File)value);
else if (name == "processComments")
setProcessComments(((java.lang.Boolean)value).booleanValue());
else if (name == "processDocType")
setProcessDocType(((java.lang.Boolean)value).booleanValue());
else if (name == "checkUpToDate")
setCheckUpToDate(((java.lang.Boolean)value).booleanValue());
else if (name == "generateParentRefs")
setGenerateParentRefs(((java.lang.Boolean)value).booleanValue());
else if (name == "generateHasChanged")
setGenerateHasChanged(((java.lang.Boolean)value).booleanValue());
else if (name == "newestSourceTime")
setNewestSourceTime(((java.lang.Long)value).longValue());
else if (name == "writeBeanGraphFile")
setWriteBeanGraphFile((java.io.File)value);
else if (name == "readBeanGraphFiles")
addReadBeanGraphFiles((java.io.File)value);
else if (name == "readBeanGraphFiles[]")
setReadBeanGraphFiles((java.io.File[]) value);
else if (name == "readBeanGraphs")
addReadBeanGraphs((org.netbeans.modules.schema2beansdev.beangraph.BeanGraph)value);
else if (name == "readBeanGraphs[]")
setReadBeanGraphs((org.netbeans.modules.schema2beansdev.beangraph.BeanGraph[]) value);
else if (name == "minFeatures")
setMinFeatures(((java.lang.Boolean)value).booleanValue());
else if (name == "forME")
setForME(((java.lang.Boolean)value).booleanValue());
else if (name == "generateTagsFile")
setGenerateTagsFile(((java.lang.Boolean)value).booleanValue());
else if (name == "codeGeneratorFactory")
setCodeGeneratorFactory((org.netbeans.modules.schema2beansdev.CodeGeneratorFactory)value);
else if (name == "generateTimeStamp")
setGenerateTimeStamp(((java.lang.Boolean)value).booleanValue());
else if (name == "quiet")
setQuiet(((java.lang.Boolean)value).booleanValue());
else if (name == "writeConfig")
setWriteConfig((java.io.File)value);
else if (name == "readConfig")
addReadConfig((java.io.File)value);
else if (name == "readConfig[]")
setReadConfig((java.io.File[]) value);
else if (name == "makeDefaults")
setMakeDefaults(((java.lang.Boolean)value).booleanValue());
else if (name == "setDefaults")
setSetDefaults(((java.lang.Boolean)value).booleanValue());
else if (name == "trimNonStrings")
setTrimNonStrings(((java.lang.Boolean)value).booleanValue());
else if (name == "useRuntime")
setUseRuntime(((java.lang.Boolean)value).booleanValue());
else if (name == "extendBaseBean")
setExtendBaseBean(((java.lang.Boolean)value).booleanValue());
else if (name == "finder")
addFinder((java.lang.String)value);
else if (name == "finder[]")
setFinder((java.lang.String[]) value);
else
throw new IllegalArgumentException(name+" is not a valid property name for S2bConfig");
}
public Object fetchPropertyByName(String name) {
if (name == "schemaType")
return getSchemaType();
if (name == "traceParse")
return (isTraceParse() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "traceGen")
return (isTraceGen() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "traceMisc")
return (isTraceMisc() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "traceDot")
return (isTraceDot() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "filename")
return getFilename();
if (name == "fileIn")
return getFileIn();
if (name == "docRoot")
return getDocRoot();
if (name == "rootDir")
return getRootDir();
if (name == "packagePath")
return getPackagePath();
if (name == "indent")
return getIndent();
if (name == "indentAmount")
return new java.lang.Integer(getIndentAmount());
if (name == "mddFile")
return getMddFile();
if (name == "mddIn")
return getMddIn();
if (name == "metaDD")
return getMetaDD();
if (name == "doGeneration")
return (isDoGeneration() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "scalarException")
return (isScalarException() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "dumpToString")
return (isDumpToString() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "vetoable")
return (isVetoable() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "standalone")
return (isStandalone() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "auto")
return (isAuto() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "messageOut")
return getMessageOut();
if (name == "outputStreamProvider")
return getOutputStreamProvider();
if (name == "throwErrors")
return (isThrowErrors() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "generateXMLIO")
return (isGenerateXMLIO() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "generateValidate")
return (isGenerateValidate() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "generatePropertyEvents")
return (isGeneratePropertyEvents() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "generateStoreEvents")
return (isGenerateStoreEvents() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "generateTransactions")
return (isGenerateTransactions() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "attributesAsProperties")
return (isAttributesAsProperties() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "generateDelegator")
return (isGenerateDelegator() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "delegateDir")
return getDelegateDir();
if (name == "delegatePackage")
return getDelegatePackage();
if (name == "generateCommonInterface")
return getGenerateCommonInterface();
if (name == "defaultsAccessable")
return (isDefaultsAccessable() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "useInterfaces")
return (isUseInterfaces() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "generateInterfaces")
return (isGenerateInterfaces() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "keepElementPositions")
return (isKeepElementPositions() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "removeUnreferencedNodes")
return (isRemoveUnreferencedNodes() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "inputURI")
return getInputURI();
if (name == "indexedPropertyType")
return getIndexedPropertyType();
if (name == "doCompile")
return (isDoCompile() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "generateSwitches")
return (isGenerateSwitches() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "dumpBeanTree")
return getDumpBeanTree();
if (name == "generateDotGraph")
return getGenerateDotGraph();
if (name == "processComments")
return (isProcessComments() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "processDocType")
return (isProcessDocType() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "checkUpToDate")
return (isCheckUpToDate() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "generateParentRefs")
return (isGenerateParentRefs() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "generateHasChanged")
return (isGenerateHasChanged() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "newestSourceTime")
return new java.lang.Long(getNewestSourceTime());
if (name == "writeBeanGraphFile")
return getWriteBeanGraphFile();
if (name == "readBeanGraphFiles[]")
return getReadBeanGraphFiles();
if (name == "readBeanGraphs[]")
return getReadBeanGraphs();
if (name == "minFeatures")
return (isMinFeatures() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "forME")
return (isForME() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "generateTagsFile")
return (isGenerateTagsFile() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "codeGeneratorFactory")
return getCodeGeneratorFactory();
if (name == "generateTimeStamp")
return (isGenerateTimeStamp() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "quiet")
return (isQuiet() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "writeConfig")
return getWriteConfig();
if (name == "readConfig[]")
return getReadConfig();
if (name == "makeDefaults")
return (isMakeDefaults() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "setDefaults")
return (isSetDefaults() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "trimNonStrings")
return (isTrimNonStrings() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "useRuntime")
return (isUseRuntime() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "extendBaseBean")
return (isExtendBaseBean() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
if (name == "finder[]")
return getFinder();
throw new IllegalArgumentException(name+" is not a valid property name for S2bConfig");
}
public String nameSelf() {
return "/S2bConfig";
}
public String nameChild(Object childObj) {
return nameChild(childObj, false, false);
}
/**
* @param childObj The child object to search for
* @param returnSchemaName Whether or not the schema name should be returned or the property name
* @return null if not found
*/
public String nameChild(Object childObj, boolean returnConstName, boolean returnSchemaName) {
return nameChild(childObj, returnConstName, returnSchemaName, false);
}
/**
* @param childObj The child object to search for
* @param returnSchemaName Whether or not the schema name should be returned or the property name
* @return null if not found
*/
public String nameChild(Object childObj, boolean returnConstName, boolean returnSchemaName, boolean returnXPathName) {
if (childObj instanceof java.lang.String) {
java.lang.String child = (java.lang.String) childObj;
if (child == _SchemaType) {
if (returnConstName) {
return SCHEMATYPE;
} else if (returnSchemaName) {
return "schemaType";
} else if (returnXPathName) {
return "schemaType";
} else {
return "SchemaType";
}
}
if (child == _DocRoot) {
if (returnConstName) {
return DOCROOT;
} else if (returnSchemaName) {
return "docRoot";
} else if (returnXPathName) {
return "docRoot";
} else {
return "DocRoot";
}
}
if (child == _PackagePath) {
if (returnConstName) {
return PACKAGEPATH;
} else if (returnSchemaName) {
return "packagePath";
} else if (returnXPathName) {
return "packagePath";
} else {
return "PackagePath";
}
}
if (child == _Indent) {
if (returnConstName) {
return INDENT;
} else if (returnSchemaName) {
return "indent";
} else if (returnXPathName) {
return "indent";
} else {
return "Indent";
}
}
if (child == _DelegatePackage) {
if (returnConstName) {
return DELEGATEPACKAGE;
} else if (returnSchemaName) {
return "delegatePackage";
} else if (returnXPathName) {
return "delegatePackage";
} else {
return "DelegatePackage";
}
}
if (child == _GenerateCommonInterface) {
if (returnConstName) {
return GENERATECOMMONINTERFACE;
} else if (returnSchemaName) {
return "generateCommonInterface";
} else if (returnXPathName) {
return "generateCommonInterface";
} else {
return "GenerateCommonInterface";
}
}
if (child == _InputURI) {
if (returnConstName) {
return INPUTURI;
} else if (returnSchemaName) {
return "inputURI";
} else if (returnXPathName) {
return "inputURI";
} else {
return "InputURI";
}
}
if (child == _IndexedPropertyType) {
if (returnConstName) {
return INDEXEDPROPERTYTYPE;
} else if (returnSchemaName) {
return "indexedPropertyType";
} else if (returnXPathName) {
return "indexedPropertyType";
} else {
return "IndexedPropertyType";
}
}
int index = 0;
for (java.util.Iterator it = _Finder.iterator(); it.hasNext();
) {
java.lang.String element = (java.lang.String)it.next();
if (child == element) {
if (returnConstName) {
return FINDER;
} else if (returnSchemaName) {
return "finder";
} else if (returnXPathName) {
return "finder[position()="+index+"]";
} else {
return "Finder."+Integer.toHexString(index);
}
}
++index;
}
}
if (childObj instanceof java.io.InputStream) {
java.io.InputStream child = (java.io.InputStream) childObj;
if (child == _FileIn) {
if (returnConstName) {
return FILEIN;
} else if (returnSchemaName) {
return "fileIn";
} else if (returnXPathName) {
return "fileIn";
} else {
return "FileIn";
}
}
if (child == _MddIn) {
if (returnConstName) {
return MDDIN;
} else if (returnSchemaName) {
return "mddIn";
} else if (returnXPathName) {
return "mddIn";
} else {
return "MddIn";
}
}
}
if (childObj instanceof org.netbeans.modules.schema2beansdev.GenBeans.OutputStreamProvider) {
org.netbeans.modules.schema2beansdev.GenBeans.OutputStreamProvider child = (org.netbeans.modules.schema2beansdev.GenBeans.OutputStreamProvider) childObj;
if (child == _OutputStreamProvider) {
if (returnConstName) {
return OUTPUTSTREAMPROVIDER;
} else if (returnSchemaName) {
return "outputStreamProvider";
} else if (returnXPathName) {
return "outputStreamProvider";
} else {
return "OutputStreamProvider";
}
}
}
if (childObj instanceof java.lang.Integer) {
java.lang.Integer child = (java.lang.Integer) childObj;
if (((java.lang.Integer)child).intValue() == _IndentAmount) {
if (returnConstName) {
return INDENTAMOUNT;
} else if (returnSchemaName) {
return "indentAmount";
} else if (returnXPathName) {
return "indentAmount";
} else {
return "IndentAmount";
}
}
}
if (childObj instanceof org.netbeans.modules.schema2beansdev.metadd.MetaDD) {
org.netbeans.modules.schema2beansdev.metadd.MetaDD child = (org.netbeans.modules.schema2beansdev.metadd.MetaDD) childObj;
if (child == _MetaDD) {
if (returnConstName) {
return METADD;
} else if (returnSchemaName) {
return "metaDD";
} else if (returnXPathName) {
return "metaDD";
} else {
return "MetaDD";
}
}
}
if (childObj instanceof java.io.PrintStream) {
java.io.PrintStream child = (java.io.PrintStream) childObj;
if (child == _MessageOut) {
if (returnConstName) {
return MESSAGEOUT;
} else if (returnSchemaName) {
return "messageOut";
} else if (returnXPathName) {
return "messageOut";
} else {
return "MessageOut";
}
}
}
if (childObj instanceof org.netbeans.modules.schema2beansdev.CodeGeneratorFactory) {
org.netbeans.modules.schema2beansdev.CodeGeneratorFactory child = (org.netbeans.modules.schema2beansdev.CodeGeneratorFactory) childObj;
if (child == _CodeGeneratorFactory) {
if (returnConstName) {
return CODEGENERATORFACTORY;
} else if (returnSchemaName) {
return "codeGeneratorFactory";
} else if (returnXPathName) {
return "codeGeneratorFactory";
} else {
return "CodeGeneratorFactory";
}
}
}
if (childObj instanceof java.io.File) {
java.io.File child = (java.io.File) childObj;
if (child == _Filename) {
if (returnConstName) {
return FILENAME;
} else if (returnSchemaName) {
return "filename";
} else if (returnXPathName) {
return "filename";
} else {
return "Filename";
}
}
if (child == _RootDir) {
if (returnConstName) {
return ROOTDIR;
} else if (returnSchemaName) {
return "rootDir";
} else if (returnXPathName) {
return "rootDir";
} else {
return "RootDir";
}
}
if (child == _MddFile) {
if (returnConstName) {
return MDDFILE;
} else if (returnSchemaName) {
return "mddFile";
} else if (returnXPathName) {
return "mddFile";
} else {
return "MddFile";
}
}
if (child == _DelegateDir) {
if (returnConstName) {
return DELEGATEDIR;
} else if (returnSchemaName) {
return "delegateDir";
} else if (returnXPathName) {
return "delegateDir";
} else {
return "DelegateDir";
}
}
if (child == _DumpBeanTree) {
if (returnConstName) {
return DUMPBEANTREE;
} else if (returnSchemaName) {
return "dumpBeanTree";
} else if (returnXPathName) {
return "dumpBeanTree";
} else {
return "DumpBeanTree";
}
}
if (child == _GenerateDotGraph) {
if (returnConstName) {
return GENERATEDOTGRAPH;
} else if (returnSchemaName) {
return "generateDotGraph";
} else if (returnXPathName) {
return "generateDotGraph";
} else {
return "GenerateDotGraph";
}
}
if (child == _WriteBeanGraphFile) {
if (returnConstName) {
return WRITEBEANGRAPHFILE;
} else if (returnSchemaName) {
return "writeBeanGraphFile";
} else if (returnXPathName) {
return "writeBeanGraphFile";
} else {
return "WriteBeanGraphFile";
}
}
int index = 0;
for (java.util.Iterator it = _ReadBeanGraphFiles.iterator();
it.hasNext(); ) {
java.io.File element = (java.io.File)it.next();
if (child == element) {
if (returnConstName) {
return READBEANGRAPHFILES;
} else if (returnSchemaName) {
return "readBeanGraphFiles";
} else if (returnXPathName) {
return "readBeanGraphFiles[position()="+index+"]";
} else {
return "ReadBeanGraphFiles."+Integer.toHexString(index);
}
}
++index;
}
if (child == _WriteConfig) {
if (returnConstName) {
return WRITECONFIG;
} else if (returnSchemaName) {
return "writeConfig";
} else if (returnXPathName) {
return "writeConfig";
} else {
return "WriteConfig";
}
}
index = 0;
for (java.util.Iterator it = _ReadConfig.iterator();
it.hasNext(); ) {
java.io.File element = (java.io.File)it.next();
if (child == element) {
if (returnConstName) {
return READCONFIG;
} else if (returnSchemaName) {
return "readConfig";
} else if (returnXPathName) {
return "readConfig[position()="+index+"]";
} else {
return "ReadConfig."+Integer.toHexString(index);
}
}
++index;
}
}
if (childObj instanceof java.lang.Long) {
java.lang.Long child = (java.lang.Long) childObj;
if (((java.lang.Long)child).longValue() == _NewestSourceTime) {
if (returnConstName) {
return NEWESTSOURCETIME;
} else if (returnSchemaName) {
return "newestSourceTime";
} else if (returnXPathName) {
return "newestSourceTime";
} else {
return "NewestSourceTime";
}
}
}
if (childObj instanceof java.lang.Boolean) {
java.lang.Boolean child = (java.lang.Boolean) childObj;
if (((java.lang.Boolean)child).booleanValue() == _TraceParse) {
if (returnConstName) {
return TRACEPARSE;
} else if (returnSchemaName) {
return "traceParse";
} else if (returnXPathName) {
return "traceParse";
} else {
return "TraceParse";
}
}
if (((java.lang.Boolean)child).booleanValue() == _TraceGen) {
if (returnConstName) {
return TRACEGEN;
} else if (returnSchemaName) {
return "traceGen";
} else if (returnXPathName) {
return "traceGen";
} else {
return "TraceGen";
}
}
if (((java.lang.Boolean)child).booleanValue() == _TraceMisc) {
if (returnConstName) {
return TRACEMISC;
} else if (returnSchemaName) {
return "traceMisc";
} else if (returnXPathName) {
return "traceMisc";
} else {
return "TraceMisc";
}
}
if (((java.lang.Boolean)child).booleanValue() == _TraceDot) {
if (returnConstName) {
return TRACEDOT;
} else if (returnSchemaName) {
return "traceDot";
} else if (returnXPathName) {
return "traceDot";
} else {
return "TraceDot";
}
}
if (((java.lang.Boolean)child).booleanValue() == _DoGeneration) {
if (returnConstName) {
return DOGENERATION;
} else if (returnSchemaName) {
return "doGeneration";
} else if (returnXPathName) {
return "doGeneration";
} else {
return "DoGeneration";
}
}
if (((java.lang.Boolean)child).booleanValue() == _ScalarException) {
if (returnConstName) {
return SCALAREXCEPTION;
} else if (returnSchemaName) {
return "scalarException";
} else if (returnXPathName) {
return "scalarException";
} else {
return "ScalarException";
}
}
if (((java.lang.Boolean)child).booleanValue() == _DumpToString) {
if (returnConstName) {
return DUMPTOSTRING;
} else if (returnSchemaName) {
return "dumpToString";
} else if (returnXPathName) {
return "dumpToString";
} else {
return "DumpToString";
}
}
if (((java.lang.Boolean)child).booleanValue() == _Vetoable) {
if (returnConstName) {
return VETOABLE;
} else if (returnSchemaName) {
return "vetoable";
} else if (returnXPathName) {
return "vetoable";
} else {
return "Vetoable";
}
}
if (((java.lang.Boolean)child).booleanValue() == _Standalone) {
if (returnConstName) {
return STANDALONE;
} else if (returnSchemaName) {
return "standalone";
} else if (returnXPathName) {
return "standalone";
} else {
return "Standalone";
}
}
if (((java.lang.Boolean)child).booleanValue() == _Auto) {
if (returnConstName) {
return AUTO;
} else if (returnSchemaName) {
return "auto";
} else if (returnXPathName) {
return "auto";
} else {
return "Auto";
}
}
if (((java.lang.Boolean)child).booleanValue() == _ThrowErrors) {
if (returnConstName) {
return THROWERRORS;
} else if (returnSchemaName) {
return "throwErrors";
} else if (returnXPathName) {
return "throwErrors";
} else {
return "ThrowErrors";
}
}
if (((java.lang.Boolean)child).booleanValue() == _GenerateXMLIO) {
if (returnConstName) {
return GENERATEXMLIO;
} else if (returnSchemaName) {
return "generateXMLIO";
} else if (returnXPathName) {
return "generateXMLIO";
} else {
return "GenerateXMLIO";
}
}
if (((java.lang.Boolean)child).booleanValue() == _GenerateValidate) {
if (returnConstName) {
return GENERATEVALIDATE;
} else if (returnSchemaName) {
return "generateValidate";
} else if (returnXPathName) {
return "generateValidate";
} else {
return "GenerateValidate";
}
}
if (((java.lang.Boolean)child).booleanValue() == _GeneratePropertyEvents) {
if (returnConstName) {
return GENERATEPROPERTYEVENTS;
} else if (returnSchemaName) {
return "generatePropertyEvents";
} else if (returnXPathName) {
return "generatePropertyEvents";
} else {
return "GeneratePropertyEvents";
}
}
if (((java.lang.Boolean)child).booleanValue() == _GenerateStoreEvents) {
if (returnConstName) {
return GENERATESTOREEVENTS;
} else if (returnSchemaName) {
return "generateStoreEvents";
} else if (returnXPathName) {
return "generateStoreEvents";
} else {
return "GenerateStoreEvents";
}
}
if (((java.lang.Boolean)child).booleanValue() == _GenerateTransactions) {
if (returnConstName) {
return GENERATETRANSACTIONS;
} else if (returnSchemaName) {
return "generateTransactions";
} else if (returnXPathName) {
return "generateTransactions";
} else {
return "GenerateTransactions";
}
}
if (((java.lang.Boolean)child).booleanValue() == _AttributesAsProperties) {
if (returnConstName) {
return ATTRIBUTESASPROPERTIES;
} else if (returnSchemaName) {
return "attributesAsProperties";
} else if (returnXPathName) {
return "attributesAsProperties";
} else {
return "AttributesAsProperties";
}
}
if (((java.lang.Boolean)child).booleanValue() == _GenerateDelegator) {
if (returnConstName) {
return GENERATEDELEGATOR;
} else if (returnSchemaName) {
return "generateDelegator";
} else if (returnXPathName) {
return "generateDelegator";
} else {
return "GenerateDelegator";
}
}
if (((java.lang.Boolean)child).booleanValue() == _DefaultsAccessable) {
if (returnConstName) {
return DEFAULTSACCESSABLE;
} else if (returnSchemaName) {
return "defaultsAccessable";
} else if (returnXPathName) {
return "defaultsAccessable";
} else {
return "DefaultsAccessable";
}
}
if (((java.lang.Boolean)child).booleanValue() == _UseInterfaces) {
if (returnConstName) {
return USEINTERFACES;
} else if (returnSchemaName) {
return "useInterfaces";
} else if (returnXPathName) {
return "useInterfaces";
} else {
return "UseInterfaces";
}
}
if (((java.lang.Boolean)child).booleanValue() == _GenerateInterfaces) {
if (returnConstName) {
return GENERATEINTERFACES;
} else if (returnSchemaName) {
return "generateInterfaces";
} else if (returnXPathName) {
return "generateInterfaces";
} else {
return "GenerateInterfaces";
}
}
if (((java.lang.Boolean)child).booleanValue() == _KeepElementPositions) {
if (returnConstName) {
return KEEPELEMENTPOSITIONS;
} else if (returnSchemaName) {
return "keepElementPositions";
} else if (returnXPathName) {
return "keepElementPositions";
} else {
return "KeepElementPositions";
}
}
if (((java.lang.Boolean)child).booleanValue() == _RemoveUnreferencedNodes) {
if (returnConstName) {
return REMOVEUNREFERENCEDNODES;
} else if (returnSchemaName) {
return "removeUnreferencedNodes";
} else if (returnXPathName) {
return "removeUnreferencedNodes";
} else {
return "RemoveUnreferencedNodes";
}
}
if (((java.lang.Boolean)child).booleanValue() == _DoCompile) {
if (returnConstName) {
return DOCOMPILE;
} else if (returnSchemaName) {
return "doCompile";
} else if (returnXPathName) {
return "doCompile";
} else {
return "DoCompile";
}
}
if (((java.lang.Boolean)child).booleanValue() == _GenerateSwitches) {
if (returnConstName) {
return GENERATESWITCHES;
} else if (returnSchemaName) {
return "generateSwitches";
} else if (returnXPathName) {
return "generateSwitches";
} else {
return "GenerateSwitches";
}
}
if (((java.lang.Boolean)child).booleanValue() == _ProcessComments) {
if (returnConstName) {
return PROCESSCOMMENTS;
} else if (returnSchemaName) {
return "processComments";
} else if (returnXPathName) {
return "processComments";
} else {
return "ProcessComments";
}
}
if (((java.lang.Boolean)child).booleanValue() == _ProcessDocType) {
if (returnConstName) {
return PROCESSDOCTYPE;
} else if (returnSchemaName) {
return "processDocType";
} else if (returnXPathName) {
return "processDocType";
} else {
return "ProcessDocType";
}
}
if (((java.lang.Boolean)child).booleanValue() == _CheckUpToDate) {
if (returnConstName) {
return CHECKUPTODATE;
} else if (returnSchemaName) {
return "checkUpToDate";
} else if (returnXPathName) {
return "checkUpToDate";
} else {
return "CheckUpToDate";
}
}
if (((java.lang.Boolean)child).booleanValue() == _GenerateParentRefs) {
if (returnConstName) {
return GENERATEPARENTREFS;
} else if (returnSchemaName) {
return "generateParentRefs";
} else if (returnXPathName) {
return "generateParentRefs";
} else {
return "GenerateParentRefs";
}
}
if (((java.lang.Boolean)child).booleanValue() == _GenerateHasChanged) {
if (returnConstName) {
return GENERATEHASCHANGED;
} else if (returnSchemaName) {
return "generateHasChanged";
} else if (returnXPathName) {
return "generateHasChanged";
} else {
return "GenerateHasChanged";
}
}
if (((java.lang.Boolean)child).booleanValue() == _MinFeatures) {
if (returnConstName) {
return MINFEATURES;
} else if (returnSchemaName) {
return "minFeatures";
} else if (returnXPathName) {
return "minFeatures";
} else {
return "MinFeatures";
}
}
if (((java.lang.Boolean)child).booleanValue() == _ForME) {
if (returnConstName) {
return FORME;
} else if (returnSchemaName) {
return "forME";
} else if (returnXPathName) {
return "forME";
} else {
return "ForME";
}
}
if (((java.lang.Boolean)child).booleanValue() == _GenerateTagsFile) {
if (returnConstName) {
return GENERATETAGSFILE;
} else if (returnSchemaName) {
return "generateTagsFile";
} else if (returnXPathName) {
return "generateTagsFile";
} else {
return "GenerateTagsFile";
}
}
if (((java.lang.Boolean)child).booleanValue() == _GenerateTimeStamp) {
if (returnConstName) {
return GENERATETIMESTAMP;
} else if (returnSchemaName) {
return "generateTimeStamp";
} else if (returnXPathName) {
return "generateTimeStamp";
} else {
return "GenerateTimeStamp";
}
}
if (((java.lang.Boolean)child).booleanValue() == _Quiet) {
if (returnConstName) {
return QUIET;
} else if (returnSchemaName) {
return "quiet";
} else if (returnXPathName) {
return "quiet";
} else {
return "Quiet";
}
}
if (((java.lang.Boolean)child).booleanValue() == _MakeDefaults) {
if (returnConstName) {
return MAKEDEFAULTS;
} else if (returnSchemaName) {
return "makeDefaults";
} else if (returnXPathName) {
return "makeDefaults";
} else {
return "MakeDefaults";
}
}
if (((java.lang.Boolean)child).booleanValue() == _SetDefaults) {
if (returnConstName) {
return SETDEFAULTS;
} else if (returnSchemaName) {
return "setDefaults";
} else if (returnXPathName) {
return "setDefaults";
} else {
return "SetDefaults";
}
}
if (((java.lang.Boolean)child).booleanValue() == _TrimNonStrings) {
if (returnConstName) {
return TRIMNONSTRINGS;
} else if (returnSchemaName) {
return "trimNonStrings";
} else if (returnXPathName) {
return "trimNonStrings";
} else {
return "TrimNonStrings";
}
}
if (((java.lang.Boolean)child).booleanValue() == _UseRuntime) {
if (returnConstName) {
return USERUNTIME;
} else if (returnSchemaName) {
return "useRuntime";
} else if (returnXPathName) {
return "useRuntime";
} else {
return "UseRuntime";
}
}
if (((java.lang.Boolean)child).booleanValue() == _ExtendBaseBean) {
if (returnConstName) {
return EXTENDBASEBEAN;
} else if (returnSchemaName) {
return "extendBaseBean";
} else if (returnXPathName) {
return "extendBaseBean";
} else {
return "ExtendBaseBean";
}
}
}
if (childObj instanceof org.netbeans.modules.schema2beansdev.beangraph.BeanGraph) {
org.netbeans.modules.schema2beansdev.beangraph.BeanGraph child = (org.netbeans.modules.schema2beansdev.beangraph.BeanGraph) childObj;
int index = 0;
for (java.util.Iterator it = _ReadBeanGraphs.iterator();
it.hasNext(); ) {
org.netbeans.modules.schema2beansdev.beangraph.BeanGraph element = (org.netbeans.modules.schema2beansdev.beangraph.BeanGraph)it.next();
if (child == element) {
if (returnConstName) {
return READBEANGRAPHS;
} else if (returnSchemaName) {
return "readBeanGraphs";
} else if (returnXPathName) {
return "readBeanGraphs[position()="+index+"]";
} else {
return "ReadBeanGraphs."+Integer.toHexString(index);
}
}
++index;
}
}
return null;
}
/**
* Return an array of all of the properties that are beans and are set.
*/
public java.lang.Object[] childBeans(boolean recursive) {
java.util.List children = new java.util.LinkedList();
childBeans(recursive, children);
java.lang.Object[] result = new java.lang.Object[children.size()];
return (java.lang.Object[]) children.toArray(result);
}
/**
* Put all child beans into the beans list.
*/
public void childBeans(boolean recursive, java.util.List beans) {
}
public boolean equals(Object o) {
return o instanceof org.netbeans.modules.schema2beansdev.S2bConfig && equals((org.netbeans.modules.schema2beansdev.S2bConfig) o);
}
public boolean equals(org.netbeans.modules.schema2beansdev.S2bConfig inst) {
if (inst == this) {
return true;
}
if (inst == null) {
return false;
}
if (!(_SchemaType == null ? inst._SchemaType == null : _SchemaType.equals(inst._SchemaType))) {
return false;
}
if (!(_TraceParse == inst._TraceParse)) {
return false;
}
if (!(_TraceGen == inst._TraceGen)) {
return false;
}
if (!(_TraceMisc == inst._TraceMisc)) {
return false;
}
if (!(_TraceDot == inst._TraceDot)) {
return false;
}
if (!(_Filename == null ? inst._Filename == null : _Filename.equals(inst._Filename))) {
return false;
}
if (!(_FileIn == null ? inst._FileIn == null : _FileIn.equals(inst._FileIn))) {
return false;
}
if (!(_DocRoot == null ? inst._DocRoot == null : _DocRoot.equals(inst._DocRoot))) {
return false;
}
if (!(_RootDir == null ? inst._RootDir == null : _RootDir.equals(inst._RootDir))) {
return false;
}
if (!(_PackagePath == null ? inst._PackagePath == null : _PackagePath.equals(inst._PackagePath))) {
return false;
}
if (!(_Indent == null ? inst._Indent == null : _Indent.equals(inst._Indent))) {
return false;
}
if (!(_IndentAmount == inst._IndentAmount)) {
return false;
}
if (!(_MddFile == null ? inst._MddFile == null : _MddFile.equals(inst._MddFile))) {
return false;
}
if (!(_MddIn == null ? inst._MddIn == null : _MddIn.equals(inst._MddIn))) {
return false;
}
if (!(_MetaDD == null ? inst._MetaDD == null : _MetaDD.equals(inst._MetaDD))) {
return false;
}
if (!(_DoGeneration == inst._DoGeneration)) {
return false;
}
if (!(_ScalarException == inst._ScalarException)) {
return false;
}
if (!(_DumpToString == inst._DumpToString)) {
return false;
}
if (!(_Vetoable == inst._Vetoable)) {
return false;
}
if (!(_Standalone == inst._Standalone)) {
return false;
}
if (!(_Auto == inst._Auto)) {
return false;
}
if (!(_MessageOut == null ? inst._MessageOut == null : _MessageOut.equals(inst._MessageOut))) {
return false;
}
if (!(_OutputStreamProvider == null ? inst._OutputStreamProvider == null : _OutputStreamProvider.equals(inst._OutputStreamProvider))) {
return false;
}
if (!(_ThrowErrors == inst._ThrowErrors)) {
return false;
}
if (!(_GenerateXMLIO == inst._GenerateXMLIO)) {
return false;
}
if (!(_GenerateValidate == inst._GenerateValidate)) {
return false;
}
if (!(_GeneratePropertyEvents == inst._GeneratePropertyEvents)) {
return false;
}
if (!(_GenerateStoreEvents == inst._GenerateStoreEvents)) {
return false;
}
if (!(_GenerateTransactions == inst._GenerateTransactions)) {
return false;
}
if (!(_AttributesAsProperties == inst._AttributesAsProperties)) {
return false;
}
if (!(_GenerateDelegator == inst._GenerateDelegator)) {
return false;
}
if (!(_DelegateDir == null ? inst._DelegateDir == null : _DelegateDir.equals(inst._DelegateDir))) {
return false;
}
if (!(_DelegatePackage == null ? inst._DelegatePackage == null : _DelegatePackage.equals(inst._DelegatePackage))) {
return false;
}
if (!(_GenerateCommonInterface == null ? inst._GenerateCommonInterface == null : _GenerateCommonInterface.equals(inst._GenerateCommonInterface))) {
return false;
}
if (!(_DefaultsAccessable == inst._DefaultsAccessable)) {
return false;
}
if (!(_UseInterfaces == inst._UseInterfaces)) {
return false;
}
if (!(_GenerateInterfaces == inst._GenerateInterfaces)) {
return false;
}
if (!(_KeepElementPositions == inst._KeepElementPositions)) {
return false;
}
if (!(_RemoveUnreferencedNodes == inst._RemoveUnreferencedNodes)) {
return false;
}
if (!(_InputURI == null ? inst._InputURI == null : _InputURI.equals(inst._InputURI))) {
return false;
}
if (!(_IndexedPropertyType == null ? inst._IndexedPropertyType == null : _IndexedPropertyType.equals(inst._IndexedPropertyType))) {
return false;
}
if (!(_DoCompile == inst._DoCompile)) {
return false;
}
if (!(_GenerateSwitches == inst._GenerateSwitches)) {
return false;
}
if (!(_DumpBeanTree == null ? inst._DumpBeanTree == null : _DumpBeanTree.equals(inst._DumpBeanTree))) {
return false;
}
if (!(_GenerateDotGraph == null ? inst._GenerateDotGraph == null : _GenerateDotGraph.equals(inst._GenerateDotGraph))) {
return false;
}
if (!(_ProcessComments == inst._ProcessComments)) {
return false;
}
if (!(_ProcessDocType == inst._ProcessDocType)) {
return false;
}
if (!(_CheckUpToDate == inst._CheckUpToDate)) {
return false;
}
if (!(_GenerateParentRefs == inst._GenerateParentRefs)) {
return false;
}
if (!(_GenerateHasChanged == inst._GenerateHasChanged)) {
return false;
}
if (!(_NewestSourceTime == inst._NewestSourceTime)) {
return false;
}
if (!(_WriteBeanGraphFile == null ? inst._WriteBeanGraphFile == null : _WriteBeanGraphFile.equals(inst._WriteBeanGraphFile))) {
return false;
}
if (sizeReadBeanGraphFiles() != inst.sizeReadBeanGraphFiles())
return false;
// Compare every element.
for (java.util.Iterator it = _ReadBeanGraphFiles.iterator(), it2 = inst._ReadBeanGraphFiles.iterator();
it.hasNext() && it2.hasNext(); ) {
java.io.File element = (java.io.File)it.next();
java.io.File element2 = (java.io.File)it2.next();
if (!(element == null ? element2 == null : element.equals(element2))) {
return false;
}
}
if (sizeReadBeanGraphs() != inst.sizeReadBeanGraphs())
return false;
// Compare every element.
for (java.util.Iterator it = _ReadBeanGraphs.iterator(), it2 = inst._ReadBeanGraphs.iterator();
it.hasNext() && it2.hasNext(); ) {
org.netbeans.modules.schema2beansdev.beangraph.BeanGraph element = (org.netbeans.modules.schema2beansdev.beangraph.BeanGraph)it.next();
org.netbeans.modules.schema2beansdev.beangraph.BeanGraph element2 = (org.netbeans.modules.schema2beansdev.beangraph.BeanGraph)it2.next();
if (!(element == null ? element2 == null : element.equals(element2))) {
return false;
}
}
if (!(_MinFeatures == inst._MinFeatures)) {
return false;
}
if (!(_ForME == inst._ForME)) {
return false;
}
if (!(_GenerateTagsFile == inst._GenerateTagsFile)) {
return false;
}
if (!(_CodeGeneratorFactory == null ? inst._CodeGeneratorFactory == null : _CodeGeneratorFactory.equals(inst._CodeGeneratorFactory))) {
return false;
}
if (!(_GenerateTimeStamp == inst._GenerateTimeStamp)) {
return false;
}
if (!(_Quiet == inst._Quiet)) {
return false;
}
if (!(_WriteConfig == null ? inst._WriteConfig == null : _WriteConfig.equals(inst._WriteConfig))) {
return false;
}
if (sizeReadConfig() != inst.sizeReadConfig())
return false;
// Compare every element.
for (java.util.Iterator it = _ReadConfig.iterator(), it2 = inst._ReadConfig.iterator();
it.hasNext() && it2.hasNext(); ) {
java.io.File element = (java.io.File)it.next();
java.io.File element2 = (java.io.File)it2.next();
if (!(element == null ? element2 == null : element.equals(element2))) {
return false;
}
}
if (!(_MakeDefaults == inst._MakeDefaults)) {
return false;
}
if (!(_SetDefaults == inst._SetDefaults)) {
return false;
}
if (!(_TrimNonStrings == inst._TrimNonStrings)) {
return false;
}
if (!(_UseRuntime == inst._UseRuntime)) {
return false;
}
if (!(_ExtendBaseBean == inst._ExtendBaseBean)) {
return false;
}
if (sizeFinder() != inst.sizeFinder())
return false;
// Compare every element.
for (java.util.Iterator it = _Finder.iterator(), it2 = inst._Finder.iterator();
it.hasNext() && it2.hasNext(); ) {
java.lang.String element = (java.lang.String)it.next();
java.lang.String element2 = (java.lang.String)it2.next();
if (!(element == null ? element2 == null : element.equals(element2))) {
return false;
}
}
return true;
}
public int hashCode() {
int result = 17;
result = 37*result + (_SchemaType == null ? 0 : _SchemaType.hashCode());
result = 37*result + (_TraceParse ? 0 : 1);
result = 37*result + (_TraceGen ? 0 : 1);
result = 37*result + (_TraceMisc ? 0 : 1);
result = 37*result + (_TraceDot ? 0 : 1);
result = 37*result + (_Filename == null ? 0 : _Filename.hashCode());
result = 37*result + (_FileIn == null ? 0 : _FileIn.hashCode());
result = 37*result + (_DocRoot == null ? 0 : _DocRoot.hashCode());
result = 37*result + (_RootDir == null ? 0 : _RootDir.hashCode());
result = 37*result + (_PackagePath == null ? 0 : _PackagePath.hashCode());
result = 37*result + (_Indent == null ? 0 : _Indent.hashCode());
result = 37*result + (_IndentAmount);
result = 37*result + (_MddFile == null ? 0 : _MddFile.hashCode());
result = 37*result + (_MddIn == null ? 0 : _MddIn.hashCode());
result = 37*result + (_MetaDD == null ? 0 : _MetaDD.hashCode());
result = 37*result + (_DoGeneration ? 0 : 1);
result = 37*result + (_ScalarException ? 0 : 1);
result = 37*result + (_DumpToString ? 0 : 1);
result = 37*result + (_Vetoable ? 0 : 1);
result = 37*result + (_Standalone ? 0 : 1);
result = 37*result + (_Auto ? 0 : 1);
result = 37*result + (_MessageOut == null ? 0 : _MessageOut.hashCode());
result = 37*result + (_OutputStreamProvider == null ? 0 : _OutputStreamProvider.hashCode());
result = 37*result + (_ThrowErrors ? 0 : 1);
result = 37*result + (_GenerateXMLIO ? 0 : 1);
result = 37*result + (_GenerateValidate ? 0 : 1);
result = 37*result + (_GeneratePropertyEvents ? 0 : 1);
result = 37*result + (_GenerateStoreEvents ? 0 : 1);
result = 37*result + (_GenerateTransactions ? 0 : 1);
result = 37*result + (_AttributesAsProperties ? 0 : 1);
result = 37*result + (_GenerateDelegator ? 0 : 1);
result = 37*result + (_DelegateDir == null ? 0 : _DelegateDir.hashCode());
result = 37*result + (_DelegatePackage == null ? 0 : _DelegatePackage.hashCode());
result = 37*result + (_GenerateCommonInterface == null ? 0 : _GenerateCommonInterface.hashCode());
result = 37*result + (_DefaultsAccessable ? 0 : 1);
result = 37*result + (_UseInterfaces ? 0 : 1);
result = 37*result + (_GenerateInterfaces ? 0 : 1);
result = 37*result + (_KeepElementPositions ? 0 : 1);
result = 37*result + (_RemoveUnreferencedNodes ? 0 : 1);
result = 37*result + (_InputURI == null ? 0 : _InputURI.hashCode());
result = 37*result + (_IndexedPropertyType == null ? 0 : _IndexedPropertyType.hashCode());
result = 37*result + (_DoCompile ? 0 : 1);
result = 37*result + (_GenerateSwitches ? 0 : 1);
result = 37*result + (_DumpBeanTree == null ? 0 : _DumpBeanTree.hashCode());
result = 37*result + (_GenerateDotGraph == null ? 0 : _GenerateDotGraph.hashCode());
result = 37*result + (_ProcessComments ? 0 : 1);
result = 37*result + (_ProcessDocType ? 0 : 1);
result = 37*result + (_CheckUpToDate ? 0 : 1);
result = 37*result + (_GenerateParentRefs ? 0 : 1);
result = 37*result + (_GenerateHasChanged ? 0 : 1);
result = 37*result + ((int)(_NewestSourceTime^(_NewestSourceTime>>>32)));
result = 37*result + (_WriteBeanGraphFile == null ? 0 : _WriteBeanGraphFile.hashCode());
result = 37*result + (_ReadBeanGraphFiles == null ? 0 : _ReadBeanGraphFiles.hashCode());
result = 37*result + (_ReadBeanGraphs == null ? 0 : _ReadBeanGraphs.hashCode());
result = 37*result + (_MinFeatures ? 0 : 1);
result = 37*result + (_ForME ? 0 : 1);
result = 37*result + (_GenerateTagsFile ? 0 : 1);
result = 37*result + (_CodeGeneratorFactory == null ? 0 : _CodeGeneratorFactory.hashCode());
result = 37*result + (_GenerateTimeStamp ? 0 : 1);
result = 37*result + (_Quiet ? 0 : 1);
result = 37*result + (_WriteConfig == null ? 0 : _WriteConfig.hashCode());
result = 37*result + (_ReadConfig == null ? 0 : _ReadConfig.hashCode());
result = 37*result + (_MakeDefaults ? 0 : 1);
result = 37*result + (_SetDefaults ? 0 : 1);
result = 37*result + (_TrimNonStrings ? 0 : 1);
result = 37*result + (_UseRuntime ? 0 : 1);
result = 37*result + (_ExtendBaseBean ? 0 : 1);
result = 37*result + (_Finder == null ? 0 : _Finder.hashCode());
return result;
}
public String toString() {
java.io.StringWriter sw = new java.io.StringWriter();
try {
writeNode(sw);
} catch (java.io.IOException e) {
// How can we actually get an IOException on a StringWriter?
throw new RuntimeException(e);
}
return sw.toString();
}
}
|