0001: /*
0002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
0003: *
0004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
0005: *
0006: * The contents of this file are subject to the terms of either the GNU
0007: * General Public License Version 2 only ("GPL") or the Common
0008: * Development and Distribution License("CDDL") (collectively, the
0009: * "License"). You may not use this file except in compliance with the
0010: * License. You can obtain a copy of the License at
0011: * http://www.netbeans.org/cddl-gplv2.html
0012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
0013: * specific language governing permissions and limitations under the
0014: * License. When distributing the software, include this License Header
0015: * Notice in each file and include the License file at
0016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
0017: * particular file as subject to the "Classpath" exception as provided
0018: * by Sun in the GPL Version 2 section of the License file that
0019: * accompanied this code. If applicable, add the following below the
0020: * License Header, with the fields enclosed by brackets [] replaced by
0021: * your own identifying information:
0022: * "Portions Copyrighted [year] [name of copyright owner]"
0023: *
0024: * Contributor(s):
0025: *
0026: * The Original Software is NetBeans. The Initial Developer of the Original
0027: * Code is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
0028: * Microsystems, Inc. All Rights Reserved.
0029: *
0030: * If you wish your version of this file to be governed by only the CDDL
0031: * or only the GPL Version 2, indicate your decision by adding
0032: * "[Contributor] elects to include this software in this distribution
0033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
0034: * single choice of license, a recipient has the option to distribute
0035: * your version of this file under either the CDDL, the GPL Version 2 or
0036: * to extend the choice of license to its licensees as provided above.
0037: * However, if you add GPL Version 2 code and therefore, elected the GPL
0038: * Version 2 license, then the option applies only if the new code is
0039: * made subject to such option by the copyright holder.
0040: */
0041: /**
0042: * This generated bean class S2bConfig
0043: * matches the schema element 's2bConfig'.
0044: *
0045: *
0046: * This class matches the root element of the XML Schema,
0047: * and is the root of the bean graph.
0048: *
0049: * s2bConfig <s2bConfig> : S2bConfig
0050: * schemaType <schemaType> : java.lang.String
0051: * traceParse <traceParse> : boolean[0,1]
0052: * traceGen <traceGen> : boolean[0,1]
0053: * traceMisc <traceMisc> : boolean[0,1]
0054: * traceDot <traceDot> : boolean[0,1]
0055: * filename <filename> : java.io.File[0,1] [Switch]
0056: * fileIn <fileIn> : java.io.InputStream[0,1]
0057: * docRoot <docRoot> : java.lang.String[0,1] [Switch]
0058: * rootDir <rootDir> : java.io.File [Switch]
0059: * packagePath <packagePath> : java.lang.String[0,1] [Switch]
0060: * indent <indent> : java.lang.String
0061: * indentAmount <indentAmount> : int[0,1] [Switch]
0062: * mddFile <mddFile> : java.io.File[0,1] [Switch]
0063: * mddIn <mddIn> : java.io.InputStream[0,1]
0064: * metaDD <metaDD> : org.netbeans.modules.schema2beansdev.metadd.MetaDD[0,1]
0065: * doGeneration <doGeneration> : boolean
0066: * scalarException <scalarException> : boolean [Switch]
0067: * dumpToString <dumpToString> : boolean[0,1] [Switch]
0068: * vetoable <vetoable> : boolean[0,1] [Switch]
0069: * standalone <standalone> : boolean[0,1] [Switch]
0070: * auto <auto> : boolean[0,1] [Switch]
0071: * messageOut <messageOut> : java.io.PrintStream[0,1]
0072: * outputStreamProvider <outputStreamProvider> : org.netbeans.modules.schema2beansdev.GenBeans.OutputStreamProvider[0,1]
0073: * throwErrors <throwErrors> : boolean[0,1] [Switch]
0074: * generateXMLIO <generateXMLIO> : boolean
0075: * generateValidate <generateValidate> : boolean[0,1] [Switch]
0076: * generatePropertyEvents <generatePropertyEvents> : boolean[0,1] [Switch]
0077: * generateStoreEvents <generateStoreEvents> : boolean[0,1]
0078: * generateTransactions <generateTransactions> : boolean[0,1] [Switch]
0079: * attributesAsProperties <attributesAsProperties> : boolean[0,1] [Switch]
0080: * generateDelegator <generateDelegator> : boolean[0,1] [Switch]
0081: * delegateDir <delegateDir> : java.io.File[0,1] [Switch]
0082: * delegatePackage <delegatePackage> : java.lang.String[0,1] [Switch]
0083: * generateCommonInterface <generateCommonInterface> : java.lang.String[0,1] [Switch]
0084: * defaultsAccessable <defaultsAccessable> : boolean[0,1] [Switch]
0085: * useInterfaces <useInterfaces> : boolean[0,1] [Switch]
0086: * generateInterfaces <generateInterfaces> : boolean[0,1] [Switch]
0087: * keepElementPositions <keepElementPositions> : boolean[0,1] [Switch]
0088: * removeUnreferencedNodes <removeUnreferencedNodes> : boolean[0,1] [Switch]
0089: * inputURI <inputURI> : java.lang.String[0,1]
0090: * indexedPropertyType <indexedPropertyType> : java.lang.String [Switch]
0091: * doCompile <doCompile> : boolean[0,1] [Switch]
0092: * generateSwitches <generateSwitches> : boolean[0,1] [Switch]
0093: * dumpBeanTree <dumpBeanTree> : java.io.File[0,1] [Switch]
0094: * generateDotGraph <generateDotGraph> : java.io.File[0,1] [Switch]
0095: * processComments <processComments> : boolean[0,1] [Switch]
0096: * processDocType <processDocType> : boolean[0,1] [Switch]
0097: * checkUpToDate <checkUpToDate> : boolean[0,1] [Switch]
0098: * generateParentRefs <generateParentRefs> : boolean[0,1]
0099: * generateHasChanged <generateHasChanged> : boolean[0,1] [Switch]
0100: * newestSourceTime <newestSourceTime> : long[0,1]
0101: * writeBeanGraphFile <writeBeanGraphFile> : java.io.File[0,1] [Switch]
0102: * readBeanGraphFiles <readBeanGraphFiles> : java.io.File[0,n] [Switch]
0103: * readBeanGraphs <readBeanGraphs> : org.netbeans.modules.schema2beansdev.beangraph.BeanGraph[0,n]
0104: * minFeatures <minFeatures> : boolean[0,1] [Switch]
0105: * forME <forME> : boolean[0,1] [Switch]
0106: * generateTagsFile <generateTagsFile> : boolean[0,1] [Switch]
0107: * codeGeneratorFactory <codeGeneratorFactory> : org.netbeans.modules.schema2beansdev.CodeGeneratorFactory[0,1]
0108: * generateTimeStamp <generateTimeStamp> : boolean [Switch]
0109: * quiet <quiet> : boolean [Switch]
0110: * writeConfig <writeConfig> : java.io.File[0,1] [Switch]
0111: * readConfig <readConfig> : java.io.File[0,n] [Switch]
0112: * makeDefaults <makeDefaults> : boolean [Switch]
0113: * setDefaults <setDefaults> : boolean[0,1] [Switch]
0114: * trimNonStrings <trimNonStrings> : boolean[0,1] [Switch]
0115: * useRuntime <useRuntime> : boolean[0,1] [Switch]
0116: * extendBaseBean <extendBaseBean> : boolean[0,1] [Switch]
0117: * finder <finder> : java.lang.String[0,n] [Switch]
0118: * target <target> : java.lang.String[0,1] [Switch]
0119: * staxProduceXMLEventReader <staxProduceXMLEventReader> : boolean[0,1] [Switch]
0120: * staxUseXMLEventReader <staxUseXMLEventReader> : boolean[0,1] [Switch]
0121: * optionalScalars <optionalScalars> : boolean[0,1] [Switch]
0122: * defaultElementType <defaultElementType> : java.lang.String[0,1] [Switch]
0123: * respectExtension <respectExtension> : boolean[0,1] [Switch]
0124: * logSuspicious <logSuspicious> : boolean[0,1] [Switch]
0125: *
0126: * @Generated
0127: */package org.netbeans.modules.schema2beansdev;
0128:
0129: public class S2bConfig {
0130: public static final String SCHEMATYPE = "SchemaType"; // NOI18N
0131: public static final String TRACEPARSE = "TraceParse"; // NOI18N
0132: public static final String TRACEGEN = "TraceGen"; // NOI18N
0133: public static final String TRACEMISC = "TraceMisc"; // NOI18N
0134: public static final String TRACEDOT = "TraceDot"; // NOI18N
0135: public static final String FILENAME = "Filename"; // NOI18N
0136: public static final String FILEIN = "FileIn"; // NOI18N
0137: public static final String DOCROOT = "DocRoot"; // NOI18N
0138: public static final String ROOTDIR = "RootDir"; // NOI18N
0139: public static final String PACKAGEPATH = "PackagePath"; // NOI18N
0140: public static final String INDENT = "Indent"; // NOI18N
0141: public static final String INDENTAMOUNT = "IndentAmount"; // NOI18N
0142: public static final String MDDFILE = "MddFile"; // NOI18N
0143: public static final String MDDIN = "MddIn"; // NOI18N
0144: public static final String METADD = "MetaDD"; // NOI18N
0145: public static final String DOGENERATION = "DoGeneration"; // NOI18N
0146: public static final String SCALAREXCEPTION = "ScalarException"; // NOI18N
0147: public static final String DUMPTOSTRING = "DumpToString"; // NOI18N
0148: public static final String VETOABLE = "Vetoable"; // NOI18N
0149: public static final String STANDALONE = "Standalone"; // NOI18N
0150: public static final String AUTO = "Auto"; // NOI18N
0151: public static final String MESSAGEOUT = "MessageOut"; // NOI18N
0152: public static final String OUTPUTSTREAMPROVIDER = "OutputStreamProvider"; // NOI18N
0153: public static final String THROWERRORS = "ThrowErrors"; // NOI18N
0154: public static final String GENERATEXMLIO = "GenerateXMLIO"; // NOI18N
0155: public static final String GENERATEVALIDATE = "GenerateValidate"; // NOI18N
0156: public static final String GENERATEPROPERTYEVENTS = "GeneratePropertyEvents"; // NOI18N
0157: public static final String GENERATESTOREEVENTS = "GenerateStoreEvents"; // NOI18N
0158: public static final String GENERATETRANSACTIONS = "GenerateTransactions"; // NOI18N
0159: public static final String ATTRIBUTESASPROPERTIES = "AttributesAsProperties"; // NOI18N
0160: public static final String GENERATEDELEGATOR = "GenerateDelegator"; // NOI18N
0161: public static final String DELEGATEDIR = "DelegateDir"; // NOI18N
0162: public static final String DELEGATEPACKAGE = "DelegatePackage"; // NOI18N
0163: public static final String GENERATECOMMONINTERFACE = "GenerateCommonInterface"; // NOI18N
0164: public static final String DEFAULTSACCESSABLE = "DefaultsAccessable"; // NOI18N
0165: public static final String USEINTERFACES = "UseInterfaces"; // NOI18N
0166: public static final String GENERATEINTERFACES = "GenerateInterfaces"; // NOI18N
0167: public static final String KEEPELEMENTPOSITIONS = "KeepElementPositions"; // NOI18N
0168: public static final String REMOVEUNREFERENCEDNODES = "RemoveUnreferencedNodes"; // NOI18N
0169: public static final String INPUTURI = "InputURI"; // NOI18N
0170: public static final String INDEXEDPROPERTYTYPE = "IndexedPropertyType"; // NOI18N
0171: public static final String DOCOMPILE = "DoCompile"; // NOI18N
0172: public static final String GENERATESWITCHES = "GenerateSwitches"; // NOI18N
0173: public static final String DUMPBEANTREE = "DumpBeanTree"; // NOI18N
0174: public static final String GENERATEDOTGRAPH = "GenerateDotGraph"; // NOI18N
0175: public static final String PROCESSCOMMENTS = "ProcessComments"; // NOI18N
0176: public static final String PROCESSDOCTYPE = "ProcessDocType"; // NOI18N
0177: public static final String CHECKUPTODATE = "CheckUpToDate"; // NOI18N
0178: public static final String GENERATEPARENTREFS = "GenerateParentRefs"; // NOI18N
0179: public static final String GENERATEHASCHANGED = "GenerateHasChanged"; // NOI18N
0180: public static final String NEWESTSOURCETIME = "NewestSourceTime"; // NOI18N
0181: public static final String WRITEBEANGRAPHFILE = "WriteBeanGraphFile"; // NOI18N
0182: public static final String READBEANGRAPHFILES = "ReadBeanGraphFiles"; // NOI18N
0183: public static final String READBEANGRAPHS = "ReadBeanGraphs"; // NOI18N
0184: public static final String MINFEATURES = "MinFeatures"; // NOI18N
0185: public static final String FORME = "ForME"; // NOI18N
0186: public static final String GENERATETAGSFILE = "GenerateTagsFile"; // NOI18N
0187: public static final String CODEGENERATORFACTORY = "CodeGeneratorFactory"; // NOI18N
0188: public static final String GENERATETIMESTAMP = "GenerateTimeStamp"; // NOI18N
0189: public static final String QUIET = "Quiet"; // NOI18N
0190: public static final String WRITECONFIG = "WriteConfig"; // NOI18N
0191: public static final String READCONFIG = "ReadConfig"; // NOI18N
0192: public static final String MAKEDEFAULTS = "MakeDefaults"; // NOI18N
0193: public static final String SETDEFAULTS = "SetDefaults"; // NOI18N
0194: public static final String TRIMNONSTRINGS = "TrimNonStrings"; // NOI18N
0195: public static final String USERUNTIME = "UseRuntime"; // NOI18N
0196: public static final String EXTENDBASEBEAN = "ExtendBaseBean"; // NOI18N
0197: public static final String FINDER = "Finder"; // NOI18N
0198: public static final String TARGET = "Target"; // NOI18N
0199: public static final String STAXPRODUCEXMLEVENTREADER = "StaxProduceXMLEventReader"; // NOI18N
0200: public static final String STAXUSEXMLEVENTREADER = "StaxUseXMLEventReader"; // NOI18N
0201: public static final String OPTIONALSCALARS = "OptionalScalars"; // NOI18N
0202: public static final String DEFAULTELEMENTTYPE = "DefaultElementType"; // NOI18N
0203: public static final String RESPECTEXTENSION = "RespectExtension"; // NOI18N
0204: public static final String LOGSUSPICIOUS = "LogSuspicious"; // NOI18N
0205:
0206: private java.lang.String _SchemaType = "xmlschema";
0207: private boolean _TraceParse;
0208: private boolean _isSet_TraceParse = false;
0209: private boolean _TraceGen;
0210: private boolean _isSet_TraceGen = false;
0211: private boolean _TraceMisc;
0212: private boolean _isSet_TraceMisc = false;
0213: private boolean _TraceDot;
0214: private boolean _isSet_TraceDot = false;
0215: private java.io.File _Filename;
0216: private java.io.InputStream _FileIn;
0217: private java.lang.String _DocRoot;
0218: private java.io.File _RootDir = new java.io.File(".");
0219: private java.lang.String _PackagePath;
0220: private java.lang.String _Indent = "\t";
0221: private int _IndentAmount;
0222: private boolean _isSet_IndentAmount = false;
0223: private java.io.File _MddFile;
0224: private java.io.InputStream _MddIn;
0225: private org.netbeans.modules.schema2beansdev.metadd.MetaDD _MetaDD;
0226: private boolean _DoGeneration = true;
0227: private boolean _isSet_DoGeneration = true;
0228: private boolean _ScalarException = true;
0229: private boolean _isSet_ScalarException = true;
0230: private boolean _DumpToString;
0231: private boolean _isSet_DumpToString = false;
0232: private boolean _Vetoable;
0233: private boolean _isSet_Vetoable = false;
0234: private boolean _Standalone;
0235: private boolean _isSet_Standalone = false;
0236: private boolean _Auto;
0237: private boolean _isSet_Auto = false;
0238: private java.io.PrintStream _MessageOut;
0239: private org.netbeans.modules.schema2beansdev.GenBeans.OutputStreamProvider _OutputStreamProvider;
0240: private boolean _ThrowErrors;
0241: private boolean _isSet_ThrowErrors = false;
0242: private boolean _GenerateXMLIO = true;
0243: private boolean _isSet_GenerateXMLIO = true;
0244: private boolean _GenerateValidate;
0245: private boolean _isSet_GenerateValidate = false;
0246: private boolean _GeneratePropertyEvents;
0247: private boolean _isSet_GeneratePropertyEvents = false;
0248: private boolean _GenerateStoreEvents;
0249: private boolean _isSet_GenerateStoreEvents = false;
0250: private boolean _GenerateTransactions;
0251: private boolean _isSet_GenerateTransactions = false;
0252: private boolean _AttributesAsProperties;
0253: private boolean _isSet_AttributesAsProperties = false;
0254: private boolean _GenerateDelegator;
0255: private boolean _isSet_GenerateDelegator = false;
0256: private java.io.File _DelegateDir;
0257: private java.lang.String _DelegatePackage;
0258: private java.lang.String _GenerateCommonInterface;
0259: private boolean _DefaultsAccessable;
0260: private boolean _isSet_DefaultsAccessable = false;
0261: private boolean _UseInterfaces;
0262: private boolean _isSet_UseInterfaces = false;
0263: private boolean _GenerateInterfaces;
0264: private boolean _isSet_GenerateInterfaces = false;
0265: private boolean _KeepElementPositions;
0266: private boolean _isSet_KeepElementPositions = false;
0267: private boolean _RemoveUnreferencedNodes;
0268: private boolean _isSet_RemoveUnreferencedNodes = false;
0269: private java.lang.String _InputURI;
0270: private java.lang.String _IndexedPropertyType = "java.util.ArrayList";
0271: private boolean _DoCompile;
0272: private boolean _isSet_DoCompile = false;
0273: private boolean _GenerateSwitches;
0274: private boolean _isSet_GenerateSwitches = false;
0275: private java.io.File _DumpBeanTree;
0276: private java.io.File _GenerateDotGraph;
0277: private boolean _ProcessComments;
0278: private boolean _isSet_ProcessComments = false;
0279: private boolean _ProcessDocType;
0280: private boolean _isSet_ProcessDocType = false;
0281: private boolean _CheckUpToDate;
0282: private boolean _isSet_CheckUpToDate = false;
0283: private boolean _GenerateParentRefs;
0284: private boolean _isSet_GenerateParentRefs = false;
0285: private boolean _GenerateHasChanged;
0286: private boolean _isSet_GenerateHasChanged = false;
0287: private long _NewestSourceTime;
0288: private boolean _isSet_NewestSourceTime = false;
0289: private java.io.File _WriteBeanGraphFile;
0290: private java.util.List _ReadBeanGraphFiles = new java.util.ArrayList(); // List<java.io.File>
0291: private java.util.List _ReadBeanGraphs = new java.util.ArrayList(); // List<org.netbeans.modules.schema2beansdev.beangraph.BeanGraph>
0292: private boolean _MinFeatures;
0293: private boolean _isSet_MinFeatures = false;
0294: private boolean _ForME;
0295: private boolean _isSet_ForME = false;
0296: private boolean _GenerateTagsFile;
0297: private boolean _isSet_GenerateTagsFile = false;
0298: private org.netbeans.modules.schema2beansdev.CodeGeneratorFactory _CodeGeneratorFactory;
0299: private boolean _GenerateTimeStamp = true;
0300: private boolean _isSet_GenerateTimeStamp = true;
0301: private boolean _Quiet;
0302: private boolean _isSet_Quiet = false;
0303: private java.io.File _WriteConfig;
0304: private java.util.List _ReadConfig = new java.util.ArrayList(); // List<java.io.File>
0305: private boolean _MakeDefaults = true;
0306: private boolean _isSet_MakeDefaults = true;
0307: private boolean _SetDefaults;
0308: private boolean _isSet_SetDefaults = false;
0309: private boolean _TrimNonStrings;
0310: private boolean _isSet_TrimNonStrings = false;
0311: private boolean _UseRuntime;
0312: private boolean _isSet_UseRuntime = false;
0313: private boolean _ExtendBaseBean;
0314: private boolean _isSet_ExtendBaseBean = false;
0315: private java.util.List _Finder = new java.util.ArrayList(); // List<java.lang.String>
0316: private java.lang.String _Target;
0317: private boolean _StaxProduceXMLEventReader;
0318: private boolean _isSet_StaxProduceXMLEventReader = false;
0319: private boolean _StaxUseXMLEventReader;
0320: private boolean _isSet_StaxUseXMLEventReader = false;
0321: private boolean _OptionalScalars;
0322: private boolean _isSet_OptionalScalars = false;
0323: private java.lang.String _DefaultElementType;
0324: private boolean _RespectExtension;
0325: private boolean _isSet_RespectExtension = false;
0326: private boolean _LogSuspicious;
0327: private boolean _isSet_LogSuspicious = false;
0328: private java.lang.String schemaLocation;
0329:
0330: /**
0331: * Normal starting point constructor.
0332: */
0333: public S2bConfig() {
0334: }
0335:
0336: /**
0337: * Required parameters constructor
0338: */
0339: public S2bConfig(java.lang.String schemaType, java.io.File rootDir,
0340: java.lang.String indent, boolean doGeneration,
0341: boolean scalarException, boolean generateXMLIO,
0342: java.lang.String indexedPropertyType,
0343: boolean generateTimeStamp, boolean quiet,
0344: boolean makeDefaults) {
0345: _SchemaType = schemaType;
0346: _RootDir = rootDir;
0347: _Indent = indent;
0348: _DoGeneration = doGeneration;
0349: _isSet_DoGeneration = true;
0350: _ScalarException = scalarException;
0351: _isSet_ScalarException = true;
0352: _GenerateXMLIO = generateXMLIO;
0353: _isSet_GenerateXMLIO = true;
0354: _IndexedPropertyType = indexedPropertyType;
0355: _GenerateTimeStamp = generateTimeStamp;
0356: _isSet_GenerateTimeStamp = true;
0357: _Quiet = quiet;
0358: _isSet_Quiet = true;
0359: _MakeDefaults = makeDefaults;
0360: _isSet_MakeDefaults = true;
0361: }
0362:
0363: /**
0364: * Deep copy
0365: */
0366: public S2bConfig(
0367: org.netbeans.modules.schema2beansdev.S2bConfig source) {
0368: this (source, false);
0369: }
0370:
0371: /**
0372: * Deep copy
0373: * @param justData just copy the XML relevant data
0374: */
0375: public S2bConfig(
0376: org.netbeans.modules.schema2beansdev.S2bConfig source,
0377: boolean justData) {
0378: _SchemaType = source._SchemaType;
0379: _TraceParse = source._TraceParse;
0380: _isSet_TraceParse = source._isSet_TraceParse;
0381: _TraceGen = source._TraceGen;
0382: _isSet_TraceGen = source._isSet_TraceGen;
0383: _TraceMisc = source._TraceMisc;
0384: _isSet_TraceMisc = source._isSet_TraceMisc;
0385: _TraceDot = source._TraceDot;
0386: _isSet_TraceDot = source._isSet_TraceDot;
0387: _Filename = (source._Filename == null) ? null
0388: : new java.io.File(source._Filename.getAbsolutePath());
0389: _FileIn = source._FileIn;
0390: _DocRoot = source._DocRoot;
0391: _RootDir = (source._RootDir == null) ? null : new java.io.File(
0392: source._RootDir.getAbsolutePath());
0393: _PackagePath = source._PackagePath;
0394: _Indent = source._Indent;
0395: _IndentAmount = source._IndentAmount;
0396: _isSet_IndentAmount = source._isSet_IndentAmount;
0397: _MddFile = (source._MddFile == null) ? null : new java.io.File(
0398: source._MddFile.getAbsolutePath());
0399: _MddIn = source._MddIn;
0400: _MetaDD = (source._MetaDD == null) ? null
0401: : new org.netbeans.modules.schema2beansdev.metadd.MetaDD(
0402: source._MetaDD);
0403: _DoGeneration = source._DoGeneration;
0404: _isSet_DoGeneration = source._isSet_DoGeneration;
0405: _ScalarException = source._ScalarException;
0406: _isSet_ScalarException = source._isSet_ScalarException;
0407: _DumpToString = source._DumpToString;
0408: _isSet_DumpToString = source._isSet_DumpToString;
0409: _Vetoable = source._Vetoable;
0410: _isSet_Vetoable = source._isSet_Vetoable;
0411: _Standalone = source._Standalone;
0412: _isSet_Standalone = source._isSet_Standalone;
0413: _Auto = source._Auto;
0414: _isSet_Auto = source._isSet_Auto;
0415: _MessageOut = (source._MessageOut == null) ? null
0416: : new java.io.PrintStream(source._MessageOut);
0417: _OutputStreamProvider = source._OutputStreamProvider;
0418: _ThrowErrors = source._ThrowErrors;
0419: _isSet_ThrowErrors = source._isSet_ThrowErrors;
0420: _GenerateXMLIO = source._GenerateXMLIO;
0421: _isSet_GenerateXMLIO = source._isSet_GenerateXMLIO;
0422: _GenerateValidate = source._GenerateValidate;
0423: _isSet_GenerateValidate = source._isSet_GenerateValidate;
0424: _GeneratePropertyEvents = source._GeneratePropertyEvents;
0425: _isSet_GeneratePropertyEvents = source._isSet_GeneratePropertyEvents;
0426: _GenerateStoreEvents = source._GenerateStoreEvents;
0427: _isSet_GenerateStoreEvents = source._isSet_GenerateStoreEvents;
0428: _GenerateTransactions = source._GenerateTransactions;
0429: _isSet_GenerateTransactions = source._isSet_GenerateTransactions;
0430: _AttributesAsProperties = source._AttributesAsProperties;
0431: _isSet_AttributesAsProperties = source._isSet_AttributesAsProperties;
0432: _GenerateDelegator = source._GenerateDelegator;
0433: _isSet_GenerateDelegator = source._isSet_GenerateDelegator;
0434: _DelegateDir = (source._DelegateDir == null) ? null
0435: : new java.io.File(source._DelegateDir
0436: .getAbsolutePath());
0437: _DelegatePackage = source._DelegatePackage;
0438: _GenerateCommonInterface = source._GenerateCommonInterface;
0439: _DefaultsAccessable = source._DefaultsAccessable;
0440: _isSet_DefaultsAccessable = source._isSet_DefaultsAccessable;
0441: _UseInterfaces = source._UseInterfaces;
0442: _isSet_UseInterfaces = source._isSet_UseInterfaces;
0443: _GenerateInterfaces = source._GenerateInterfaces;
0444: _isSet_GenerateInterfaces = source._isSet_GenerateInterfaces;
0445: _KeepElementPositions = source._KeepElementPositions;
0446: _isSet_KeepElementPositions = source._isSet_KeepElementPositions;
0447: _RemoveUnreferencedNodes = source._RemoveUnreferencedNodes;
0448: _isSet_RemoveUnreferencedNodes = source._isSet_RemoveUnreferencedNodes;
0449: _InputURI = source._InputURI;
0450: _IndexedPropertyType = source._IndexedPropertyType;
0451: _DoCompile = source._DoCompile;
0452: _isSet_DoCompile = source._isSet_DoCompile;
0453: _GenerateSwitches = source._GenerateSwitches;
0454: _isSet_GenerateSwitches = source._isSet_GenerateSwitches;
0455: _DumpBeanTree = (source._DumpBeanTree == null) ? null
0456: : new java.io.File(source._DumpBeanTree
0457: .getAbsolutePath());
0458: _GenerateDotGraph = (source._GenerateDotGraph == null) ? null
0459: : new java.io.File(source._GenerateDotGraph
0460: .getAbsolutePath());
0461: _ProcessComments = source._ProcessComments;
0462: _isSet_ProcessComments = source._isSet_ProcessComments;
0463: _ProcessDocType = source._ProcessDocType;
0464: _isSet_ProcessDocType = source._isSet_ProcessDocType;
0465: _CheckUpToDate = source._CheckUpToDate;
0466: _isSet_CheckUpToDate = source._isSet_CheckUpToDate;
0467: _GenerateParentRefs = source._GenerateParentRefs;
0468: _isSet_GenerateParentRefs = source._isSet_GenerateParentRefs;
0469: _GenerateHasChanged = source._GenerateHasChanged;
0470: _isSet_GenerateHasChanged = source._isSet_GenerateHasChanged;
0471: _NewestSourceTime = source._NewestSourceTime;
0472: _isSet_NewestSourceTime = source._isSet_NewestSourceTime;
0473: _WriteBeanGraphFile = (source._WriteBeanGraphFile == null) ? null
0474: : new java.io.File(source._WriteBeanGraphFile
0475: .getAbsolutePath());
0476: for (java.util.Iterator it = source._ReadBeanGraphFiles
0477: .iterator(); it.hasNext();) {
0478: java.io.File srcElement = (java.io.File) it.next();
0479: _ReadBeanGraphFiles.add((srcElement == null) ? null
0480: : new java.io.File(srcElement.getAbsolutePath()));
0481: }
0482: for (java.util.Iterator it = source._ReadBeanGraphs.iterator(); it
0483: .hasNext();) {
0484: org.netbeans.modules.schema2beansdev.beangraph.BeanGraph srcElement = (org.netbeans.modules.schema2beansdev.beangraph.BeanGraph) it
0485: .next();
0486: _ReadBeanGraphs
0487: .add((srcElement == null) ? null
0488: : new org.netbeans.modules.schema2beansdev.beangraph.BeanGraph(
0489: srcElement));
0490: }
0491: _MinFeatures = source._MinFeatures;
0492: _isSet_MinFeatures = source._isSet_MinFeatures;
0493: _ForME = source._ForME;
0494: _isSet_ForME = source._isSet_ForME;
0495: _GenerateTagsFile = source._GenerateTagsFile;
0496: _isSet_GenerateTagsFile = source._isSet_GenerateTagsFile;
0497: _CodeGeneratorFactory = source._CodeGeneratorFactory;
0498: _GenerateTimeStamp = source._GenerateTimeStamp;
0499: _isSet_GenerateTimeStamp = source._isSet_GenerateTimeStamp;
0500: _Quiet = source._Quiet;
0501: _isSet_Quiet = source._isSet_Quiet;
0502: _WriteConfig = (source._WriteConfig == null) ? null
0503: : new java.io.File(source._WriteConfig
0504: .getAbsolutePath());
0505: for (java.util.Iterator it = source._ReadConfig.iterator(); it
0506: .hasNext();) {
0507: java.io.File srcElement = (java.io.File) it.next();
0508: _ReadConfig.add((srcElement == null) ? null
0509: : new java.io.File(srcElement.getAbsolutePath()));
0510: }
0511: _MakeDefaults = source._MakeDefaults;
0512: _isSet_MakeDefaults = source._isSet_MakeDefaults;
0513: _SetDefaults = source._SetDefaults;
0514: _isSet_SetDefaults = source._isSet_SetDefaults;
0515: _TrimNonStrings = source._TrimNonStrings;
0516: _isSet_TrimNonStrings = source._isSet_TrimNonStrings;
0517: _UseRuntime = source._UseRuntime;
0518: _isSet_UseRuntime = source._isSet_UseRuntime;
0519: _ExtendBaseBean = source._ExtendBaseBean;
0520: _isSet_ExtendBaseBean = source._isSet_ExtendBaseBean;
0521: for (java.util.Iterator it = source._Finder.iterator(); it
0522: .hasNext();) {
0523: java.lang.String srcElement = (java.lang.String) it.next();
0524: _Finder.add(srcElement);
0525: }
0526: _Target = source._Target;
0527: _StaxProduceXMLEventReader = source._StaxProduceXMLEventReader;
0528: _isSet_StaxProduceXMLEventReader = source._isSet_StaxProduceXMLEventReader;
0529: _StaxUseXMLEventReader = source._StaxUseXMLEventReader;
0530: _isSet_StaxUseXMLEventReader = source._isSet_StaxUseXMLEventReader;
0531: _OptionalScalars = source._OptionalScalars;
0532: _isSet_OptionalScalars = source._isSet_OptionalScalars;
0533: _DefaultElementType = source._DefaultElementType;
0534: _RespectExtension = source._RespectExtension;
0535: _isSet_RespectExtension = source._isSet_RespectExtension;
0536: _LogSuspicious = source._LogSuspicious;
0537: _isSet_LogSuspicious = source._isSet_LogSuspicious;
0538: schemaLocation = source.schemaLocation;
0539: }
0540:
0541: // This attribute is mandatory
0542: public void setSchemaType(java.lang.String value) {
0543: _SchemaType = value;
0544: }
0545:
0546: public java.lang.String getSchemaType() {
0547: return _SchemaType;
0548: }
0549:
0550: // This attribute is optional
0551: public void setTraceParse(boolean value) {
0552: _TraceParse = value;
0553: _isSet_TraceParse = true;
0554: }
0555:
0556: public boolean isTraceParse() {
0557: return _TraceParse;
0558: }
0559:
0560: // This attribute is optional
0561: public void setTraceGen(boolean value) {
0562: _TraceGen = value;
0563: _isSet_TraceGen = true;
0564: }
0565:
0566: public boolean isTraceGen() {
0567: return _TraceGen;
0568: }
0569:
0570: // This attribute is optional
0571: public void setTraceMisc(boolean value) {
0572: _TraceMisc = value;
0573: _isSet_TraceMisc = true;
0574: }
0575:
0576: public boolean isTraceMisc() {
0577: return _TraceMisc;
0578: }
0579:
0580: // This attribute is optional
0581: public void setTraceDot(boolean value) {
0582: _TraceDot = value;
0583: _isSet_TraceDot = true;
0584: }
0585:
0586: public boolean isTraceDot() {
0587: return _TraceDot;
0588: }
0589:
0590: // This attribute is optional
0591: public void setFilename(java.io.File value) {
0592: _Filename = value;
0593: }
0594:
0595: public java.io.File getFilename() {
0596: return _Filename;
0597: }
0598:
0599: // This attribute is optional
0600: public void setFileIn(java.io.InputStream value) {
0601: _FileIn = value;
0602: }
0603:
0604: public java.io.InputStream getFileIn() {
0605: return _FileIn;
0606: }
0607:
0608: // This attribute is optional
0609: public void setDocRoot(java.lang.String value) {
0610: _DocRoot = value;
0611: }
0612:
0613: public java.lang.String getDocRoot() {
0614: return _DocRoot;
0615: }
0616:
0617: // This attribute is mandatory
0618: public void setRootDir(java.io.File value) {
0619: _RootDir = value;
0620: }
0621:
0622: public java.io.File getRootDir() {
0623: return _RootDir;
0624: }
0625:
0626: // This attribute is optional
0627: public void setPackagePath(java.lang.String value) {
0628: _PackagePath = value;
0629: }
0630:
0631: public java.lang.String getPackagePath() {
0632: return _PackagePath;
0633: }
0634:
0635: // This attribute is mandatory
0636: public void setIndent(java.lang.String value) {
0637: _Indent = value;
0638: }
0639:
0640: public java.lang.String getIndent() {
0641: return _Indent;
0642: }
0643:
0644: // This attribute is optional
0645: public void setIndentAmount(int value) {
0646: _IndentAmount = value;
0647: _isSet_IndentAmount = true;
0648: }
0649:
0650: public int getIndentAmount() {
0651: return _IndentAmount;
0652: }
0653:
0654: // This attribute is optional
0655: public void setMddFile(java.io.File value) {
0656: _MddFile = value;
0657: }
0658:
0659: public java.io.File getMddFile() {
0660: return _MddFile;
0661: }
0662:
0663: // This attribute is optional
0664: public void setMddIn(java.io.InputStream value) {
0665: _MddIn = value;
0666: }
0667:
0668: public java.io.InputStream getMddIn() {
0669: return _MddIn;
0670: }
0671:
0672: // This attribute is optional
0673: public void setMetaDD(
0674: org.netbeans.modules.schema2beansdev.metadd.MetaDD value) {
0675: _MetaDD = value;
0676: }
0677:
0678: public org.netbeans.modules.schema2beansdev.metadd.MetaDD getMetaDD() {
0679: return _MetaDD;
0680: }
0681:
0682: // This attribute is mandatory
0683: public void setDoGeneration(boolean value) {
0684: _DoGeneration = value;
0685: _isSet_DoGeneration = true;
0686: }
0687:
0688: public boolean isDoGeneration() {
0689: return _DoGeneration;
0690: }
0691:
0692: // This attribute is mandatory
0693: public void setScalarException(boolean value) {
0694: _ScalarException = value;
0695: _isSet_ScalarException = true;
0696: }
0697:
0698: public boolean isScalarException() {
0699: return _ScalarException;
0700: }
0701:
0702: // This attribute is optional
0703: public void setDumpToString(boolean value) {
0704: _DumpToString = value;
0705: _isSet_DumpToString = true;
0706: }
0707:
0708: public boolean isDumpToString() {
0709: return _DumpToString;
0710: }
0711:
0712: // This attribute is optional
0713: public void setVetoable(boolean value) {
0714: _Vetoable = value;
0715: _isSet_Vetoable = true;
0716: }
0717:
0718: public boolean isVetoable() {
0719: return _Vetoable;
0720: }
0721:
0722: // This attribute is optional
0723: public void setStandalone(boolean value) {
0724: _Standalone = value;
0725: _isSet_Standalone = true;
0726: }
0727:
0728: public boolean isStandalone() {
0729: return _Standalone;
0730: }
0731:
0732: // This attribute is optional
0733: public void setAuto(boolean value) {
0734: _Auto = value;
0735: _isSet_Auto = true;
0736: }
0737:
0738: public boolean isAuto() {
0739: return _Auto;
0740: }
0741:
0742: // This attribute is optional
0743: public void setMessageOut(java.io.PrintStream value) {
0744: _MessageOut = value;
0745: }
0746:
0747: public java.io.PrintStream getMessageOut() {
0748: return _MessageOut;
0749: }
0750:
0751: // This attribute is optional
0752: public void setOutputStreamProvider(
0753: org.netbeans.modules.schema2beansdev.GenBeans.OutputStreamProvider value) {
0754: _OutputStreamProvider = value;
0755: }
0756:
0757: public org.netbeans.modules.schema2beansdev.GenBeans.OutputStreamProvider getOutputStreamProvider() {
0758: return _OutputStreamProvider;
0759: }
0760:
0761: // This attribute is optional
0762: public void setThrowErrors(boolean value) {
0763: _ThrowErrors = value;
0764: _isSet_ThrowErrors = true;
0765: }
0766:
0767: public boolean isThrowErrors() {
0768: return _ThrowErrors;
0769: }
0770:
0771: // This attribute is mandatory
0772: public void setGenerateXMLIO(boolean value) {
0773: _GenerateXMLIO = value;
0774: _isSet_GenerateXMLIO = true;
0775: }
0776:
0777: public boolean isGenerateXMLIO() {
0778: return _GenerateXMLIO;
0779: }
0780:
0781: // This attribute is optional
0782: public void setGenerateValidate(boolean value) {
0783: _GenerateValidate = value;
0784: _isSet_GenerateValidate = true;
0785: }
0786:
0787: public boolean isGenerateValidate() {
0788: return _GenerateValidate;
0789: }
0790:
0791: // This attribute is optional
0792: public void setGeneratePropertyEvents(boolean value) {
0793: _GeneratePropertyEvents = value;
0794: _isSet_GeneratePropertyEvents = true;
0795: }
0796:
0797: public boolean isGeneratePropertyEvents() {
0798: return _GeneratePropertyEvents;
0799: }
0800:
0801: // This attribute is optional
0802: public void setGenerateStoreEvents(boolean value) {
0803: _GenerateStoreEvents = value;
0804: _isSet_GenerateStoreEvents = true;
0805: }
0806:
0807: public boolean isGenerateStoreEvents() {
0808: return _GenerateStoreEvents;
0809: }
0810:
0811: // This attribute is optional
0812: public void setGenerateTransactions(boolean value) {
0813: _GenerateTransactions = value;
0814: _isSet_GenerateTransactions = true;
0815: }
0816:
0817: public boolean isGenerateTransactions() {
0818: return _GenerateTransactions;
0819: }
0820:
0821: // This attribute is optional
0822: public void setAttributesAsProperties(boolean value) {
0823: _AttributesAsProperties = value;
0824: _isSet_AttributesAsProperties = true;
0825: }
0826:
0827: public boolean isAttributesAsProperties() {
0828: return _AttributesAsProperties;
0829: }
0830:
0831: // This attribute is optional
0832: public void setGenerateDelegator(boolean value) {
0833: _GenerateDelegator = value;
0834: _isSet_GenerateDelegator = true;
0835: }
0836:
0837: public boolean isGenerateDelegator() {
0838: return _GenerateDelegator;
0839: }
0840:
0841: // This attribute is optional
0842: public void setDelegateDir(java.io.File value) {
0843: _DelegateDir = value;
0844: }
0845:
0846: public java.io.File getDelegateDir() {
0847: return _DelegateDir;
0848: }
0849:
0850: // This attribute is optional
0851: public void setDelegatePackage(java.lang.String value) {
0852: _DelegatePackage = value;
0853: }
0854:
0855: public java.lang.String getDelegatePackage() {
0856: return _DelegatePackage;
0857: }
0858:
0859: // This attribute is optional
0860: public void setGenerateCommonInterface(java.lang.String value) {
0861: _GenerateCommonInterface = value;
0862: }
0863:
0864: public java.lang.String getGenerateCommonInterface() {
0865: return _GenerateCommonInterface;
0866: }
0867:
0868: // This attribute is optional
0869: public void setDefaultsAccessable(boolean value) {
0870: _DefaultsAccessable = value;
0871: _isSet_DefaultsAccessable = true;
0872: }
0873:
0874: public boolean isDefaultsAccessable() {
0875: return _DefaultsAccessable;
0876: }
0877:
0878: // This attribute is optional
0879: public void setUseInterfaces(boolean value) {
0880: _UseInterfaces = value;
0881: _isSet_UseInterfaces = true;
0882: }
0883:
0884: public boolean isUseInterfaces() {
0885: return _UseInterfaces;
0886: }
0887:
0888: // This attribute is optional
0889: public void setGenerateInterfaces(boolean value) {
0890: _GenerateInterfaces = value;
0891: _isSet_GenerateInterfaces = true;
0892: }
0893:
0894: public boolean isGenerateInterfaces() {
0895: return _GenerateInterfaces;
0896: }
0897:
0898: // This attribute is optional
0899: public void setKeepElementPositions(boolean value) {
0900: _KeepElementPositions = value;
0901: _isSet_KeepElementPositions = true;
0902: }
0903:
0904: public boolean isKeepElementPositions() {
0905: return _KeepElementPositions;
0906: }
0907:
0908: // This attribute is optional
0909: public void setRemoveUnreferencedNodes(boolean value) {
0910: _RemoveUnreferencedNodes = value;
0911: _isSet_RemoveUnreferencedNodes = true;
0912: }
0913:
0914: public boolean isRemoveUnreferencedNodes() {
0915: return _RemoveUnreferencedNodes;
0916: }
0917:
0918: // This attribute is optional
0919: public void setInputURI(java.lang.String value) {
0920: _InputURI = value;
0921: }
0922:
0923: public java.lang.String getInputURI() {
0924: return _InputURI;
0925: }
0926:
0927: // This attribute is mandatory
0928: public void setIndexedPropertyType(java.lang.String value) {
0929: _IndexedPropertyType = value;
0930: }
0931:
0932: public java.lang.String getIndexedPropertyType() {
0933: return _IndexedPropertyType;
0934: }
0935:
0936: // This attribute is optional
0937: public void setDoCompile(boolean value) {
0938: _DoCompile = value;
0939: _isSet_DoCompile = true;
0940: }
0941:
0942: public boolean isDoCompile() {
0943: return _DoCompile;
0944: }
0945:
0946: // This attribute is optional
0947: public void setGenerateSwitches(boolean value) {
0948: _GenerateSwitches = value;
0949: _isSet_GenerateSwitches = true;
0950: }
0951:
0952: public boolean isGenerateSwitches() {
0953: return _GenerateSwitches;
0954: }
0955:
0956: // This attribute is optional
0957: public void setDumpBeanTree(java.io.File value) {
0958: _DumpBeanTree = value;
0959: }
0960:
0961: public java.io.File getDumpBeanTree() {
0962: return _DumpBeanTree;
0963: }
0964:
0965: // This attribute is optional
0966: public void setGenerateDotGraph(java.io.File value) {
0967: _GenerateDotGraph = value;
0968: }
0969:
0970: public java.io.File getGenerateDotGraph() {
0971: return _GenerateDotGraph;
0972: }
0973:
0974: // This attribute is optional
0975: public void setProcessComments(boolean value) {
0976: _ProcessComments = value;
0977: _isSet_ProcessComments = true;
0978: }
0979:
0980: public boolean isProcessComments() {
0981: return _ProcessComments;
0982: }
0983:
0984: // This attribute is optional
0985: public void setProcessDocType(boolean value) {
0986: _ProcessDocType = value;
0987: _isSet_ProcessDocType = true;
0988: }
0989:
0990: public boolean isProcessDocType() {
0991: return _ProcessDocType;
0992: }
0993:
0994: // This attribute is optional
0995: public void setCheckUpToDate(boolean value) {
0996: _CheckUpToDate = value;
0997: _isSet_CheckUpToDate = true;
0998: }
0999:
1000: public boolean isCheckUpToDate() {
1001: return _CheckUpToDate;
1002: }
1003:
1004: // This attribute is optional
1005: public void setGenerateParentRefs(boolean value) {
1006: _GenerateParentRefs = value;
1007: _isSet_GenerateParentRefs = true;
1008: }
1009:
1010: public boolean isGenerateParentRefs() {
1011: return _GenerateParentRefs;
1012: }
1013:
1014: // This attribute is optional
1015: public void setGenerateHasChanged(boolean value) {
1016: _GenerateHasChanged = value;
1017: _isSet_GenerateHasChanged = true;
1018: }
1019:
1020: public boolean isGenerateHasChanged() {
1021: return _GenerateHasChanged;
1022: }
1023:
1024: // This attribute is optional
1025: public void setNewestSourceTime(long value) {
1026: _NewestSourceTime = value;
1027: _isSet_NewestSourceTime = true;
1028: }
1029:
1030: public long getNewestSourceTime() {
1031: return _NewestSourceTime;
1032: }
1033:
1034: // This attribute is optional
1035: public void setWriteBeanGraphFile(java.io.File value) {
1036: _WriteBeanGraphFile = value;
1037: }
1038:
1039: public java.io.File getWriteBeanGraphFile() {
1040: return _WriteBeanGraphFile;
1041: }
1042:
1043: // This attribute is an array, possibly empty
1044: public void setReadBeanGraphFiles(java.io.File[] value) {
1045: if (value == null)
1046: value = new java.io.File[0];
1047: _ReadBeanGraphFiles.clear();
1048: ((java.util.ArrayList) _ReadBeanGraphFiles)
1049: .ensureCapacity(value.length);
1050: for (int i = 0; i < value.length; ++i) {
1051: _ReadBeanGraphFiles.add(value[i]);
1052: }
1053: }
1054:
1055: public void setReadBeanGraphFiles(int index, java.io.File value) {
1056: _ReadBeanGraphFiles.set(index, value);
1057: }
1058:
1059: public java.io.File[] getReadBeanGraphFiles() {
1060: java.io.File[] arr = new java.io.File[_ReadBeanGraphFiles
1061: .size()];
1062: return (java.io.File[]) _ReadBeanGraphFiles.toArray(arr);
1063: }
1064:
1065: public java.util.List fetchReadBeanGraphFilesList() {
1066: return _ReadBeanGraphFiles;
1067: }
1068:
1069: public java.io.File getReadBeanGraphFiles(int index) {
1070: return (java.io.File) _ReadBeanGraphFiles.get(index);
1071: }
1072:
1073: // Return the number of readBeanGraphFiles
1074: public int sizeReadBeanGraphFiles() {
1075: return _ReadBeanGraphFiles.size();
1076: }
1077:
1078: public int addReadBeanGraphFiles(java.io.File value) {
1079: _ReadBeanGraphFiles.add(value);
1080: int positionOfNewItem = _ReadBeanGraphFiles.size() - 1;
1081: return positionOfNewItem;
1082: }
1083:
1084: /**
1085: * Search from the end looking for @param value, and then remove it.
1086: */
1087: public int removeReadBeanGraphFiles(java.io.File value) {
1088: int pos = _ReadBeanGraphFiles.indexOf(value);
1089: if (pos >= 0) {
1090: _ReadBeanGraphFiles.remove(pos);
1091: }
1092: return pos;
1093: }
1094:
1095: // This attribute is an array, possibly empty
1096: public void setReadBeanGraphs(
1097: org.netbeans.modules.schema2beansdev.beangraph.BeanGraph[] value) {
1098: if (value == null)
1099: value = new org.netbeans.modules.schema2beansdev.beangraph.BeanGraph[0];
1100: _ReadBeanGraphs.clear();
1101: ((java.util.ArrayList) _ReadBeanGraphs)
1102: .ensureCapacity(value.length);
1103: for (int i = 0; i < value.length; ++i) {
1104: _ReadBeanGraphs.add(value[i]);
1105: }
1106: }
1107:
1108: public void setReadBeanGraphs(
1109: int index,
1110: org.netbeans.modules.schema2beansdev.beangraph.BeanGraph value) {
1111: _ReadBeanGraphs.set(index, value);
1112: }
1113:
1114: public org.netbeans.modules.schema2beansdev.beangraph.BeanGraph[] getReadBeanGraphs() {
1115: org.netbeans.modules.schema2beansdev.beangraph.BeanGraph[] arr = new org.netbeans.modules.schema2beansdev.beangraph.BeanGraph[_ReadBeanGraphs
1116: .size()];
1117: return (org.netbeans.modules.schema2beansdev.beangraph.BeanGraph[]) _ReadBeanGraphs
1118: .toArray(arr);
1119: }
1120:
1121: public java.util.List fetchReadBeanGraphsList() {
1122: return _ReadBeanGraphs;
1123: }
1124:
1125: public org.netbeans.modules.schema2beansdev.beangraph.BeanGraph getReadBeanGraphs(
1126: int index) {
1127: return (org.netbeans.modules.schema2beansdev.beangraph.BeanGraph) _ReadBeanGraphs
1128: .get(index);
1129: }
1130:
1131: // Return the number of readBeanGraphs
1132: public int sizeReadBeanGraphs() {
1133: return _ReadBeanGraphs.size();
1134: }
1135:
1136: public int addReadBeanGraphs(
1137: org.netbeans.modules.schema2beansdev.beangraph.BeanGraph value) {
1138: _ReadBeanGraphs.add(value);
1139: int positionOfNewItem = _ReadBeanGraphs.size() - 1;
1140: return positionOfNewItem;
1141: }
1142:
1143: /**
1144: * Search from the end looking for @param value, and then remove it.
1145: */
1146: public int removeReadBeanGraphs(
1147: org.netbeans.modules.schema2beansdev.beangraph.BeanGraph value) {
1148: int pos = _ReadBeanGraphs.indexOf(value);
1149: if (pos >= 0) {
1150: _ReadBeanGraphs.remove(pos);
1151: }
1152: return pos;
1153: }
1154:
1155: // This attribute is optional
1156: public void setMinFeatures(boolean value) {
1157: _MinFeatures = value;
1158: _isSet_MinFeatures = true;
1159: }
1160:
1161: public boolean isMinFeatures() {
1162: return _MinFeatures;
1163: }
1164:
1165: // This attribute is optional
1166: public void setForME(boolean value) {
1167: _ForME = value;
1168: _isSet_ForME = true;
1169: }
1170:
1171: public boolean isForME() {
1172: return _ForME;
1173: }
1174:
1175: // This attribute is optional
1176: public void setGenerateTagsFile(boolean value) {
1177: _GenerateTagsFile = value;
1178: _isSet_GenerateTagsFile = true;
1179: }
1180:
1181: public boolean isGenerateTagsFile() {
1182: return _GenerateTagsFile;
1183: }
1184:
1185: // This attribute is optional
1186: public void setCodeGeneratorFactory(
1187: org.netbeans.modules.schema2beansdev.CodeGeneratorFactory value) {
1188: _CodeGeneratorFactory = value;
1189: }
1190:
1191: public org.netbeans.modules.schema2beansdev.CodeGeneratorFactory getCodeGeneratorFactory() {
1192: return _CodeGeneratorFactory;
1193: }
1194:
1195: // This attribute is mandatory
1196: public void setGenerateTimeStamp(boolean value) {
1197: _GenerateTimeStamp = value;
1198: _isSet_GenerateTimeStamp = true;
1199: }
1200:
1201: public boolean isGenerateTimeStamp() {
1202: return _GenerateTimeStamp;
1203: }
1204:
1205: // This attribute is mandatory
1206: public void setQuiet(boolean value) {
1207: _Quiet = value;
1208: _isSet_Quiet = true;
1209: }
1210:
1211: public boolean isQuiet() {
1212: return _Quiet;
1213: }
1214:
1215: // This attribute is optional
1216: public void setWriteConfig(java.io.File value) {
1217: _WriteConfig = value;
1218: }
1219:
1220: public java.io.File getWriteConfig() {
1221: return _WriteConfig;
1222: }
1223:
1224: // This attribute is an array, possibly empty
1225: public void setReadConfig(java.io.File[] value) {
1226: if (value == null)
1227: value = new java.io.File[0];
1228: _ReadConfig.clear();
1229: ((java.util.ArrayList) _ReadConfig)
1230: .ensureCapacity(value.length);
1231: for (int i = 0; i < value.length; ++i) {
1232: _ReadConfig.add(value[i]);
1233: }
1234: }
1235:
1236: public void setReadConfig(int index, java.io.File value) {
1237: _ReadConfig.set(index, value);
1238: }
1239:
1240: public java.io.File[] getReadConfig() {
1241: java.io.File[] arr = new java.io.File[_ReadConfig.size()];
1242: return (java.io.File[]) _ReadConfig.toArray(arr);
1243: }
1244:
1245: public java.util.List fetchReadConfigList() {
1246: return _ReadConfig;
1247: }
1248:
1249: public java.io.File getReadConfig(int index) {
1250: return (java.io.File) _ReadConfig.get(index);
1251: }
1252:
1253: // Return the number of readConfig
1254: public int sizeReadConfig() {
1255: return _ReadConfig.size();
1256: }
1257:
1258: public int addReadConfig(java.io.File value) {
1259: _ReadConfig.add(value);
1260: int positionOfNewItem = _ReadConfig.size() - 1;
1261: return positionOfNewItem;
1262: }
1263:
1264: /**
1265: * Search from the end looking for @param value, and then remove it.
1266: */
1267: public int removeReadConfig(java.io.File value) {
1268: int pos = _ReadConfig.indexOf(value);
1269: if (pos >= 0) {
1270: _ReadConfig.remove(pos);
1271: }
1272: return pos;
1273: }
1274:
1275: // This attribute is mandatory
1276: public void setMakeDefaults(boolean value) {
1277: _MakeDefaults = value;
1278: _isSet_MakeDefaults = true;
1279: }
1280:
1281: public boolean isMakeDefaults() {
1282: return _MakeDefaults;
1283: }
1284:
1285: // This attribute is optional
1286: public void setSetDefaults(boolean value) {
1287: _SetDefaults = value;
1288: _isSet_SetDefaults = true;
1289: }
1290:
1291: public boolean isSetDefaults() {
1292: return _SetDefaults;
1293: }
1294:
1295: // This attribute is optional
1296: public void setTrimNonStrings(boolean value) {
1297: _TrimNonStrings = value;
1298: _isSet_TrimNonStrings = true;
1299: }
1300:
1301: public boolean isTrimNonStrings() {
1302: return _TrimNonStrings;
1303: }
1304:
1305: // This attribute is optional
1306: public void setUseRuntime(boolean value) {
1307: _UseRuntime = value;
1308: _isSet_UseRuntime = true;
1309: }
1310:
1311: public boolean isUseRuntime() {
1312: return _UseRuntime;
1313: }
1314:
1315: // This attribute is optional
1316: public void setExtendBaseBean(boolean value) {
1317: _ExtendBaseBean = value;
1318: _isSet_ExtendBaseBean = true;
1319: }
1320:
1321: public boolean isExtendBaseBean() {
1322: return _ExtendBaseBean;
1323: }
1324:
1325: // This attribute is an array, possibly empty
1326: public void setFinder(java.lang.String[] value) {
1327: if (value == null)
1328: value = new java.lang.String[0];
1329: _Finder.clear();
1330: ((java.util.ArrayList) _Finder).ensureCapacity(value.length);
1331: for (int i = 0; i < value.length; ++i) {
1332: _Finder.add(value[i]);
1333: }
1334: }
1335:
1336: public void setFinder(int index, java.lang.String value) {
1337: _Finder.set(index, value);
1338: }
1339:
1340: public java.lang.String[] getFinder() {
1341: java.lang.String[] arr = new java.lang.String[_Finder.size()];
1342: return (java.lang.String[]) _Finder.toArray(arr);
1343: }
1344:
1345: public java.util.List fetchFinderList() {
1346: return _Finder;
1347: }
1348:
1349: public java.lang.String getFinder(int index) {
1350: return (java.lang.String) _Finder.get(index);
1351: }
1352:
1353: // Return the number of finder
1354: public int sizeFinder() {
1355: return _Finder.size();
1356: }
1357:
1358: public int addFinder(java.lang.String value) {
1359: _Finder.add(value);
1360: int positionOfNewItem = _Finder.size() - 1;
1361: return positionOfNewItem;
1362: }
1363:
1364: /**
1365: * Search from the end looking for @param value, and then remove it.
1366: */
1367: public int removeFinder(java.lang.String value) {
1368: int pos = _Finder.indexOf(value);
1369: if (pos >= 0) {
1370: _Finder.remove(pos);
1371: }
1372: return pos;
1373: }
1374:
1375: // This attribute is optional
1376: public void setTarget(java.lang.String value) {
1377: _Target = value;
1378: }
1379:
1380: public java.lang.String getTarget() {
1381: return _Target;
1382: }
1383:
1384: // This attribute is optional
1385: public void setStaxProduceXMLEventReader(boolean value) {
1386: _StaxProduceXMLEventReader = value;
1387: _isSet_StaxProduceXMLEventReader = true;
1388: }
1389:
1390: public boolean isStaxProduceXMLEventReader() {
1391: return _StaxProduceXMLEventReader;
1392: }
1393:
1394: // This attribute is optional
1395: public void setStaxUseXMLEventReader(boolean value) {
1396: _StaxUseXMLEventReader = value;
1397: _isSet_StaxUseXMLEventReader = true;
1398: }
1399:
1400: public boolean isStaxUseXMLEventReader() {
1401: return _StaxUseXMLEventReader;
1402: }
1403:
1404: // This attribute is optional
1405: public void setOptionalScalars(boolean value) {
1406: _OptionalScalars = value;
1407: _isSet_OptionalScalars = true;
1408: }
1409:
1410: public boolean isOptionalScalars() {
1411: return _OptionalScalars;
1412: }
1413:
1414: // This attribute is optional
1415: public void setDefaultElementType(java.lang.String value) {
1416: _DefaultElementType = value;
1417: }
1418:
1419: public java.lang.String getDefaultElementType() {
1420: return _DefaultElementType;
1421: }
1422:
1423: // This attribute is optional
1424: public void setRespectExtension(boolean value) {
1425: _RespectExtension = value;
1426: _isSet_RespectExtension = true;
1427: }
1428:
1429: public boolean isRespectExtension() {
1430: return _RespectExtension;
1431: }
1432:
1433: // This attribute is optional
1434: public void setLogSuspicious(boolean value) {
1435: _LogSuspicious = value;
1436: _isSet_LogSuspicious = true;
1437: }
1438:
1439: public boolean isLogSuspicious() {
1440: return _LogSuspicious;
1441: }
1442:
1443: public void _setSchemaLocation(String location) {
1444: schemaLocation = location;
1445: }
1446:
1447: public String _getSchemaLocation() {
1448: return schemaLocation;
1449: }
1450:
1451: public void write(java.io.File f) throws java.io.IOException {
1452: java.io.OutputStream out = new java.io.FileOutputStream(f);
1453: try {
1454: write(out);
1455: } finally {
1456: out.close();
1457: }
1458: }
1459:
1460: public void write(java.io.OutputStream out)
1461: throws java.io.IOException {
1462: write(out, null);
1463: }
1464:
1465: public void write(java.io.OutputStream out, String encoding)
1466: throws java.io.IOException {
1467: java.io.Writer w;
1468: if (encoding == null) {
1469: encoding = "UTF-8"; // NOI18N
1470: }
1471: w = new java.io.BufferedWriter(new java.io.OutputStreamWriter(
1472: out, encoding));
1473: write(w, encoding);
1474: w.flush();
1475: }
1476:
1477: /**
1478: * Print this Java Bean to @param out including an XML header.
1479: * @param encoding is the encoding style that @param out was opened with.
1480: */
1481: public void write(java.io.Writer out, String encoding)
1482: throws java.io.IOException {
1483: out.write("<?xml version='1.0'"); // NOI18N
1484: if (encoding != null)
1485: out.write(" encoding='" + encoding + "'"); // NOI18N
1486: out.write(" ?>\n"); // NOI18N
1487: writeNode(out, "s2bConfig", ""); // NOI18N
1488: }
1489:
1490: public void writeNode(java.io.Writer out)
1491: throws java.io.IOException {
1492: String myName;
1493: myName = "s2bConfig";
1494: writeNode(out, myName, ""); // NOI18N
1495: }
1496:
1497: public void writeNode(java.io.Writer out, String nodeName,
1498: String indent) throws java.io.IOException {
1499: writeNode(out, nodeName, null, indent, new java.util.HashMap());
1500: }
1501:
1502: /**
1503: * It's not recommended to call this method directly.
1504: */
1505: public void writeNode(java.io.Writer out, String nodeName,
1506: String namespace, String indent, java.util.Map namespaceMap)
1507: throws java.io.IOException {
1508: out.write(indent);
1509: out.write("<");
1510: if (namespace != null) {
1511: out.write((String) namespaceMap.get(namespace));
1512: out.write(":");
1513: }
1514: out.write(nodeName);
1515: if (schemaLocation != null) {
1516: namespaceMap.put(
1517: "http://www.w3.org/2001/XMLSchema-instance", "xsi");
1518: out
1519: .write(" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='");
1520: out.write(schemaLocation);
1521: out.write("'"); // NOI18N
1522: }
1523: writeNodeAttributes(out, nodeName, namespace, indent,
1524: namespaceMap);
1525: out.write(">\n");
1526: writeNodeChildren(out, nodeName, namespace, indent,
1527: namespaceMap);
1528: out.write(indent);
1529: out.write("</");
1530: if (namespace != null) {
1531: out.write((String) namespaceMap.get(namespace));
1532: out.write(":");
1533: }
1534: out.write(nodeName);
1535: out.write(">\n");
1536: }
1537:
1538: protected void writeNodeAttributes(java.io.Writer out,
1539: String nodeName, String namespace, String indent,
1540: java.util.Map namespaceMap) throws java.io.IOException {
1541: }
1542:
1543: protected void writeNodeChildren(java.io.Writer out,
1544: String nodeName, String namespace, String indent,
1545: java.util.Map namespaceMap) throws java.io.IOException {
1546: String nextIndent = indent + " ";
1547: if (_SchemaType != null) {
1548: out.write(nextIndent);
1549: out.write("<schemaType"); // NOI18N
1550: out.write(">"); // NOI18N
1551: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
1552: out, _SchemaType, false);
1553: out.write("</schemaType>\n"); // NOI18N
1554: }
1555: if (_isSet_TraceParse) {
1556: out.write(nextIndent);
1557: out.write("<traceParse"); // NOI18N
1558: out.write(">"); // NOI18N
1559: out.write(_TraceParse ? "true" : "false");
1560: out.write("</traceParse>\n"); // NOI18N
1561: }
1562: if (_isSet_TraceGen) {
1563: out.write(nextIndent);
1564: out.write("<traceGen"); // NOI18N
1565: out.write(">"); // NOI18N
1566: out.write(_TraceGen ? "true" : "false");
1567: out.write("</traceGen>\n"); // NOI18N
1568: }
1569: if (_isSet_TraceMisc) {
1570: out.write(nextIndent);
1571: out.write("<traceMisc"); // NOI18N
1572: out.write(">"); // NOI18N
1573: out.write(_TraceMisc ? "true" : "false");
1574: out.write("</traceMisc>\n"); // NOI18N
1575: }
1576: if (_isSet_TraceDot) {
1577: out.write(nextIndent);
1578: out.write("<traceDot"); // NOI18N
1579: out.write(">"); // NOI18N
1580: out.write(_TraceDot ? "true" : "false");
1581: out.write("</traceDot>\n"); // NOI18N
1582: }
1583: if (_Filename != null) {
1584: out.write(nextIndent);
1585: out.write("<filename"); // NOI18N
1586: out.write(">"); // NOI18N
1587: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
1588: out, _Filename.toString(), false);
1589: out.write("</filename>\n"); // NOI18N
1590: }
1591: if (_FileIn != null) {
1592: out.write(nextIndent);
1593: out.write("<fileIn"); // NOI18N
1594: out.write(">"); // NOI18N
1595: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
1596: out, _FileIn.toString(), false);
1597: out.write("</fileIn>\n"); // NOI18N
1598: }
1599: if (_DocRoot != null) {
1600: out.write(nextIndent);
1601: out.write("<docRoot"); // NOI18N
1602: out.write(">"); // NOI18N
1603: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
1604: out, _DocRoot, false);
1605: out.write("</docRoot>\n"); // NOI18N
1606: }
1607: if (_RootDir != null) {
1608: out.write(nextIndent);
1609: out.write("<rootDir"); // NOI18N
1610: out.write(">"); // NOI18N
1611: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
1612: out, _RootDir.toString(), false);
1613: out.write("</rootDir>\n"); // NOI18N
1614: }
1615: if (_PackagePath != null) {
1616: out.write(nextIndent);
1617: out.write("<packagePath"); // NOI18N
1618: out.write(">"); // NOI18N
1619: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
1620: out, _PackagePath, false);
1621: out.write("</packagePath>\n"); // NOI18N
1622: }
1623: if (_Indent != null) {
1624: out.write(nextIndent);
1625: out.write("<indent"); // NOI18N
1626: out.write(">"); // NOI18N
1627: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
1628: out, _Indent, false);
1629: out.write("</indent>\n"); // NOI18N
1630: }
1631: if (_isSet_IndentAmount) {
1632: out.write(nextIndent);
1633: out.write("<indentAmount"); // NOI18N
1634: out.write(">"); // NOI18N
1635: out.write("" + _IndentAmount);
1636: out.write("</indentAmount>\n"); // NOI18N
1637: }
1638: if (_MddFile != null) {
1639: out.write(nextIndent);
1640: out.write("<mddFile"); // NOI18N
1641: out.write(">"); // NOI18N
1642: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
1643: out, _MddFile.toString(), false);
1644: out.write("</mddFile>\n"); // NOI18N
1645: }
1646: if (_MddIn != null) {
1647: out.write(nextIndent);
1648: out.write("<mddIn"); // NOI18N
1649: out.write(">"); // NOI18N
1650: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
1651: out, _MddIn.toString(), false);
1652: out.write("</mddIn>\n"); // NOI18N
1653: }
1654: if (_MetaDD != null) {
1655: out.write(nextIndent);
1656: out.write("<metaDD"); // NOI18N
1657: out.write(">"); // NOI18N
1658: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
1659: out, _MetaDD.toString(), false);
1660: out.write("</metaDD>\n"); // NOI18N
1661: }
1662: if (_isSet_DoGeneration) {
1663: out.write(nextIndent);
1664: out.write("<doGeneration"); // NOI18N
1665: out.write(">"); // NOI18N
1666: out.write(_DoGeneration ? "true" : "false");
1667: out.write("</doGeneration>\n"); // NOI18N
1668: }
1669: if (_isSet_ScalarException) {
1670: out.write(nextIndent);
1671: out.write("<scalarException"); // NOI18N
1672: out.write(">"); // NOI18N
1673: out.write(_ScalarException ? "true" : "false");
1674: out.write("</scalarException>\n"); // NOI18N
1675: }
1676: if (_isSet_DumpToString) {
1677: out.write(nextIndent);
1678: out.write("<dumpToString"); // NOI18N
1679: out.write(">"); // NOI18N
1680: out.write(_DumpToString ? "true" : "false");
1681: out.write("</dumpToString>\n"); // NOI18N
1682: }
1683: if (_isSet_Vetoable) {
1684: out.write(nextIndent);
1685: out.write("<vetoable"); // NOI18N
1686: out.write(">"); // NOI18N
1687: out.write(_Vetoable ? "true" : "false");
1688: out.write("</vetoable>\n"); // NOI18N
1689: }
1690: if (_isSet_Standalone) {
1691: out.write(nextIndent);
1692: out.write("<standalone"); // NOI18N
1693: out.write(">"); // NOI18N
1694: out.write(_Standalone ? "true" : "false");
1695: out.write("</standalone>\n"); // NOI18N
1696: }
1697: if (_isSet_Auto) {
1698: out.write(nextIndent);
1699: out.write("<auto"); // NOI18N
1700: out.write(">"); // NOI18N
1701: out.write(_Auto ? "true" : "false");
1702: out.write("</auto>\n"); // NOI18N
1703: }
1704: if (_MessageOut != null) {
1705: out.write(nextIndent);
1706: out.write("<messageOut"); // NOI18N
1707: out.write(">"); // NOI18N
1708: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
1709: out, _MessageOut.toString(), false);
1710: out.write("</messageOut>\n"); // NOI18N
1711: }
1712: if (_OutputStreamProvider != null) {
1713: out.write(nextIndent);
1714: out.write("<outputStreamProvider"); // NOI18N
1715: out.write(">"); // NOI18N
1716: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
1717: out, _OutputStreamProvider.toString(), false);
1718: out.write("</outputStreamProvider>\n"); // NOI18N
1719: }
1720: if (_isSet_ThrowErrors) {
1721: out.write(nextIndent);
1722: out.write("<throwErrors"); // NOI18N
1723: out.write(">"); // NOI18N
1724: out.write(_ThrowErrors ? "true" : "false");
1725: out.write("</throwErrors>\n"); // NOI18N
1726: }
1727: if (_isSet_GenerateXMLIO) {
1728: out.write(nextIndent);
1729: out.write("<generateXMLIO"); // NOI18N
1730: out.write(">"); // NOI18N
1731: out.write(_GenerateXMLIO ? "true" : "false");
1732: out.write("</generateXMLIO>\n"); // NOI18N
1733: }
1734: if (_isSet_GenerateValidate) {
1735: out.write(nextIndent);
1736: out.write("<generateValidate"); // NOI18N
1737: out.write(">"); // NOI18N
1738: out.write(_GenerateValidate ? "true" : "false");
1739: out.write("</generateValidate>\n"); // NOI18N
1740: }
1741: if (_isSet_GeneratePropertyEvents) {
1742: out.write(nextIndent);
1743: out.write("<generatePropertyEvents"); // NOI18N
1744: out.write(">"); // NOI18N
1745: out.write(_GeneratePropertyEvents ? "true" : "false");
1746: out.write("</generatePropertyEvents>\n"); // NOI18N
1747: }
1748: if (_isSet_GenerateStoreEvents) {
1749: out.write(nextIndent);
1750: out.write("<generateStoreEvents"); // NOI18N
1751: out.write(">"); // NOI18N
1752: out.write(_GenerateStoreEvents ? "true" : "false");
1753: out.write("</generateStoreEvents>\n"); // NOI18N
1754: }
1755: if (_isSet_GenerateTransactions) {
1756: out.write(nextIndent);
1757: out.write("<generateTransactions"); // NOI18N
1758: out.write(">"); // NOI18N
1759: out.write(_GenerateTransactions ? "true" : "false");
1760: out.write("</generateTransactions>\n"); // NOI18N
1761: }
1762: if (_isSet_AttributesAsProperties) {
1763: out.write(nextIndent);
1764: out.write("<attributesAsProperties"); // NOI18N
1765: out.write(">"); // NOI18N
1766: out.write(_AttributesAsProperties ? "true" : "false");
1767: out.write("</attributesAsProperties>\n"); // NOI18N
1768: }
1769: if (_isSet_GenerateDelegator) {
1770: out.write(nextIndent);
1771: out.write("<generateDelegator"); // NOI18N
1772: out.write(">"); // NOI18N
1773: out.write(_GenerateDelegator ? "true" : "false");
1774: out.write("</generateDelegator>\n"); // NOI18N
1775: }
1776: if (_DelegateDir != null) {
1777: out.write(nextIndent);
1778: out.write("<delegateDir"); // NOI18N
1779: out.write(">"); // NOI18N
1780: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
1781: out, _DelegateDir.toString(), false);
1782: out.write("</delegateDir>\n"); // NOI18N
1783: }
1784: if (_DelegatePackage != null) {
1785: out.write(nextIndent);
1786: out.write("<delegatePackage"); // NOI18N
1787: out.write(">"); // NOI18N
1788: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
1789: out, _DelegatePackage, false);
1790: out.write("</delegatePackage>\n"); // NOI18N
1791: }
1792: if (_GenerateCommonInterface != null) {
1793: out.write(nextIndent);
1794: out.write("<generateCommonInterface"); // NOI18N
1795: out.write(">"); // NOI18N
1796: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
1797: out, _GenerateCommonInterface, false);
1798: out.write("</generateCommonInterface>\n"); // NOI18N
1799: }
1800: if (_isSet_DefaultsAccessable) {
1801: out.write(nextIndent);
1802: out.write("<defaultsAccessable"); // NOI18N
1803: out.write(">"); // NOI18N
1804: out.write(_DefaultsAccessable ? "true" : "false");
1805: out.write("</defaultsAccessable>\n"); // NOI18N
1806: }
1807: if (_isSet_UseInterfaces) {
1808: out.write(nextIndent);
1809: out.write("<useInterfaces"); // NOI18N
1810: out.write(">"); // NOI18N
1811: out.write(_UseInterfaces ? "true" : "false");
1812: out.write("</useInterfaces>\n"); // NOI18N
1813: }
1814: if (_isSet_GenerateInterfaces) {
1815: out.write(nextIndent);
1816: out.write("<generateInterfaces"); // NOI18N
1817: out.write(">"); // NOI18N
1818: out.write(_GenerateInterfaces ? "true" : "false");
1819: out.write("</generateInterfaces>\n"); // NOI18N
1820: }
1821: if (_isSet_KeepElementPositions) {
1822: out.write(nextIndent);
1823: out.write("<keepElementPositions"); // NOI18N
1824: out.write(">"); // NOI18N
1825: out.write(_KeepElementPositions ? "true" : "false");
1826: out.write("</keepElementPositions>\n"); // NOI18N
1827: }
1828: if (_isSet_RemoveUnreferencedNodes) {
1829: out.write(nextIndent);
1830: out.write("<removeUnreferencedNodes"); // NOI18N
1831: out.write(">"); // NOI18N
1832: out.write(_RemoveUnreferencedNodes ? "true" : "false");
1833: out.write("</removeUnreferencedNodes>\n"); // NOI18N
1834: }
1835: if (_InputURI != null) {
1836: out.write(nextIndent);
1837: out.write("<inputURI"); // NOI18N
1838: out.write(">"); // NOI18N
1839: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
1840: out, _InputURI, false);
1841: out.write("</inputURI>\n"); // NOI18N
1842: }
1843: if (_IndexedPropertyType != null) {
1844: out.write(nextIndent);
1845: out.write("<indexedPropertyType"); // NOI18N
1846: out.write(">"); // NOI18N
1847: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
1848: out, _IndexedPropertyType, false);
1849: out.write("</indexedPropertyType>\n"); // NOI18N
1850: }
1851: if (_isSet_DoCompile) {
1852: out.write(nextIndent);
1853: out.write("<doCompile"); // NOI18N
1854: out.write(">"); // NOI18N
1855: out.write(_DoCompile ? "true" : "false");
1856: out.write("</doCompile>\n"); // NOI18N
1857: }
1858: if (_isSet_GenerateSwitches) {
1859: out.write(nextIndent);
1860: out.write("<generateSwitches"); // NOI18N
1861: out.write(">"); // NOI18N
1862: out.write(_GenerateSwitches ? "true" : "false");
1863: out.write("</generateSwitches>\n"); // NOI18N
1864: }
1865: if (_DumpBeanTree != null) {
1866: out.write(nextIndent);
1867: out.write("<dumpBeanTree"); // NOI18N
1868: out.write(">"); // NOI18N
1869: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
1870: out, _DumpBeanTree.toString(), false);
1871: out.write("</dumpBeanTree>\n"); // NOI18N
1872: }
1873: if (_GenerateDotGraph != null) {
1874: out.write(nextIndent);
1875: out.write("<generateDotGraph"); // NOI18N
1876: out.write(">"); // NOI18N
1877: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
1878: out, _GenerateDotGraph.toString(), false);
1879: out.write("</generateDotGraph>\n"); // NOI18N
1880: }
1881: if (_isSet_ProcessComments) {
1882: out.write(nextIndent);
1883: out.write("<processComments"); // NOI18N
1884: out.write(">"); // NOI18N
1885: out.write(_ProcessComments ? "true" : "false");
1886: out.write("</processComments>\n"); // NOI18N
1887: }
1888: if (_isSet_ProcessDocType) {
1889: out.write(nextIndent);
1890: out.write("<processDocType"); // NOI18N
1891: out.write(">"); // NOI18N
1892: out.write(_ProcessDocType ? "true" : "false");
1893: out.write("</processDocType>\n"); // NOI18N
1894: }
1895: if (_isSet_CheckUpToDate) {
1896: out.write(nextIndent);
1897: out.write("<checkUpToDate"); // NOI18N
1898: out.write(">"); // NOI18N
1899: out.write(_CheckUpToDate ? "true" : "false");
1900: out.write("</checkUpToDate>\n"); // NOI18N
1901: }
1902: if (_isSet_GenerateParentRefs) {
1903: out.write(nextIndent);
1904: out.write("<generateParentRefs"); // NOI18N
1905: out.write(">"); // NOI18N
1906: out.write(_GenerateParentRefs ? "true" : "false");
1907: out.write("</generateParentRefs>\n"); // NOI18N
1908: }
1909: if (_isSet_GenerateHasChanged) {
1910: out.write(nextIndent);
1911: out.write("<generateHasChanged"); // NOI18N
1912: out.write(">"); // NOI18N
1913: out.write(_GenerateHasChanged ? "true" : "false");
1914: out.write("</generateHasChanged>\n"); // NOI18N
1915: }
1916: if (_isSet_NewestSourceTime) {
1917: out.write(nextIndent);
1918: out.write("<newestSourceTime"); // NOI18N
1919: out.write(">"); // NOI18N
1920: out.write("" + _NewestSourceTime);
1921: out.write("</newestSourceTime>\n"); // NOI18N
1922: }
1923: if (_WriteBeanGraphFile != null) {
1924: out.write(nextIndent);
1925: out.write("<writeBeanGraphFile"); // NOI18N
1926: out.write(">"); // NOI18N
1927: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
1928: out, _WriteBeanGraphFile.toString(), false);
1929: out.write("</writeBeanGraphFile>\n"); // NOI18N
1930: }
1931: for (java.util.Iterator it = _ReadBeanGraphFiles.iterator(); it
1932: .hasNext();) {
1933: java.io.File element = (java.io.File) it.next();
1934: if (element != null) {
1935: out.write(nextIndent);
1936: out.write("<readBeanGraphFiles"); // NOI18N
1937: out.write(">"); // NOI18N
1938: org.netbeans.modules.schema2beansdev.S2bConfig
1939: .writeXML(out, element.toString(), false);
1940: out.write("</readBeanGraphFiles>\n"); // NOI18N
1941: }
1942: }
1943: for (java.util.Iterator it = _ReadBeanGraphs.iterator(); it
1944: .hasNext();) {
1945: org.netbeans.modules.schema2beansdev.beangraph.BeanGraph element = (org.netbeans.modules.schema2beansdev.beangraph.BeanGraph) it
1946: .next();
1947: if (element != null) {
1948: out.write(nextIndent);
1949: out.write("<readBeanGraphs"); // NOI18N
1950: out.write(">"); // NOI18N
1951: org.netbeans.modules.schema2beansdev.S2bConfig
1952: .writeXML(out, element.toString(), false);
1953: out.write("</readBeanGraphs>\n"); // NOI18N
1954: }
1955: }
1956: if (_isSet_MinFeatures) {
1957: out.write(nextIndent);
1958: out.write("<minFeatures"); // NOI18N
1959: out.write(">"); // NOI18N
1960: out.write(_MinFeatures ? "true" : "false");
1961: out.write("</minFeatures>\n"); // NOI18N
1962: }
1963: if (_isSet_ForME) {
1964: out.write(nextIndent);
1965: out.write("<forME"); // NOI18N
1966: out.write(">"); // NOI18N
1967: out.write(_ForME ? "true" : "false");
1968: out.write("</forME>\n"); // NOI18N
1969: }
1970: if (_isSet_GenerateTagsFile) {
1971: out.write(nextIndent);
1972: out.write("<generateTagsFile"); // NOI18N
1973: out.write(">"); // NOI18N
1974: out.write(_GenerateTagsFile ? "true" : "false");
1975: out.write("</generateTagsFile>\n"); // NOI18N
1976: }
1977: if (_CodeGeneratorFactory != null) {
1978: out.write(nextIndent);
1979: out.write("<codeGeneratorFactory"); // NOI18N
1980: out.write(">"); // NOI18N
1981: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
1982: out, _CodeGeneratorFactory.toString(), false);
1983: out.write("</codeGeneratorFactory>\n"); // NOI18N
1984: }
1985: if (_isSet_GenerateTimeStamp) {
1986: out.write(nextIndent);
1987: out.write("<generateTimeStamp"); // NOI18N
1988: out.write(">"); // NOI18N
1989: out.write(_GenerateTimeStamp ? "true" : "false");
1990: out.write("</generateTimeStamp>\n"); // NOI18N
1991: }
1992: if (_isSet_Quiet) {
1993: out.write(nextIndent);
1994: out.write("<quiet"); // NOI18N
1995: out.write(">"); // NOI18N
1996: out.write(_Quiet ? "true" : "false");
1997: out.write("</quiet>\n"); // NOI18N
1998: }
1999: if (_WriteConfig != null) {
2000: out.write(nextIndent);
2001: out.write("<writeConfig"); // NOI18N
2002: out.write(">"); // NOI18N
2003: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
2004: out, _WriteConfig.toString(), false);
2005: out.write("</writeConfig>\n"); // NOI18N
2006: }
2007: for (java.util.Iterator it = _ReadConfig.iterator(); it
2008: .hasNext();) {
2009: java.io.File element = (java.io.File) it.next();
2010: if (element != null) {
2011: out.write(nextIndent);
2012: out.write("<readConfig"); // NOI18N
2013: out.write(">"); // NOI18N
2014: org.netbeans.modules.schema2beansdev.S2bConfig
2015: .writeXML(out, element.toString(), false);
2016: out.write("</readConfig>\n"); // NOI18N
2017: }
2018: }
2019: if (_isSet_MakeDefaults) {
2020: out.write(nextIndent);
2021: out.write("<makeDefaults"); // NOI18N
2022: out.write(">"); // NOI18N
2023: out.write(_MakeDefaults ? "true" : "false");
2024: out.write("</makeDefaults>\n"); // NOI18N
2025: }
2026: if (_isSet_SetDefaults) {
2027: out.write(nextIndent);
2028: out.write("<setDefaults"); // NOI18N
2029: out.write(">"); // NOI18N
2030: out.write(_SetDefaults ? "true" : "false");
2031: out.write("</setDefaults>\n"); // NOI18N
2032: }
2033: if (_isSet_TrimNonStrings) {
2034: out.write(nextIndent);
2035: out.write("<trimNonStrings"); // NOI18N
2036: out.write(">"); // NOI18N
2037: out.write(_TrimNonStrings ? "true" : "false");
2038: out.write("</trimNonStrings>\n"); // NOI18N
2039: }
2040: if (_isSet_UseRuntime) {
2041: out.write(nextIndent);
2042: out.write("<useRuntime"); // NOI18N
2043: out.write(">"); // NOI18N
2044: out.write(_UseRuntime ? "true" : "false");
2045: out.write("</useRuntime>\n"); // NOI18N
2046: }
2047: if (_isSet_ExtendBaseBean) {
2048: out.write(nextIndent);
2049: out.write("<extendBaseBean"); // NOI18N
2050: out.write(">"); // NOI18N
2051: out.write(_ExtendBaseBean ? "true" : "false");
2052: out.write("</extendBaseBean>\n"); // NOI18N
2053: }
2054: for (java.util.Iterator it = _Finder.iterator(); it.hasNext();) {
2055: java.lang.String element = (java.lang.String) it.next();
2056: if (element != null) {
2057: out.write(nextIndent);
2058: out.write("<finder"); // NOI18N
2059: out.write(">"); // NOI18N
2060: org.netbeans.modules.schema2beansdev.S2bConfig
2061: .writeXML(out, element, false);
2062: out.write("</finder>\n"); // NOI18N
2063: }
2064: }
2065: if (_Target != null) {
2066: out.write(nextIndent);
2067: out.write("<target"); // NOI18N
2068: out.write(">"); // NOI18N
2069: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
2070: out, _Target, false);
2071: out.write("</target>\n"); // NOI18N
2072: }
2073: if (_isSet_StaxProduceXMLEventReader) {
2074: out.write(nextIndent);
2075: out.write("<staxProduceXMLEventReader"); // NOI18N
2076: out.write(">"); // NOI18N
2077: out.write(_StaxProduceXMLEventReader ? "true" : "false");
2078: out.write("</staxProduceXMLEventReader>\n"); // NOI18N
2079: }
2080: if (_isSet_StaxUseXMLEventReader) {
2081: out.write(nextIndent);
2082: out.write("<staxUseXMLEventReader"); // NOI18N
2083: out.write(">"); // NOI18N
2084: out.write(_StaxUseXMLEventReader ? "true" : "false");
2085: out.write("</staxUseXMLEventReader>\n"); // NOI18N
2086: }
2087: if (_isSet_OptionalScalars) {
2088: out.write(nextIndent);
2089: out.write("<optionalScalars"); // NOI18N
2090: out.write(">"); // NOI18N
2091: out.write(_OptionalScalars ? "true" : "false");
2092: out.write("</optionalScalars>\n"); // NOI18N
2093: }
2094: if (_DefaultElementType != null) {
2095: out.write(nextIndent);
2096: out.write("<defaultElementType"); // NOI18N
2097: out.write(">"); // NOI18N
2098: org.netbeans.modules.schema2beansdev.S2bConfig.writeXML(
2099: out, _DefaultElementType, false);
2100: out.write("</defaultElementType>\n"); // NOI18N
2101: }
2102: if (_isSet_RespectExtension) {
2103: out.write(nextIndent);
2104: out.write("<respectExtension"); // NOI18N
2105: out.write(">"); // NOI18N
2106: out.write(_RespectExtension ? "true" : "false");
2107: out.write("</respectExtension>\n"); // NOI18N
2108: }
2109: if (_isSet_LogSuspicious) {
2110: out.write(nextIndent);
2111: out.write("<logSuspicious"); // NOI18N
2112: out.write(">"); // NOI18N
2113: out.write(_LogSuspicious ? "true" : "false");
2114: out.write("</logSuspicious>\n"); // NOI18N
2115: }
2116: }
2117:
2118: public static S2bConfig read(java.io.File f)
2119: throws javax.xml.parsers.ParserConfigurationException,
2120: org.xml.sax.SAXException, java.io.IOException {
2121: java.io.InputStream in = new java.io.FileInputStream(f);
2122: try {
2123: return read(in);
2124: } finally {
2125: in.close();
2126: }
2127: }
2128:
2129: public static S2bConfig read(java.io.InputStream in)
2130: throws javax.xml.parsers.ParserConfigurationException,
2131: org.xml.sax.SAXException, java.io.IOException {
2132: return read(new org.xml.sax.InputSource(in), false, null, null);
2133: }
2134:
2135: /**
2136: * Warning: in readNoEntityResolver character and entity references will
2137: * not be read from any DTD in the XML source.
2138: * However, this way is faster since no DTDs are looked up
2139: * (possibly skipping network access) or parsed.
2140: */
2141: public static S2bConfig readNoEntityResolver(java.io.InputStream in)
2142: throws javax.xml.parsers.ParserConfigurationException,
2143: org.xml.sax.SAXException, java.io.IOException {
2144: return read(new org.xml.sax.InputSource(in), false,
2145: new org.xml.sax.EntityResolver() {
2146: public org.xml.sax.InputSource resolveEntity(
2147: String publicId, String systemId) {
2148: java.io.ByteArrayInputStream bin = new java.io.ByteArrayInputStream(
2149: new byte[0]);
2150: return new org.xml.sax.InputSource(bin);
2151: }
2152: }, null);
2153: }
2154:
2155: public static S2bConfig read(org.xml.sax.InputSource in,
2156: boolean validate, org.xml.sax.EntityResolver er,
2157: org.xml.sax.ErrorHandler eh)
2158: throws javax.xml.parsers.ParserConfigurationException,
2159: org.xml.sax.SAXException, java.io.IOException {
2160: javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory
2161: .newInstance();
2162: dbf.setValidating(validate);
2163: dbf.setNamespaceAware(true);
2164: javax.xml.parsers.DocumentBuilder db = dbf.newDocumentBuilder();
2165: if (er != null)
2166: db.setEntityResolver(er);
2167: if (eh != null)
2168: db.setErrorHandler(eh);
2169: org.w3c.dom.Document doc = db.parse(in);
2170: return read(doc);
2171: }
2172:
2173: public static S2bConfig read(org.w3c.dom.Document document) {
2174: S2bConfig aS2bConfig = new S2bConfig();
2175: aS2bConfig.readFromDocument(document);
2176: return aS2bConfig;
2177: }
2178:
2179: protected void readFromDocument(org.w3c.dom.Document document) {
2180: readNode(document.getDocumentElement());
2181: }
2182:
2183: public void readNode(org.w3c.dom.Node node) {
2184: readNode(node, new java.util.HashMap());
2185: }
2186:
2187: public void readNode(org.w3c.dom.Node node,
2188: java.util.Map namespacePrefixes) {
2189: if (node.hasAttributes()) {
2190: org.w3c.dom.NamedNodeMap attrs = node.getAttributes();
2191: org.w3c.dom.Attr attr;
2192: java.lang.String attrValue;
2193: boolean firstNamespaceDef = true;
2194: for (int attrNum = 0; attrNum < attrs.getLength(); ++attrNum) {
2195: attr = (org.w3c.dom.Attr) attrs.item(attrNum);
2196: String attrName = attr.getName();
2197: if (attrName.startsWith("xmlns:")) {
2198: if (firstNamespaceDef) {
2199: firstNamespaceDef = false;
2200: // Dup prefix map, so as to not write over previous values, and to make it easy to clear out our entries.
2201: namespacePrefixes = new java.util.HashMap(
2202: namespacePrefixes);
2203: }
2204: String attrNSPrefix = attrName.substring(6,
2205: attrName.length());
2206: namespacePrefixes
2207: .put(attrNSPrefix, attr.getValue());
2208: }
2209: }
2210: String xsiPrefix = "xsi";
2211: for (java.util.Iterator it = namespacePrefixes.keySet()
2212: .iterator(); it.hasNext();) {
2213: String prefix = (String) it.next();
2214: String ns = (String) namespacePrefixes.get(prefix);
2215: if ("http://www.w3.org/2001/XMLSchema-instance"
2216: .equals(ns)) {
2217: xsiPrefix = prefix;
2218: break;
2219: }
2220: }
2221: attr = (org.w3c.dom.Attr) attrs.getNamedItem("" + xsiPrefix
2222: + ":schemaLocation");
2223: if (attr != null) {
2224: attrValue = attr.getValue();
2225: schemaLocation = attrValue;
2226: }
2227: readNodeAttributes(node, namespacePrefixes, attrs);
2228: }
2229: readNodeChildren(node, namespacePrefixes);
2230: }
2231:
2232: protected void readNodeAttributes(org.w3c.dom.Node node,
2233: java.util.Map namespacePrefixes,
2234: org.w3c.dom.NamedNodeMap attrs) {
2235: org.w3c.dom.Attr attr;
2236: java.lang.String attrValue;
2237: }
2238:
2239: protected void readNodeChildren(org.w3c.dom.Node node,
2240: java.util.Map namespacePrefixes) {
2241: org.w3c.dom.NodeList children = node.getChildNodes();
2242: for (int i = 0, size = children.getLength(); i < size; ++i) {
2243: org.w3c.dom.Node childNode = children.item(i);
2244: String childNodeName = (childNode.getLocalName() == null ? childNode
2245: .getNodeName().intern()
2246: : childNode.getLocalName().intern());
2247: String childNodeValue = "";
2248: if (childNode.getFirstChild() != null) {
2249: childNodeValue = childNode.getFirstChild()
2250: .getNodeValue();
2251: }
2252: if (childNodeName == "schemaType") {
2253: _SchemaType = childNodeValue;
2254: } else if (childNodeName == "traceParse") {
2255: if (childNode.getFirstChild() == null)
2256: _TraceParse = true;
2257: else
2258: _TraceParse = java.lang.Boolean.valueOf(
2259: childNodeValue).booleanValue();
2260: _isSet_TraceParse = true;
2261: } else if (childNodeName == "traceGen") {
2262: if (childNode.getFirstChild() == null)
2263: _TraceGen = true;
2264: else
2265: _TraceGen = java.lang.Boolean.valueOf(
2266: childNodeValue).booleanValue();
2267: _isSet_TraceGen = true;
2268: } else if (childNodeName == "traceMisc") {
2269: if (childNode.getFirstChild() == null)
2270: _TraceMisc = true;
2271: else
2272: _TraceMisc = java.lang.Boolean.valueOf(
2273: childNodeValue).booleanValue();
2274: _isSet_TraceMisc = true;
2275: } else if (childNodeName == "traceDot") {
2276: if (childNode.getFirstChild() == null)
2277: _TraceDot = true;
2278: else
2279: _TraceDot = java.lang.Boolean.valueOf(
2280: childNodeValue).booleanValue();
2281: _isSet_TraceDot = true;
2282: } else if (childNodeName == "filename") {
2283: _Filename = new java.io.File(childNodeValue);
2284: } else if (childNodeName == "fileIn") {
2285: // Don't know how to create a java.io.InputStream
2286: } else if (childNodeName == "docRoot") {
2287: _DocRoot = childNodeValue;
2288: } else if (childNodeName == "rootDir") {
2289: _RootDir = new java.io.File(childNodeValue);
2290: } else if (childNodeName == "packagePath") {
2291: _PackagePath = childNodeValue;
2292: } else if (childNodeName == "indent") {
2293: _Indent = childNodeValue;
2294: } else if (childNodeName == "indentAmount") {
2295: _IndentAmount = Integer.parseInt(childNodeValue);
2296: _isSet_IndentAmount = true;
2297: } else if (childNodeName == "mddFile") {
2298: _MddFile = new java.io.File(childNodeValue);
2299: } else if (childNodeName == "mddIn") {
2300: // Don't know how to create a java.io.InputStream
2301: } else if (childNodeName == "metaDD") {
2302: // Don't know how to create a org.netbeans.modules.schema2beansdev.metadd.MetaDD
2303: } else if (childNodeName == "doGeneration") {
2304: if (childNode.getFirstChild() == null)
2305: _DoGeneration = true;
2306: else
2307: _DoGeneration = java.lang.Boolean.valueOf(
2308: childNodeValue).booleanValue();
2309: _isSet_DoGeneration = true;
2310: } else if (childNodeName == "scalarException") {
2311: if (childNode.getFirstChild() == null)
2312: _ScalarException = true;
2313: else
2314: _ScalarException = java.lang.Boolean.valueOf(
2315: childNodeValue).booleanValue();
2316: _isSet_ScalarException = true;
2317: } else if (childNodeName == "dumpToString") {
2318: if (childNode.getFirstChild() == null)
2319: _DumpToString = true;
2320: else
2321: _DumpToString = java.lang.Boolean.valueOf(
2322: childNodeValue).booleanValue();
2323: _isSet_DumpToString = true;
2324: } else if (childNodeName == "vetoable") {
2325: if (childNode.getFirstChild() == null)
2326: _Vetoable = true;
2327: else
2328: _Vetoable = java.lang.Boolean.valueOf(
2329: childNodeValue).booleanValue();
2330: _isSet_Vetoable = true;
2331: } else if (childNodeName == "standalone") {
2332: if (childNode.getFirstChild() == null)
2333: _Standalone = true;
2334: else
2335: _Standalone = java.lang.Boolean.valueOf(
2336: childNodeValue).booleanValue();
2337: _isSet_Standalone = true;
2338: } else if (childNodeName == "auto") {
2339: if (childNode.getFirstChild() == null)
2340: _Auto = true;
2341: else
2342: _Auto = java.lang.Boolean.valueOf(childNodeValue)
2343: .booleanValue();
2344: _isSet_Auto = true;
2345: } else if (childNodeName == "messageOut") {
2346: // Don't know how to create a java.io.PrintStream
2347: } else if (childNodeName == "outputStreamProvider") {
2348: // Don't know how to create a org.netbeans.modules.schema2beansdev.GenBeans.OutputStreamProvider
2349: } else if (childNodeName == "throwErrors") {
2350: if (childNode.getFirstChild() == null)
2351: _ThrowErrors = true;
2352: else
2353: _ThrowErrors = java.lang.Boolean.valueOf(
2354: childNodeValue).booleanValue();
2355: _isSet_ThrowErrors = true;
2356: } else if (childNodeName == "generateXMLIO") {
2357: if (childNode.getFirstChild() == null)
2358: _GenerateXMLIO = true;
2359: else
2360: _GenerateXMLIO = java.lang.Boolean.valueOf(
2361: childNodeValue).booleanValue();
2362: _isSet_GenerateXMLIO = true;
2363: } else if (childNodeName == "generateValidate") {
2364: if (childNode.getFirstChild() == null)
2365: _GenerateValidate = true;
2366: else
2367: _GenerateValidate = java.lang.Boolean.valueOf(
2368: childNodeValue).booleanValue();
2369: _isSet_GenerateValidate = true;
2370: } else if (childNodeName == "generatePropertyEvents") {
2371: if (childNode.getFirstChild() == null)
2372: _GeneratePropertyEvents = true;
2373: else
2374: _GeneratePropertyEvents = java.lang.Boolean
2375: .valueOf(childNodeValue).booleanValue();
2376: _isSet_GeneratePropertyEvents = true;
2377: } else if (childNodeName == "generateStoreEvents") {
2378: if (childNode.getFirstChild() == null)
2379: _GenerateStoreEvents = true;
2380: else
2381: _GenerateStoreEvents = java.lang.Boolean.valueOf(
2382: childNodeValue).booleanValue();
2383: _isSet_GenerateStoreEvents = true;
2384: } else if (childNodeName == "generateTransactions") {
2385: if (childNode.getFirstChild() == null)
2386: _GenerateTransactions = true;
2387: else
2388: _GenerateTransactions = java.lang.Boolean.valueOf(
2389: childNodeValue).booleanValue();
2390: _isSet_GenerateTransactions = true;
2391: } else if (childNodeName == "attributesAsProperties") {
2392: if (childNode.getFirstChild() == null)
2393: _AttributesAsProperties = true;
2394: else
2395: _AttributesAsProperties = java.lang.Boolean
2396: .valueOf(childNodeValue).booleanValue();
2397: _isSet_AttributesAsProperties = true;
2398: } else if (childNodeName == "generateDelegator") {
2399: if (childNode.getFirstChild() == null)
2400: _GenerateDelegator = true;
2401: else
2402: _GenerateDelegator = java.lang.Boolean.valueOf(
2403: childNodeValue).booleanValue();
2404: _isSet_GenerateDelegator = true;
2405: } else if (childNodeName == "delegateDir") {
2406: _DelegateDir = new java.io.File(childNodeValue);
2407: } else if (childNodeName == "delegatePackage") {
2408: _DelegatePackage = childNodeValue;
2409: } else if (childNodeName == "generateCommonInterface") {
2410: _GenerateCommonInterface = childNodeValue;
2411: } else if (childNodeName == "defaultsAccessable") {
2412: if (childNode.getFirstChild() == null)
2413: _DefaultsAccessable = true;
2414: else
2415: _DefaultsAccessable = java.lang.Boolean.valueOf(
2416: childNodeValue).booleanValue();
2417: _isSet_DefaultsAccessable = true;
2418: } else if (childNodeName == "useInterfaces") {
2419: if (childNode.getFirstChild() == null)
2420: _UseInterfaces = true;
2421: else
2422: _UseInterfaces = java.lang.Boolean.valueOf(
2423: childNodeValue).booleanValue();
2424: _isSet_UseInterfaces = true;
2425: } else if (childNodeName == "generateInterfaces") {
2426: if (childNode.getFirstChild() == null)
2427: _GenerateInterfaces = true;
2428: else
2429: _GenerateInterfaces = java.lang.Boolean.valueOf(
2430: childNodeValue).booleanValue();
2431: _isSet_GenerateInterfaces = true;
2432: } else if (childNodeName == "keepElementPositions") {
2433: if (childNode.getFirstChild() == null)
2434: _KeepElementPositions = true;
2435: else
2436: _KeepElementPositions = java.lang.Boolean.valueOf(
2437: childNodeValue).booleanValue();
2438: _isSet_KeepElementPositions = true;
2439: } else if (childNodeName == "removeUnreferencedNodes") {
2440: if (childNode.getFirstChild() == null)
2441: _RemoveUnreferencedNodes = true;
2442: else
2443: _RemoveUnreferencedNodes = java.lang.Boolean
2444: .valueOf(childNodeValue).booleanValue();
2445: _isSet_RemoveUnreferencedNodes = true;
2446: } else if (childNodeName == "inputURI") {
2447: _InputURI = childNodeValue;
2448: } else if (childNodeName == "indexedPropertyType") {
2449: _IndexedPropertyType = childNodeValue;
2450: } else if (childNodeName == "doCompile") {
2451: if (childNode.getFirstChild() == null)
2452: _DoCompile = true;
2453: else
2454: _DoCompile = java.lang.Boolean.valueOf(
2455: childNodeValue).booleanValue();
2456: _isSet_DoCompile = true;
2457: } else if (childNodeName == "generateSwitches") {
2458: if (childNode.getFirstChild() == null)
2459: _GenerateSwitches = true;
2460: else
2461: _GenerateSwitches = java.lang.Boolean.valueOf(
2462: childNodeValue).booleanValue();
2463: _isSet_GenerateSwitches = true;
2464: } else if (childNodeName == "dumpBeanTree") {
2465: _DumpBeanTree = new java.io.File(childNodeValue);
2466: } else if (childNodeName == "generateDotGraph") {
2467: _GenerateDotGraph = new java.io.File(childNodeValue);
2468: } else if (childNodeName == "processComments") {
2469: if (childNode.getFirstChild() == null)
2470: _ProcessComments = true;
2471: else
2472: _ProcessComments = java.lang.Boolean.valueOf(
2473: childNodeValue).booleanValue();
2474: _isSet_ProcessComments = true;
2475: } else if (childNodeName == "processDocType") {
2476: if (childNode.getFirstChild() == null)
2477: _ProcessDocType = true;
2478: else
2479: _ProcessDocType = java.lang.Boolean.valueOf(
2480: childNodeValue).booleanValue();
2481: _isSet_ProcessDocType = true;
2482: } else if (childNodeName == "checkUpToDate") {
2483: if (childNode.getFirstChild() == null)
2484: _CheckUpToDate = true;
2485: else
2486: _CheckUpToDate = java.lang.Boolean.valueOf(
2487: childNodeValue).booleanValue();
2488: _isSet_CheckUpToDate = true;
2489: } else if (childNodeName == "generateParentRefs") {
2490: if (childNode.getFirstChild() == null)
2491: _GenerateParentRefs = true;
2492: else
2493: _GenerateParentRefs = java.lang.Boolean.valueOf(
2494: childNodeValue).booleanValue();
2495: _isSet_GenerateParentRefs = true;
2496: } else if (childNodeName == "generateHasChanged") {
2497: if (childNode.getFirstChild() == null)
2498: _GenerateHasChanged = true;
2499: else
2500: _GenerateHasChanged = java.lang.Boolean.valueOf(
2501: childNodeValue).booleanValue();
2502: _isSet_GenerateHasChanged = true;
2503: } else if (childNodeName == "newestSourceTime") {
2504: _NewestSourceTime = Long.parseLong(childNodeValue);
2505: _isSet_NewestSourceTime = true;
2506: } else if (childNodeName == "writeBeanGraphFile") {
2507: _WriteBeanGraphFile = new java.io.File(childNodeValue);
2508: } else if (childNodeName == "readBeanGraphFiles") {
2509: java.io.File aReadBeanGraphFiles;
2510: aReadBeanGraphFiles = new java.io.File(childNodeValue);
2511: _ReadBeanGraphFiles.add(aReadBeanGraphFiles);
2512: } else if (childNodeName == "readBeanGraphs") {
2513: org.netbeans.modules.schema2beansdev.beangraph.BeanGraph aReadBeanGraphs;
2514: // Don't know how to create a org.netbeans.modules.schema2beansdev.beangraph.BeanGraph
2515: } else if (childNodeName == "minFeatures") {
2516: if (childNode.getFirstChild() == null)
2517: _MinFeatures = true;
2518: else
2519: _MinFeatures = java.lang.Boolean.valueOf(
2520: childNodeValue).booleanValue();
2521: _isSet_MinFeatures = true;
2522: } else if (childNodeName == "forME") {
2523: if (childNode.getFirstChild() == null)
2524: _ForME = true;
2525: else
2526: _ForME = java.lang.Boolean.valueOf(childNodeValue)
2527: .booleanValue();
2528: _isSet_ForME = true;
2529: } else if (childNodeName == "generateTagsFile") {
2530: if (childNode.getFirstChild() == null)
2531: _GenerateTagsFile = true;
2532: else
2533: _GenerateTagsFile = java.lang.Boolean.valueOf(
2534: childNodeValue).booleanValue();
2535: _isSet_GenerateTagsFile = true;
2536: } else if (childNodeName == "codeGeneratorFactory") {
2537: // Don't know how to create a org.netbeans.modules.schema2beansdev.CodeGeneratorFactory
2538: } else if (childNodeName == "generateTimeStamp") {
2539: if (childNode.getFirstChild() == null)
2540: _GenerateTimeStamp = true;
2541: else
2542: _GenerateTimeStamp = java.lang.Boolean.valueOf(
2543: childNodeValue).booleanValue();
2544: _isSet_GenerateTimeStamp = true;
2545: } else if (childNodeName == "quiet") {
2546: if (childNode.getFirstChild() == null)
2547: _Quiet = true;
2548: else
2549: _Quiet = java.lang.Boolean.valueOf(childNodeValue)
2550: .booleanValue();
2551: _isSet_Quiet = true;
2552: } else if (childNodeName == "writeConfig") {
2553: _WriteConfig = new java.io.File(childNodeValue);
2554: } else if (childNodeName == "readConfig") {
2555: java.io.File aReadConfig;
2556: aReadConfig = new java.io.File(childNodeValue);
2557: _ReadConfig.add(aReadConfig);
2558: } else if (childNodeName == "makeDefaults") {
2559: if (childNode.getFirstChild() == null)
2560: _MakeDefaults = true;
2561: else
2562: _MakeDefaults = java.lang.Boolean.valueOf(
2563: childNodeValue).booleanValue();
2564: _isSet_MakeDefaults = true;
2565: } else if (childNodeName == "setDefaults") {
2566: if (childNode.getFirstChild() == null)
2567: _SetDefaults = true;
2568: else
2569: _SetDefaults = java.lang.Boolean.valueOf(
2570: childNodeValue).booleanValue();
2571: _isSet_SetDefaults = true;
2572: } else if (childNodeName == "trimNonStrings") {
2573: if (childNode.getFirstChild() == null)
2574: _TrimNonStrings = true;
2575: else
2576: _TrimNonStrings = java.lang.Boolean.valueOf(
2577: childNodeValue).booleanValue();
2578: _isSet_TrimNonStrings = true;
2579: } else if (childNodeName == "useRuntime") {
2580: if (childNode.getFirstChild() == null)
2581: _UseRuntime = true;
2582: else
2583: _UseRuntime = java.lang.Boolean.valueOf(
2584: childNodeValue).booleanValue();
2585: _isSet_UseRuntime = true;
2586: } else if (childNodeName == "extendBaseBean") {
2587: if (childNode.getFirstChild() == null)
2588: _ExtendBaseBean = true;
2589: else
2590: _ExtendBaseBean = java.lang.Boolean.valueOf(
2591: childNodeValue).booleanValue();
2592: _isSet_ExtendBaseBean = true;
2593: } else if (childNodeName == "finder") {
2594: java.lang.String aFinder;
2595: aFinder = childNodeValue;
2596: _Finder.add(aFinder);
2597: } else if (childNodeName == "target") {
2598: _Target = childNodeValue;
2599: } else if (childNodeName == "staxProduceXMLEventReader") {
2600: if (childNode.getFirstChild() == null)
2601: _StaxProduceXMLEventReader = true;
2602: else
2603: _StaxProduceXMLEventReader = java.lang.Boolean
2604: .valueOf(childNodeValue).booleanValue();
2605: _isSet_StaxProduceXMLEventReader = true;
2606: } else if (childNodeName == "staxUseXMLEventReader") {
2607: if (childNode.getFirstChild() == null)
2608: _StaxUseXMLEventReader = true;
2609: else
2610: _StaxUseXMLEventReader = java.lang.Boolean.valueOf(
2611: childNodeValue).booleanValue();
2612: _isSet_StaxUseXMLEventReader = true;
2613: } else if (childNodeName == "optionalScalars") {
2614: if (childNode.getFirstChild() == null)
2615: _OptionalScalars = true;
2616: else
2617: _OptionalScalars = java.lang.Boolean.valueOf(
2618: childNodeValue).booleanValue();
2619: _isSet_OptionalScalars = true;
2620: } else if (childNodeName == "defaultElementType") {
2621: _DefaultElementType = childNodeValue;
2622: } else if (childNodeName == "respectExtension") {
2623: if (childNode.getFirstChild() == null)
2624: _RespectExtension = true;
2625: else
2626: _RespectExtension = java.lang.Boolean.valueOf(
2627: childNodeValue).booleanValue();
2628: _isSet_RespectExtension = true;
2629: } else if (childNodeName == "logSuspicious") {
2630: if (childNode.getFirstChild() == null)
2631: _LogSuspicious = true;
2632: else
2633: _LogSuspicious = java.lang.Boolean.valueOf(
2634: childNodeValue).booleanValue();
2635: _isSet_LogSuspicious = true;
2636: } else {
2637: // Found extra unrecognized childNode
2638: }
2639: }
2640: }
2641:
2642: /**
2643: * Takes some text to be printed into an XML stream and escapes any
2644: * characters that might make it invalid XML (like '<').
2645: */
2646: public static void writeXML(java.io.Writer out, String msg)
2647: throws java.io.IOException {
2648: writeXML(out, msg, true);
2649: }
2650:
2651: public static void writeXML(java.io.Writer out, String msg,
2652: boolean attribute) throws java.io.IOException {
2653: if (msg == null)
2654: return;
2655: int msgLength = msg.length();
2656: for (int i = 0; i < msgLength; ++i) {
2657: char c = msg.charAt(i);
2658: writeXML(out, c, attribute);
2659: }
2660: }
2661:
2662: public static void writeXML(java.io.Writer out, char msg,
2663: boolean attribute) throws java.io.IOException {
2664: if (msg == '&')
2665: out.write("&");
2666: else if (msg == '<')
2667: out.write("<");
2668: else if (msg == '>')
2669: out.write(">");
2670: else if (attribute) {
2671: if (msg == '"')
2672: out.write(""");
2673: else if (msg == '\'')
2674: out.write("'");
2675: else if (msg == '\n')
2676: out.write("
");
2677: else if (msg == '\t')
2678: out.write("	");
2679: else
2680: out.write(msg);
2681: } else
2682: out.write(msg);
2683: }
2684:
2685: public static class ValidateException extends Exception {
2686: private java.lang.Object failedBean;
2687: private String failedPropertyName;
2688: private FailureType failureType;
2689:
2690: public ValidateException(String msg, String failedPropertyName,
2691: java.lang.Object failedBean) {
2692: super (msg);
2693: this .failedBean = failedBean;
2694: this .failedPropertyName = failedPropertyName;
2695: }
2696:
2697: public ValidateException(String msg, FailureType ft,
2698: String failedPropertyName, java.lang.Object failedBean) {
2699: super (msg);
2700: this .failureType = ft;
2701: this .failedBean = failedBean;
2702: this .failedPropertyName = failedPropertyName;
2703: }
2704:
2705: public String getFailedPropertyName() {
2706: return failedPropertyName;
2707: }
2708:
2709: public FailureType getFailureType() {
2710: return failureType;
2711: }
2712:
2713: public java.lang.Object getFailedBean() {
2714: return failedBean;
2715: }
2716:
2717: public static class FailureType {
2718: private final String name;
2719:
2720: private FailureType(String name) {
2721: this .name = name;
2722: }
2723:
2724: public String toString() {
2725: return name;
2726: }
2727:
2728: public static final FailureType NULL_VALUE = new FailureType(
2729: "NULL_VALUE");
2730: public static final FailureType DATA_RESTRICTION = new FailureType(
2731: "DATA_RESTRICTION");
2732: public static final FailureType ENUM_RESTRICTION = new FailureType(
2733: "ENUM_RESTRICTION");
2734: public static final FailureType ALL_RESTRICTIONS = new FailureType(
2735: "ALL_RESTRICTIONS");
2736: public static final FailureType MUTUALLY_EXCLUSIVE = new FailureType(
2737: "MUTUALLY_EXCLUSIVE");
2738: }
2739: }
2740:
2741: public void validate()
2742: throws org.netbeans.modules.schema2beansdev.S2bConfig.ValidateException {
2743: boolean restrictionFailure = false;
2744: boolean restrictionPassed = false;
2745: // Validating property schemaType
2746: if (getSchemaType() == null) {
2747: throw new org.netbeans.modules.schema2beansdev.S2bConfig.ValidateException(
2748: "getSchemaType() == null",
2749: org.netbeans.modules.schema2beansdev.S2bConfig.ValidateException.FailureType.NULL_VALUE,
2750: "schemaType", this ); // NOI18N
2751: }
2752: // Validating property traceParse
2753: // Validating property traceGen
2754: // Validating property traceMisc
2755: // Validating property traceDot
2756: // Validating property filename
2757: // Validating property fileIn
2758: // Validating property docRoot
2759: // Validating property rootDir
2760: if (getRootDir() == null) {
2761: throw new org.netbeans.modules.schema2beansdev.S2bConfig.ValidateException(
2762: "getRootDir() == null",
2763: org.netbeans.modules.schema2beansdev.S2bConfig.ValidateException.FailureType.NULL_VALUE,
2764: "rootDir", this ); // NOI18N
2765: }
2766: // Validating property packagePath
2767: // Validating property indent
2768: if (getIndent() == null) {
2769: throw new org.netbeans.modules.schema2beansdev.S2bConfig.ValidateException(
2770: "getIndent() == null",
2771: org.netbeans.modules.schema2beansdev.S2bConfig.ValidateException.FailureType.NULL_VALUE,
2772: "indent", this ); // NOI18N
2773: }
2774: // Validating property indentAmount
2775: // Validating property mddFile
2776: // Validating property mddIn
2777: // Validating property metaDD
2778: // Validating property doGeneration
2779: // Validating property scalarException
2780: // Validating property dumpToString
2781: // Validating property vetoable
2782: // Validating property standalone
2783: // Validating property auto
2784: // Validating property messageOut
2785: // Validating property outputStreamProvider
2786: // Validating property throwErrors
2787: // Validating property generateXMLIO
2788: // Validating property generateValidate
2789: // Validating property generatePropertyEvents
2790: // Validating property generateStoreEvents
2791: // Validating property generateTransactions
2792: // Validating property attributesAsProperties
2793: // Validating property generateDelegator
2794: // Validating property delegateDir
2795: // Validating property delegatePackage
2796: // Validating property generateCommonInterface
2797: // Validating property defaultsAccessable
2798: // Validating property useInterfaces
2799: // Validating property generateInterfaces
2800: // Validating property keepElementPositions
2801: // Validating property removeUnreferencedNodes
2802: // Validating property inputURI
2803: // Validating property indexedPropertyType
2804: if (getIndexedPropertyType() == null) {
2805: throw new org.netbeans.modules.schema2beansdev.S2bConfig.ValidateException(
2806: "getIndexedPropertyType() == null",
2807: org.netbeans.modules.schema2beansdev.S2bConfig.ValidateException.FailureType.NULL_VALUE,
2808: "indexedPropertyType", this ); // NOI18N
2809: }
2810: // Validating property doCompile
2811: // Validating property generateSwitches
2812: // Validating property dumpBeanTree
2813: // Validating property generateDotGraph
2814: // Validating property processComments
2815: // Validating property processDocType
2816: // Validating property checkUpToDate
2817: // Validating property generateParentRefs
2818: // Validating property generateHasChanged
2819: // Validating property newestSourceTime
2820: // Validating property writeBeanGraphFile
2821: // Validating property readBeanGraphFiles
2822: // Validating property readBeanGraphs
2823: // Validating property minFeatures
2824: // Validating property forME
2825: // Validating property generateTagsFile
2826: // Validating property codeGeneratorFactory
2827: // Validating property generateTimeStamp
2828: // Validating property quiet
2829: // Validating property writeConfig
2830: // Validating property readConfig
2831: // Validating property makeDefaults
2832: // Validating property setDefaults
2833: // Validating property trimNonStrings
2834: // Validating property useRuntime
2835: // Validating property extendBaseBean
2836: // Validating property finder
2837: // Validating property target
2838: // Validating property staxProduceXMLEventReader
2839: // Validating property staxUseXMLEventReader
2840: // Validating property optionalScalars
2841: // Validating property defaultElementType
2842: // Validating property respectExtension
2843: // Validating property logSuspicious
2844: }
2845:
2846: /**
2847: * @return true if error, then should display help
2848: */
2849: public boolean parseArguments(String[] args) {
2850: for (int argNum = 0, size = args.length; argNum < size; ++argNum) {
2851: String arg = args[argNum].toLowerCase().intern();
2852: if (arg == "-f") {
2853: if (argNum + 1 >= size) {
2854: missingArgument(args, arg);
2855: continue;
2856: }
2857: setFilename(new java.io.File(args[++argNum]));
2858: continue;
2859: }
2860: if (arg == "-d") {
2861: if (argNum + 1 >= size) {
2862: missingArgument(args, arg);
2863: continue;
2864: }
2865: setDocRoot(args[++argNum]);
2866: continue;
2867: }
2868: if (arg == "-r") {
2869: if (argNum + 1 >= size) {
2870: missingArgument(args, arg);
2871: continue;
2872: }
2873: setRootDir(new java.io.File(args[++argNum]));
2874: continue;
2875: }
2876: if (arg == "-p") {
2877: if (argNum + 1 >= size) {
2878: missingArgument(args, arg);
2879: continue;
2880: }
2881: setPackagePath(args[++argNum]);
2882: continue;
2883: }
2884: if (arg == "-sp") {
2885: if (argNum + 1 >= size) {
2886: missingArgument(args, arg);
2887: continue;
2888: }
2889: setIndentAmount(Integer.parseInt(args[++argNum]));
2890: continue;
2891: }
2892: if (arg == "-mdd") {
2893: if (argNum + 1 >= size) {
2894: missingArgument(args, arg);
2895: continue;
2896: }
2897: setMddFile(new java.io.File(args[++argNum]));
2898: continue;
2899: }
2900: if (arg == "-noe") {
2901: setScalarException(true);
2902: continue;
2903: }
2904: if (arg == "-nonoe") {
2905: setScalarException(false);
2906: continue;
2907: }
2908: if (arg == "-ts") {
2909: setDumpToString(true);
2910: continue;
2911: }
2912: if (arg == "-nots") {
2913: setDumpToString(false);
2914: continue;
2915: }
2916: if (arg == "-veto") {
2917: setVetoable(true);
2918: continue;
2919: }
2920: if (arg == "-noveto") {
2921: setVetoable(false);
2922: continue;
2923: }
2924: if (arg == "-st") {
2925: setStandalone(true);
2926: continue;
2927: }
2928: if (arg == "-nost") {
2929: setStandalone(false);
2930: continue;
2931: }
2932: if (arg == "-auto") {
2933: setAuto(true);
2934: continue;
2935: }
2936: if (arg == "-noauto") {
2937: setAuto(false);
2938: continue;
2939: }
2940: if (arg == "-throw") {
2941: setThrowErrors(true);
2942: continue;
2943: }
2944: if (arg == "-nothrow") {
2945: setThrowErrors(false);
2946: continue;
2947: }
2948: if (arg == "-validate") {
2949: setGenerateValidate(true);
2950: continue;
2951: }
2952: if (arg == "-novalidate") {
2953: setGenerateValidate(false);
2954: continue;
2955: }
2956: if (arg == "-propertyevents") {
2957: setGeneratePropertyEvents(true);
2958: continue;
2959: }
2960: if (arg == "-nopropertyevents") {
2961: setGeneratePropertyEvents(false);
2962: continue;
2963: }
2964: if (arg == "-transactions") {
2965: setGenerateTransactions(true);
2966: continue;
2967: }
2968: if (arg == "-notransactions") {
2969: setGenerateTransactions(false);
2970: continue;
2971: }
2972: if (arg == "-attrprop") {
2973: setAttributesAsProperties(true);
2974: continue;
2975: }
2976: if (arg == "-noattrprop") {
2977: setAttributesAsProperties(false);
2978: continue;
2979: }
2980: if (arg == "-delegator") {
2981: setGenerateDelegator(true);
2982: continue;
2983: }
2984: if (arg == "-nodelegator") {
2985: setGenerateDelegator(false);
2986: continue;
2987: }
2988: if (arg == "-delegatedir") {
2989: if (argNum + 1 >= size) {
2990: missingArgument(args, arg);
2991: continue;
2992: }
2993: setDelegateDir(new java.io.File(args[++argNum]));
2994: continue;
2995: }
2996: if (arg == "-delegatepackage") {
2997: if (argNum + 1 >= size) {
2998: missingArgument(args, arg);
2999: continue;
3000: }
3001: setDelegatePackage(args[++argNum]);
3002: continue;
3003: }
3004: if (arg == "-commoninterfacename") {
3005: if (argNum + 1 >= size) {
3006: missingArgument(args, arg);
3007: continue;
3008: }
3009: setGenerateCommonInterface(args[++argNum]);
3010: continue;
3011: }
3012: if (arg == "-defaultsaccessable") {
3013: setDefaultsAccessable(true);
3014: continue;
3015: }
3016: if (arg == "-nodefaultsaccessable") {
3017: setDefaultsAccessable(false);
3018: continue;
3019: }
3020: if (arg == "-useinterfaces") {
3021: setUseInterfaces(true);
3022: continue;
3023: }
3024: if (arg == "-nouseinterfaces") {
3025: setUseInterfaces(false);
3026: continue;
3027: }
3028: if (arg == "-geninterfaces") {
3029: setGenerateInterfaces(true);
3030: continue;
3031: }
3032: if (arg == "-nogeninterfaces") {
3033: setGenerateInterfaces(false);
3034: continue;
3035: }
3036: if (arg == "-keepelementpositions") {
3037: setKeepElementPositions(true);
3038: continue;
3039: }
3040: if (arg == "-nokeepelementpositions") {
3041: setKeepElementPositions(false);
3042: continue;
3043: }
3044: if (arg == "-removeunreferencednodes") {
3045: setRemoveUnreferencedNodes(true);
3046: continue;
3047: }
3048: if (arg == "-noremoveunreferencednodes") {
3049: setRemoveUnreferencedNodes(false);
3050: continue;
3051: }
3052: if (arg == "-indexedpropertytype") {
3053: if (argNum + 1 >= size) {
3054: missingArgument(args, arg);
3055: continue;
3056: }
3057: setIndexedPropertyType(args[++argNum]);
3058: continue;
3059: }
3060: if (arg == "-compile") {
3061: setDoCompile(true);
3062: continue;
3063: }
3064: if (arg == "-nocompile") {
3065: setDoCompile(false);
3066: continue;
3067: }
3068: if (arg == "-generateswitches") {
3069: setGenerateSwitches(true);
3070: continue;
3071: }
3072: if (arg == "-nogenerateswitches") {
3073: setGenerateSwitches(false);
3074: continue;
3075: }
3076: if (arg == "-dumpbeantree") {
3077: if (argNum + 1 >= size) {
3078: missingArgument(args, arg);
3079: continue;
3080: }
3081: setDumpBeanTree(new java.io.File(args[++argNum]));
3082: continue;
3083: }
3084: if (arg == "-gendotgraph") {
3085: if (argNum + 1 >= size) {
3086: missingArgument(args, arg);
3087: continue;
3088: }
3089: setGenerateDotGraph(new java.io.File(args[++argNum]));
3090: continue;
3091: }
3092: if (arg == "-comments") {
3093: setProcessComments(true);
3094: continue;
3095: }
3096: if (arg == "-nocomments") {
3097: setProcessComments(false);
3098: continue;
3099: }
3100: if (arg == "-doctype") {
3101: setProcessDocType(true);
3102: continue;
3103: }
3104: if (arg == "-nodoctype") {
3105: setProcessDocType(false);
3106: continue;
3107: }
3108: if (arg == "-checkuptodate") {
3109: setCheckUpToDate(true);
3110: continue;
3111: }
3112: if (arg == "-nocheckuptodate") {
3113: setCheckUpToDate(false);
3114: continue;
3115: }
3116: if (arg == "-haschanged") {
3117: setGenerateHasChanged(true);
3118: continue;
3119: }
3120: if (arg == "-nohaschanged") {
3121: setGenerateHasChanged(false);
3122: continue;
3123: }
3124: if (arg == "-writebeangraph") {
3125: if (argNum + 1 >= size) {
3126: missingArgument(args, arg);
3127: continue;
3128: }
3129: setWriteBeanGraphFile(new java.io.File(args[++argNum]));
3130: continue;
3131: }
3132: if (arg == "-readbeangraph") {
3133: if (argNum + 1 >= size) {
3134: missingArgument(args, arg);
3135: continue;
3136: }
3137: addReadBeanGraphFiles(new java.io.File(args[++argNum]));
3138: continue;
3139: }
3140: if (arg == "-min") {
3141: setMinFeatures(true);
3142: continue;
3143: }
3144: if (arg == "-nomin") {
3145: setMinFeatures(false);
3146: continue;
3147: }
3148: if (arg == "-forme") {
3149: setForME(true);
3150: continue;
3151: }
3152: if (arg == "-noforme") {
3153: setForME(false);
3154: continue;
3155: }
3156: if (arg == "-tagsfile") {
3157: setGenerateTagsFile(true);
3158: continue;
3159: }
3160: if (arg == "-notagsfile") {
3161: setGenerateTagsFile(false);
3162: continue;
3163: }
3164: if (arg == "-generatetimestamp") {
3165: setGenerateTimeStamp(true);
3166: continue;
3167: }
3168: if (arg == "-nogeneratetimestamp") {
3169: setGenerateTimeStamp(false);
3170: continue;
3171: }
3172: if (arg == "-quiet") {
3173: setQuiet(true);
3174: continue;
3175: }
3176: if (arg == "-noquiet") {
3177: setQuiet(false);
3178: continue;
3179: }
3180: if (arg == "-writeconfig") {
3181: if (argNum + 1 >= size) {
3182: missingArgument(args, arg);
3183: continue;
3184: }
3185: setWriteConfig(new java.io.File(args[++argNum]));
3186: continue;
3187: }
3188: if (arg == "-readconfig") {
3189: if (argNum + 1 >= size) {
3190: missingArgument(args, arg);
3191: continue;
3192: }
3193: addReadConfig(new java.io.File(args[++argNum]));
3194: continue;
3195: }
3196: if (arg == "-makedefaults") {
3197: setMakeDefaults(true);
3198: continue;
3199: }
3200: if (arg == "-nomakedefaults") {
3201: setMakeDefaults(false);
3202: continue;
3203: }
3204: if (arg == "-setdefaults") {
3205: setSetDefaults(true);
3206: continue;
3207: }
3208: if (arg == "-nosetdefaults") {
3209: setSetDefaults(false);
3210: continue;
3211: }
3212: if (arg == "-trimnonstrings") {
3213: setTrimNonStrings(true);
3214: continue;
3215: }
3216: if (arg == "-notrimnonstrings") {
3217: setTrimNonStrings(false);
3218: continue;
3219: }
3220: if (arg == "-useruntime") {
3221: setUseRuntime(true);
3222: continue;
3223: }
3224: if (arg == "-nouseruntime") {
3225: setUseRuntime(false);
3226: continue;
3227: }
3228: if (arg == "-extendbasebean") {
3229: setExtendBaseBean(true);
3230: continue;
3231: }
3232: if (arg == "-noextendbasebean") {
3233: setExtendBaseBean(false);
3234: continue;
3235: }
3236: if (arg == "-finder") {
3237: if (argNum + 1 >= size) {
3238: missingArgument(args, arg);
3239: continue;
3240: }
3241: addFinder(args[++argNum]);
3242: continue;
3243: }
3244: if (arg == "-target") {
3245: if (argNum + 1 >= size) {
3246: missingArgument(args, arg);
3247: continue;
3248: }
3249: setTarget(args[++argNum]);
3250: continue;
3251: }
3252: if (arg == "-staxproducexmleventreader") {
3253: setStaxProduceXMLEventReader(true);
3254: continue;
3255: }
3256: if (arg == "-nostaxproducexmleventreader") {
3257: setStaxProduceXMLEventReader(false);
3258: continue;
3259: }
3260: if (arg == "-staxusexmleventreader") {
3261: setStaxUseXMLEventReader(true);
3262: continue;
3263: }
3264: if (arg == "-nostaxusexmleventreader") {
3265: setStaxUseXMLEventReader(false);
3266: continue;
3267: }
3268: if (arg == "-optionalscalars") {
3269: setOptionalScalars(true);
3270: continue;
3271: }
3272: if (arg == "-nooptionalscalars") {
3273: setOptionalScalars(false);
3274: continue;
3275: }
3276: if (arg == "-defaultelementtype") {
3277: if (argNum + 1 >= size) {
3278: missingArgument(args, arg);
3279: continue;
3280: }
3281: setDefaultElementType(args[++argNum]);
3282: continue;
3283: }
3284: if (arg == "-respectextension") {
3285: setRespectExtension(true);
3286: continue;
3287: }
3288: if (arg == "-norespectextension") {
3289: setRespectExtension(false);
3290: continue;
3291: }
3292: if (arg == "-logsuspicious") {
3293: setLogSuspicious(true);
3294: continue;
3295: }
3296: if (arg == "-nologsuspicious") {
3297: setLogSuspicious(false);
3298: continue;
3299: }
3300: if (arg == "-help" || arg == "--help") {
3301: return true;
3302: }
3303: argNum = unknownArgument(args, arg, argNum);
3304: }
3305: return false;
3306: }
3307:
3308: protected int unknownArgument(String[] args, String arg, int argNum) {
3309: throw new IllegalArgumentException("Found unknown argument '"
3310: + arg + "'");
3311: }
3312:
3313: protected void missingArgument(String[] args, String arg) {
3314: throw new IllegalArgumentException(
3315: "Not enough arguments. Need 1 more for '" + arg + "'");
3316: }
3317:
3318: protected void missingMandatoryArgument(String arg) {
3319: throw new IllegalArgumentException("Missing argument '" + arg
3320: + "'");
3321: }
3322:
3323: public void showHelp(java.io.PrintStream out) {
3324: out
3325: .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] [-target target]\n [-staxProduceXMLEventReader] [-nostaxProduceXMLEventReader] [-staxUseXMLEventReader] [-nostaxUseXMLEventReader]\n [-optionalScalars] [-nooptionalScalars] [-defaultElementType defaultElementType]\n [-respectExtension] [-norespectExtension] [-logSuspicious] [-nologSuspicious]\n");
3326: out
3327: .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 -target\tTarget JDK to generate for.\n -staxProduceXMLEventReader\tProduce a StAX XMLEventReader to read the beans as if they were XML.\n -staxUseXMLEventReader\tUse an StAX XMLEventReader for reading the beans.\n -optionalScalars\tWhether or not scalars can be optional. Default: false. Recommended: true.\n -defaultElementType\tWhen a type cannot be figured out, use this type. Default: \"{http://www.w3.org/2001/XMLSchema}boolean\".\n -respectExtension\tTake advantage of when an extension is defined in the schema.\n -logSuspicious\tLog suspicious things.\n");
3328: }
3329:
3330: public void changePropertyByName(String name, Object value) {
3331: if (name == null)
3332: return;
3333: name = name.intern();
3334: if (name == "schemaType")
3335: setSchemaType((java.lang.String) value);
3336: else if (name == "traceParse")
3337: setTraceParse(((java.lang.Boolean) value).booleanValue());
3338: else if (name == "traceGen")
3339: setTraceGen(((java.lang.Boolean) value).booleanValue());
3340: else if (name == "traceMisc")
3341: setTraceMisc(((java.lang.Boolean) value).booleanValue());
3342: else if (name == "traceDot")
3343: setTraceDot(((java.lang.Boolean) value).booleanValue());
3344: else if (name == "filename")
3345: setFilename((java.io.File) value);
3346: else if (name == "fileIn")
3347: setFileIn((java.io.InputStream) value);
3348: else if (name == "docRoot")
3349: setDocRoot((java.lang.String) value);
3350: else if (name == "rootDir")
3351: setRootDir((java.io.File) value);
3352: else if (name == "packagePath")
3353: setPackagePath((java.lang.String) value);
3354: else if (name == "indent")
3355: setIndent((java.lang.String) value);
3356: else if (name == "indentAmount")
3357: setIndentAmount(((java.lang.Integer) value).intValue());
3358: else if (name == "mddFile")
3359: setMddFile((java.io.File) value);
3360: else if (name == "mddIn")
3361: setMddIn((java.io.InputStream) value);
3362: else if (name == "metaDD")
3363: setMetaDD((org.netbeans.modules.schema2beansdev.metadd.MetaDD) value);
3364: else if (name == "doGeneration")
3365: setDoGeneration(((java.lang.Boolean) value).booleanValue());
3366: else if (name == "scalarException")
3367: setScalarException(((java.lang.Boolean) value)
3368: .booleanValue());
3369: else if (name == "dumpToString")
3370: setDumpToString(((java.lang.Boolean) value).booleanValue());
3371: else if (name == "vetoable")
3372: setVetoable(((java.lang.Boolean) value).booleanValue());
3373: else if (name == "standalone")
3374: setStandalone(((java.lang.Boolean) value).booleanValue());
3375: else if (name == "auto")
3376: setAuto(((java.lang.Boolean) value).booleanValue());
3377: else if (name == "messageOut")
3378: setMessageOut((java.io.PrintStream) value);
3379: else if (name == "outputStreamProvider")
3380: setOutputStreamProvider((org.netbeans.modules.schema2beansdev.GenBeans.OutputStreamProvider) value);
3381: else if (name == "throwErrors")
3382: setThrowErrors(((java.lang.Boolean) value).booleanValue());
3383: else if (name == "generateXMLIO")
3384: setGenerateXMLIO(((java.lang.Boolean) value).booleanValue());
3385: else if (name == "generateValidate")
3386: setGenerateValidate(((java.lang.Boolean) value)
3387: .booleanValue());
3388: else if (name == "generatePropertyEvents")
3389: setGeneratePropertyEvents(((java.lang.Boolean) value)
3390: .booleanValue());
3391: else if (name == "generateStoreEvents")
3392: setGenerateStoreEvents(((java.lang.Boolean) value)
3393: .booleanValue());
3394: else if (name == "generateTransactions")
3395: setGenerateTransactions(((java.lang.Boolean) value)
3396: .booleanValue());
3397: else if (name == "attributesAsProperties")
3398: setAttributesAsProperties(((java.lang.Boolean) value)
3399: .booleanValue());
3400: else if (name == "generateDelegator")
3401: setGenerateDelegator(((java.lang.Boolean) value)
3402: .booleanValue());
3403: else if (name == "delegateDir")
3404: setDelegateDir((java.io.File) value);
3405: else if (name == "delegatePackage")
3406: setDelegatePackage((java.lang.String) value);
3407: else if (name == "generateCommonInterface")
3408: setGenerateCommonInterface((java.lang.String) value);
3409: else if (name == "defaultsAccessable")
3410: setDefaultsAccessable(((java.lang.Boolean) value)
3411: .booleanValue());
3412: else if (name == "useInterfaces")
3413: setUseInterfaces(((java.lang.Boolean) value).booleanValue());
3414: else if (name == "generateInterfaces")
3415: setGenerateInterfaces(((java.lang.Boolean) value)
3416: .booleanValue());
3417: else if (name == "keepElementPositions")
3418: setKeepElementPositions(((java.lang.Boolean) value)
3419: .booleanValue());
3420: else if (name == "removeUnreferencedNodes")
3421: setRemoveUnreferencedNodes(((java.lang.Boolean) value)
3422: .booleanValue());
3423: else if (name == "inputURI")
3424: setInputURI((java.lang.String) value);
3425: else if (name == "indexedPropertyType")
3426: setIndexedPropertyType((java.lang.String) value);
3427: else if (name == "doCompile")
3428: setDoCompile(((java.lang.Boolean) value).booleanValue());
3429: else if (name == "generateSwitches")
3430: setGenerateSwitches(((java.lang.Boolean) value)
3431: .booleanValue());
3432: else if (name == "dumpBeanTree")
3433: setDumpBeanTree((java.io.File) value);
3434: else if (name == "generateDotGraph")
3435: setGenerateDotGraph((java.io.File) value);
3436: else if (name == "processComments")
3437: setProcessComments(((java.lang.Boolean) value)
3438: .booleanValue());
3439: else if (name == "processDocType")
3440: setProcessDocType(((java.lang.Boolean) value)
3441: .booleanValue());
3442: else if (name == "checkUpToDate")
3443: setCheckUpToDate(((java.lang.Boolean) value).booleanValue());
3444: else if (name == "generateParentRefs")
3445: setGenerateParentRefs(((java.lang.Boolean) value)
3446: .booleanValue());
3447: else if (name == "generateHasChanged")
3448: setGenerateHasChanged(((java.lang.Boolean) value)
3449: .booleanValue());
3450: else if (name == "newestSourceTime")
3451: setNewestSourceTime(((java.lang.Long) value).longValue());
3452: else if (name == "writeBeanGraphFile")
3453: setWriteBeanGraphFile((java.io.File) value);
3454: else if (name == "readBeanGraphFiles")
3455: addReadBeanGraphFiles((java.io.File) value);
3456: else if (name == "readBeanGraphFiles[]")
3457: setReadBeanGraphFiles((java.io.File[]) value);
3458: else if (name == "readBeanGraphs")
3459: addReadBeanGraphs((org.netbeans.modules.schema2beansdev.beangraph.BeanGraph) value);
3460: else if (name == "readBeanGraphs[]")
3461: setReadBeanGraphs((org.netbeans.modules.schema2beansdev.beangraph.BeanGraph[]) value);
3462: else if (name == "minFeatures")
3463: setMinFeatures(((java.lang.Boolean) value).booleanValue());
3464: else if (name == "forME")
3465: setForME(((java.lang.Boolean) value).booleanValue());
3466: else if (name == "generateTagsFile")
3467: setGenerateTagsFile(((java.lang.Boolean) value)
3468: .booleanValue());
3469: else if (name == "codeGeneratorFactory")
3470: setCodeGeneratorFactory((org.netbeans.modules.schema2beansdev.CodeGeneratorFactory) value);
3471: else if (name == "generateTimeStamp")
3472: setGenerateTimeStamp(((java.lang.Boolean) value)
3473: .booleanValue());
3474: else if (name == "quiet")
3475: setQuiet(((java.lang.Boolean) value).booleanValue());
3476: else if (name == "writeConfig")
3477: setWriteConfig((java.io.File) value);
3478: else if (name == "readConfig")
3479: addReadConfig((java.io.File) value);
3480: else if (name == "readConfig[]")
3481: setReadConfig((java.io.File[]) value);
3482: else if (name == "makeDefaults")
3483: setMakeDefaults(((java.lang.Boolean) value).booleanValue());
3484: else if (name == "setDefaults")
3485: setSetDefaults(((java.lang.Boolean) value).booleanValue());
3486: else if (name == "trimNonStrings")
3487: setTrimNonStrings(((java.lang.Boolean) value)
3488: .booleanValue());
3489: else if (name == "useRuntime")
3490: setUseRuntime(((java.lang.Boolean) value).booleanValue());
3491: else if (name == "extendBaseBean")
3492: setExtendBaseBean(((java.lang.Boolean) value)
3493: .booleanValue());
3494: else if (name == "finder")
3495: addFinder((java.lang.String) value);
3496: else if (name == "finder[]")
3497: setFinder((java.lang.String[]) value);
3498: else if (name == "target")
3499: setTarget((java.lang.String) value);
3500: else if (name == "staxProduceXMLEventReader")
3501: setStaxProduceXMLEventReader(((java.lang.Boolean) value)
3502: .booleanValue());
3503: else if (name == "staxUseXMLEventReader")
3504: setStaxUseXMLEventReader(((java.lang.Boolean) value)
3505: .booleanValue());
3506: else if (name == "optionalScalars")
3507: setOptionalScalars(((java.lang.Boolean) value)
3508: .booleanValue());
3509: else if (name == "defaultElementType")
3510: setDefaultElementType((java.lang.String) value);
3511: else if (name == "respectExtension")
3512: setRespectExtension(((java.lang.Boolean) value)
3513: .booleanValue());
3514: else if (name == "logSuspicious")
3515: setLogSuspicious(((java.lang.Boolean) value).booleanValue());
3516: else
3517: throw new IllegalArgumentException(name
3518: + " is not a valid property name for S2bConfig");
3519: }
3520:
3521: public Object fetchPropertyByName(String name) {
3522: if (name == "schemaType")
3523: return getSchemaType();
3524: if (name == "traceParse")
3525: return (isTraceParse() ? java.lang.Boolean.TRUE
3526: : java.lang.Boolean.FALSE);
3527: if (name == "traceGen")
3528: return (isTraceGen() ? java.lang.Boolean.TRUE
3529: : java.lang.Boolean.FALSE);
3530: if (name == "traceMisc")
3531: return (isTraceMisc() ? java.lang.Boolean.TRUE
3532: : java.lang.Boolean.FALSE);
3533: if (name == "traceDot")
3534: return (isTraceDot() ? java.lang.Boolean.TRUE
3535: : java.lang.Boolean.FALSE);
3536: if (name == "filename")
3537: return getFilename();
3538: if (name == "fileIn")
3539: return getFileIn();
3540: if (name == "docRoot")
3541: return getDocRoot();
3542: if (name == "rootDir")
3543: return getRootDir();
3544: if (name == "packagePath")
3545: return getPackagePath();
3546: if (name == "indent")
3547: return getIndent();
3548: if (name == "indentAmount")
3549: return new java.lang.Integer(getIndentAmount());
3550: if (name == "mddFile")
3551: return getMddFile();
3552: if (name == "mddIn")
3553: return getMddIn();
3554: if (name == "metaDD")
3555: return getMetaDD();
3556: if (name == "doGeneration")
3557: return (isDoGeneration() ? java.lang.Boolean.TRUE
3558: : java.lang.Boolean.FALSE);
3559: if (name == "scalarException")
3560: return (isScalarException() ? java.lang.Boolean.TRUE
3561: : java.lang.Boolean.FALSE);
3562: if (name == "dumpToString")
3563: return (isDumpToString() ? java.lang.Boolean.TRUE
3564: : java.lang.Boolean.FALSE);
3565: if (name == "vetoable")
3566: return (isVetoable() ? java.lang.Boolean.TRUE
3567: : java.lang.Boolean.FALSE);
3568: if (name == "standalone")
3569: return (isStandalone() ? java.lang.Boolean.TRUE
3570: : java.lang.Boolean.FALSE);
3571: if (name == "auto")
3572: return (isAuto() ? java.lang.Boolean.TRUE
3573: : java.lang.Boolean.FALSE);
3574: if (name == "messageOut")
3575: return getMessageOut();
3576: if (name == "outputStreamProvider")
3577: return getOutputStreamProvider();
3578: if (name == "throwErrors")
3579: return (isThrowErrors() ? java.lang.Boolean.TRUE
3580: : java.lang.Boolean.FALSE);
3581: if (name == "generateXMLIO")
3582: return (isGenerateXMLIO() ? java.lang.Boolean.TRUE
3583: : java.lang.Boolean.FALSE);
3584: if (name == "generateValidate")
3585: return (isGenerateValidate() ? java.lang.Boolean.TRUE
3586: : java.lang.Boolean.FALSE);
3587: if (name == "generatePropertyEvents")
3588: return (isGeneratePropertyEvents() ? java.lang.Boolean.TRUE
3589: : java.lang.Boolean.FALSE);
3590: if (name == "generateStoreEvents")
3591: return (isGenerateStoreEvents() ? java.lang.Boolean.TRUE
3592: : java.lang.Boolean.FALSE);
3593: if (name == "generateTransactions")
3594: return (isGenerateTransactions() ? java.lang.Boolean.TRUE
3595: : java.lang.Boolean.FALSE);
3596: if (name == "attributesAsProperties")
3597: return (isAttributesAsProperties() ? java.lang.Boolean.TRUE
3598: : java.lang.Boolean.FALSE);
3599: if (name == "generateDelegator")
3600: return (isGenerateDelegator() ? java.lang.Boolean.TRUE
3601: : java.lang.Boolean.FALSE);
3602: if (name == "delegateDir")
3603: return getDelegateDir();
3604: if (name == "delegatePackage")
3605: return getDelegatePackage();
3606: if (name == "generateCommonInterface")
3607: return getGenerateCommonInterface();
3608: if (name == "defaultsAccessable")
3609: return (isDefaultsAccessable() ? java.lang.Boolean.TRUE
3610: : java.lang.Boolean.FALSE);
3611: if (name == "useInterfaces")
3612: return (isUseInterfaces() ? java.lang.Boolean.TRUE
3613: : java.lang.Boolean.FALSE);
3614: if (name == "generateInterfaces")
3615: return (isGenerateInterfaces() ? java.lang.Boolean.TRUE
3616: : java.lang.Boolean.FALSE);
3617: if (name == "keepElementPositions")
3618: return (isKeepElementPositions() ? java.lang.Boolean.TRUE
3619: : java.lang.Boolean.FALSE);
3620: if (name == "removeUnreferencedNodes")
3621: return (isRemoveUnreferencedNodes() ? java.lang.Boolean.TRUE
3622: : java.lang.Boolean.FALSE);
3623: if (name == "inputURI")
3624: return getInputURI();
3625: if (name == "indexedPropertyType")
3626: return getIndexedPropertyType();
3627: if (name == "doCompile")
3628: return (isDoCompile() ? java.lang.Boolean.TRUE
3629: : java.lang.Boolean.FALSE);
3630: if (name == "generateSwitches")
3631: return (isGenerateSwitches() ? java.lang.Boolean.TRUE
3632: : java.lang.Boolean.FALSE);
3633: if (name == "dumpBeanTree")
3634: return getDumpBeanTree();
3635: if (name == "generateDotGraph")
3636: return getGenerateDotGraph();
3637: if (name == "processComments")
3638: return (isProcessComments() ? java.lang.Boolean.TRUE
3639: : java.lang.Boolean.FALSE);
3640: if (name == "processDocType")
3641: return (isProcessDocType() ? java.lang.Boolean.TRUE
3642: : java.lang.Boolean.FALSE);
3643: if (name == "checkUpToDate")
3644: return (isCheckUpToDate() ? java.lang.Boolean.TRUE
3645: : java.lang.Boolean.FALSE);
3646: if (name == "generateParentRefs")
3647: return (isGenerateParentRefs() ? java.lang.Boolean.TRUE
3648: : java.lang.Boolean.FALSE);
3649: if (name == "generateHasChanged")
3650: return (isGenerateHasChanged() ? java.lang.Boolean.TRUE
3651: : java.lang.Boolean.FALSE);
3652: if (name == "newestSourceTime")
3653: return new java.lang.Long(getNewestSourceTime());
3654: if (name == "writeBeanGraphFile")
3655: return getWriteBeanGraphFile();
3656: if (name == "readBeanGraphFiles[]")
3657: return getReadBeanGraphFiles();
3658: if (name == "readBeanGraphs[]")
3659: return getReadBeanGraphs();
3660: if (name == "minFeatures")
3661: return (isMinFeatures() ? java.lang.Boolean.TRUE
3662: : java.lang.Boolean.FALSE);
3663: if (name == "forME")
3664: return (isForME() ? java.lang.Boolean.TRUE
3665: : java.lang.Boolean.FALSE);
3666: if (name == "generateTagsFile")
3667: return (isGenerateTagsFile() ? java.lang.Boolean.TRUE
3668: : java.lang.Boolean.FALSE);
3669: if (name == "codeGeneratorFactory")
3670: return getCodeGeneratorFactory();
3671: if (name == "generateTimeStamp")
3672: return (isGenerateTimeStamp() ? java.lang.Boolean.TRUE
3673: : java.lang.Boolean.FALSE);
3674: if (name == "quiet")
3675: return (isQuiet() ? java.lang.Boolean.TRUE
3676: : java.lang.Boolean.FALSE);
3677: if (name == "writeConfig")
3678: return getWriteConfig();
3679: if (name == "readConfig[]")
3680: return getReadConfig();
3681: if (name == "makeDefaults")
3682: return (isMakeDefaults() ? java.lang.Boolean.TRUE
3683: : java.lang.Boolean.FALSE);
3684: if (name == "setDefaults")
3685: return (isSetDefaults() ? java.lang.Boolean.TRUE
3686: : java.lang.Boolean.FALSE);
3687: if (name == "trimNonStrings")
3688: return (isTrimNonStrings() ? java.lang.Boolean.TRUE
3689: : java.lang.Boolean.FALSE);
3690: if (name == "useRuntime")
3691: return (isUseRuntime() ? java.lang.Boolean.TRUE
3692: : java.lang.Boolean.FALSE);
3693: if (name == "extendBaseBean")
3694: return (isExtendBaseBean() ? java.lang.Boolean.TRUE
3695: : java.lang.Boolean.FALSE);
3696: if (name == "finder[]")
3697: return getFinder();
3698: if (name == "target")
3699: return getTarget();
3700: if (name == "staxProduceXMLEventReader")
3701: return (isStaxProduceXMLEventReader() ? java.lang.Boolean.TRUE
3702: : java.lang.Boolean.FALSE);
3703: if (name == "staxUseXMLEventReader")
3704: return (isStaxUseXMLEventReader() ? java.lang.Boolean.TRUE
3705: : java.lang.Boolean.FALSE);
3706: if (name == "optionalScalars")
3707: return (isOptionalScalars() ? java.lang.Boolean.TRUE
3708: : java.lang.Boolean.FALSE);
3709: if (name == "defaultElementType")
3710: return getDefaultElementType();
3711: if (name == "respectExtension")
3712: return (isRespectExtension() ? java.lang.Boolean.TRUE
3713: : java.lang.Boolean.FALSE);
3714: if (name == "logSuspicious")
3715: return (isLogSuspicious() ? java.lang.Boolean.TRUE
3716: : java.lang.Boolean.FALSE);
3717: throw new IllegalArgumentException(name
3718: + " is not a valid property name for S2bConfig");
3719: }
3720:
3721: public String nameSelf() {
3722: return "/S2bConfig";
3723: }
3724:
3725: public String nameChild(Object childObj) {
3726: return nameChild(childObj, false, false);
3727: }
3728:
3729: /**
3730: * @param childObj The child object to search for
3731: * @param returnSchemaName Whether or not the schema name should be returned or the property name
3732: * @return null if not found
3733: */
3734: public String nameChild(Object childObj, boolean returnConstName,
3735: boolean returnSchemaName) {
3736: return nameChild(childObj, returnConstName, returnSchemaName,
3737: false);
3738: }
3739:
3740: /**
3741: * @param childObj The child object to search for
3742: * @param returnSchemaName Whether or not the schema name should be returned or the property name
3743: * @return null if not found
3744: */
3745: public String nameChild(Object childObj, boolean returnConstName,
3746: boolean returnSchemaName, boolean returnXPathName) {
3747: if (childObj instanceof java.lang.String) {
3748: java.lang.String child = (java.lang.String) childObj;
3749: if (child == _SchemaType) {
3750: if (returnConstName) {
3751: return SCHEMATYPE;
3752: } else if (returnSchemaName) {
3753: return "schemaType";
3754: } else if (returnXPathName) {
3755: return "schemaType";
3756: } else {
3757: return "SchemaType";
3758: }
3759: }
3760: if (child == _DocRoot) {
3761: if (returnConstName) {
3762: return DOCROOT;
3763: } else if (returnSchemaName) {
3764: return "docRoot";
3765: } else if (returnXPathName) {
3766: return "docRoot";
3767: } else {
3768: return "DocRoot";
3769: }
3770: }
3771: if (child == _PackagePath) {
3772: if (returnConstName) {
3773: return PACKAGEPATH;
3774: } else if (returnSchemaName) {
3775: return "packagePath";
3776: } else if (returnXPathName) {
3777: return "packagePath";
3778: } else {
3779: return "PackagePath";
3780: }
3781: }
3782: if (child == _Indent) {
3783: if (returnConstName) {
3784: return INDENT;
3785: } else if (returnSchemaName) {
3786: return "indent";
3787: } else if (returnXPathName) {
3788: return "indent";
3789: } else {
3790: return "Indent";
3791: }
3792: }
3793: if (child == _DelegatePackage) {
3794: if (returnConstName) {
3795: return DELEGATEPACKAGE;
3796: } else if (returnSchemaName) {
3797: return "delegatePackage";
3798: } else if (returnXPathName) {
3799: return "delegatePackage";
3800: } else {
3801: return "DelegatePackage";
3802: }
3803: }
3804: if (child == _GenerateCommonInterface) {
3805: if (returnConstName) {
3806: return GENERATECOMMONINTERFACE;
3807: } else if (returnSchemaName) {
3808: return "generateCommonInterface";
3809: } else if (returnXPathName) {
3810: return "generateCommonInterface";
3811: } else {
3812: return "GenerateCommonInterface";
3813: }
3814: }
3815: if (child == _InputURI) {
3816: if (returnConstName) {
3817: return INPUTURI;
3818: } else if (returnSchemaName) {
3819: return "inputURI";
3820: } else if (returnXPathName) {
3821: return "inputURI";
3822: } else {
3823: return "InputURI";
3824: }
3825: }
3826: if (child == _IndexedPropertyType) {
3827: if (returnConstName) {
3828: return INDEXEDPROPERTYTYPE;
3829: } else if (returnSchemaName) {
3830: return "indexedPropertyType";
3831: } else if (returnXPathName) {
3832: return "indexedPropertyType";
3833: } else {
3834: return "IndexedPropertyType";
3835: }
3836: }
3837: int index = 0;
3838: for (java.util.Iterator it = _Finder.iterator(); it
3839: .hasNext();) {
3840: java.lang.String element = (java.lang.String) it.next();
3841: if (child == element) {
3842: if (returnConstName) {
3843: return FINDER;
3844: } else if (returnSchemaName) {
3845: return "finder";
3846: } else if (returnXPathName) {
3847: return "finder[position()=" + index + "]";
3848: } else {
3849: return "Finder." + Integer.toHexString(index);
3850: }
3851: }
3852: ++index;
3853: }
3854: if (child == _Target) {
3855: if (returnConstName) {
3856: return TARGET;
3857: } else if (returnSchemaName) {
3858: return "target";
3859: } else if (returnXPathName) {
3860: return "target";
3861: } else {
3862: return "Target";
3863: }
3864: }
3865: if (child == _DefaultElementType) {
3866: if (returnConstName) {
3867: return DEFAULTELEMENTTYPE;
3868: } else if (returnSchemaName) {
3869: return "defaultElementType";
3870: } else if (returnXPathName) {
3871: return "defaultElementType";
3872: } else {
3873: return "DefaultElementType";
3874: }
3875: }
3876: }
3877: if (childObj instanceof java.io.InputStream) {
3878: java.io.InputStream child = (java.io.InputStream) childObj;
3879: if (child == _FileIn) {
3880: if (returnConstName) {
3881: return FILEIN;
3882: } else if (returnSchemaName) {
3883: return "fileIn";
3884: } else if (returnXPathName) {
3885: return "fileIn";
3886: } else {
3887: return "FileIn";
3888: }
3889: }
3890: if (child == _MddIn) {
3891: if (returnConstName) {
3892: return MDDIN;
3893: } else if (returnSchemaName) {
3894: return "mddIn";
3895: } else if (returnXPathName) {
3896: return "mddIn";
3897: } else {
3898: return "MddIn";
3899: }
3900: }
3901: }
3902: if (childObj instanceof org.netbeans.modules.schema2beansdev.GenBeans.OutputStreamProvider) {
3903: org.netbeans.modules.schema2beansdev.GenBeans.OutputStreamProvider child = (org.netbeans.modules.schema2beansdev.GenBeans.OutputStreamProvider) childObj;
3904: if (child == _OutputStreamProvider) {
3905: if (returnConstName) {
3906: return OUTPUTSTREAMPROVIDER;
3907: } else if (returnSchemaName) {
3908: return "outputStreamProvider";
3909: } else if (returnXPathName) {
3910: return "outputStreamProvider";
3911: } else {
3912: return "OutputStreamProvider";
3913: }
3914: }
3915: }
3916: if (childObj instanceof java.lang.Integer) {
3917: java.lang.Integer child = (java.lang.Integer) childObj;
3918: if (((java.lang.Integer) child).intValue() == _IndentAmount) {
3919: if (returnConstName) {
3920: return INDENTAMOUNT;
3921: } else if (returnSchemaName) {
3922: return "indentAmount";
3923: } else if (returnXPathName) {
3924: return "indentAmount";
3925: } else {
3926: return "IndentAmount";
3927: }
3928: }
3929: }
3930: if (childObj instanceof org.netbeans.modules.schema2beansdev.metadd.MetaDD) {
3931: org.netbeans.modules.schema2beansdev.metadd.MetaDD child = (org.netbeans.modules.schema2beansdev.metadd.MetaDD) childObj;
3932: if (child == _MetaDD) {
3933: if (returnConstName) {
3934: return METADD;
3935: } else if (returnSchemaName) {
3936: return "metaDD";
3937: } else if (returnXPathName) {
3938: return "metaDD";
3939: } else {
3940: return "MetaDD";
3941: }
3942: }
3943: }
3944: if (childObj instanceof java.io.PrintStream) {
3945: java.io.PrintStream child = (java.io.PrintStream) childObj;
3946: if (child == _MessageOut) {
3947: if (returnConstName) {
3948: return MESSAGEOUT;
3949: } else if (returnSchemaName) {
3950: return "messageOut";
3951: } else if (returnXPathName) {
3952: return "messageOut";
3953: } else {
3954: return "MessageOut";
3955: }
3956: }
3957: }
3958: if (childObj instanceof org.netbeans.modules.schema2beansdev.CodeGeneratorFactory) {
3959: org.netbeans.modules.schema2beansdev.CodeGeneratorFactory child = (org.netbeans.modules.schema2beansdev.CodeGeneratorFactory) childObj;
3960: if (child == _CodeGeneratorFactory) {
3961: if (returnConstName) {
3962: return CODEGENERATORFACTORY;
3963: } else if (returnSchemaName) {
3964: return "codeGeneratorFactory";
3965: } else if (returnXPathName) {
3966: return "codeGeneratorFactory";
3967: } else {
3968: return "CodeGeneratorFactory";
3969: }
3970: }
3971: }
3972: if (childObj instanceof java.io.File) {
3973: java.io.File child = (java.io.File) childObj;
3974: if (child == _Filename) {
3975: if (returnConstName) {
3976: return FILENAME;
3977: } else if (returnSchemaName) {
3978: return "filename";
3979: } else if (returnXPathName) {
3980: return "filename";
3981: } else {
3982: return "Filename";
3983: }
3984: }
3985: if (child == _RootDir) {
3986: if (returnConstName) {
3987: return ROOTDIR;
3988: } else if (returnSchemaName) {
3989: return "rootDir";
3990: } else if (returnXPathName) {
3991: return "rootDir";
3992: } else {
3993: return "RootDir";
3994: }
3995: }
3996: if (child == _MddFile) {
3997: if (returnConstName) {
3998: return MDDFILE;
3999: } else if (returnSchemaName) {
4000: return "mddFile";
4001: } else if (returnXPathName) {
4002: return "mddFile";
4003: } else {
4004: return "MddFile";
4005: }
4006: }
4007: if (child == _DelegateDir) {
4008: if (returnConstName) {
4009: return DELEGATEDIR;
4010: } else if (returnSchemaName) {
4011: return "delegateDir";
4012: } else if (returnXPathName) {
4013: return "delegateDir";
4014: } else {
4015: return "DelegateDir";
4016: }
4017: }
4018: if (child == _DumpBeanTree) {
4019: if (returnConstName) {
4020: return DUMPBEANTREE;
4021: } else if (returnSchemaName) {
4022: return "dumpBeanTree";
4023: } else if (returnXPathName) {
4024: return "dumpBeanTree";
4025: } else {
4026: return "DumpBeanTree";
4027: }
4028: }
4029: if (child == _GenerateDotGraph) {
4030: if (returnConstName) {
4031: return GENERATEDOTGRAPH;
4032: } else if (returnSchemaName) {
4033: return "generateDotGraph";
4034: } else if (returnXPathName) {
4035: return "generateDotGraph";
4036: } else {
4037: return "GenerateDotGraph";
4038: }
4039: }
4040: if (child == _WriteBeanGraphFile) {
4041: if (returnConstName) {
4042: return WRITEBEANGRAPHFILE;
4043: } else if (returnSchemaName) {
4044: return "writeBeanGraphFile";
4045: } else if (returnXPathName) {
4046: return "writeBeanGraphFile";
4047: } else {
4048: return "WriteBeanGraphFile";
4049: }
4050: }
4051: int index = 0;
4052: for (java.util.Iterator it = _ReadBeanGraphFiles.iterator(); it
4053: .hasNext();) {
4054: java.io.File element = (java.io.File) it.next();
4055: if (child == element) {
4056: if (returnConstName) {
4057: return READBEANGRAPHFILES;
4058: } else if (returnSchemaName) {
4059: return "readBeanGraphFiles";
4060: } else if (returnXPathName) {
4061: return "readBeanGraphFiles[position()=" + index
4062: + "]";
4063: } else {
4064: return "ReadBeanGraphFiles."
4065: + Integer.toHexString(index);
4066: }
4067: }
4068: ++index;
4069: }
4070: if (child == _WriteConfig) {
4071: if (returnConstName) {
4072: return WRITECONFIG;
4073: } else if (returnSchemaName) {
4074: return "writeConfig";
4075: } else if (returnXPathName) {
4076: return "writeConfig";
4077: } else {
4078: return "WriteConfig";
4079: }
4080: }
4081: index = 0;
4082: for (java.util.Iterator it = _ReadConfig.iterator(); it
4083: .hasNext();) {
4084: java.io.File element = (java.io.File) it.next();
4085: if (child == element) {
4086: if (returnConstName) {
4087: return READCONFIG;
4088: } else if (returnSchemaName) {
4089: return "readConfig";
4090: } else if (returnXPathName) {
4091: return "readConfig[position()=" + index + "]";
4092: } else {
4093: return "ReadConfig."
4094: + Integer.toHexString(index);
4095: }
4096: }
4097: ++index;
4098: }
4099: }
4100: if (childObj instanceof java.lang.Long) {
4101: java.lang.Long child = (java.lang.Long) childObj;
4102: if (((java.lang.Long) child).longValue() == _NewestSourceTime) {
4103: if (returnConstName) {
4104: return NEWESTSOURCETIME;
4105: } else if (returnSchemaName) {
4106: return "newestSourceTime";
4107: } else if (returnXPathName) {
4108: return "newestSourceTime";
4109: } else {
4110: return "NewestSourceTime";
4111: }
4112: }
4113: }
4114: if (childObj instanceof java.lang.Boolean) {
4115: java.lang.Boolean child = (java.lang.Boolean) childObj;
4116: if (((java.lang.Boolean) child).booleanValue() == _TraceParse) {
4117: if (returnConstName) {
4118: return TRACEPARSE;
4119: } else if (returnSchemaName) {
4120: return "traceParse";
4121: } else if (returnXPathName) {
4122: return "traceParse";
4123: } else {
4124: return "TraceParse";
4125: }
4126: }
4127: if (((java.lang.Boolean) child).booleanValue() == _TraceGen) {
4128: if (returnConstName) {
4129: return TRACEGEN;
4130: } else if (returnSchemaName) {
4131: return "traceGen";
4132: } else if (returnXPathName) {
4133: return "traceGen";
4134: } else {
4135: return "TraceGen";
4136: }
4137: }
4138: if (((java.lang.Boolean) child).booleanValue() == _TraceMisc) {
4139: if (returnConstName) {
4140: return TRACEMISC;
4141: } else if (returnSchemaName) {
4142: return "traceMisc";
4143: } else if (returnXPathName) {
4144: return "traceMisc";
4145: } else {
4146: return "TraceMisc";
4147: }
4148: }
4149: if (((java.lang.Boolean) child).booleanValue() == _TraceDot) {
4150: if (returnConstName) {
4151: return TRACEDOT;
4152: } else if (returnSchemaName) {
4153: return "traceDot";
4154: } else if (returnXPathName) {
4155: return "traceDot";
4156: } else {
4157: return "TraceDot";
4158: }
4159: }
4160: if (((java.lang.Boolean) child).booleanValue() == _DoGeneration) {
4161: if (returnConstName) {
4162: return DOGENERATION;
4163: } else if (returnSchemaName) {
4164: return "doGeneration";
4165: } else if (returnXPathName) {
4166: return "doGeneration";
4167: } else {
4168: return "DoGeneration";
4169: }
4170: }
4171: if (((java.lang.Boolean) child).booleanValue() == _ScalarException) {
4172: if (returnConstName) {
4173: return SCALAREXCEPTION;
4174: } else if (returnSchemaName) {
4175: return "scalarException";
4176: } else if (returnXPathName) {
4177: return "scalarException";
4178: } else {
4179: return "ScalarException";
4180: }
4181: }
4182: if (((java.lang.Boolean) child).booleanValue() == _DumpToString) {
4183: if (returnConstName) {
4184: return DUMPTOSTRING;
4185: } else if (returnSchemaName) {
4186: return "dumpToString";
4187: } else if (returnXPathName) {
4188: return "dumpToString";
4189: } else {
4190: return "DumpToString";
4191: }
4192: }
4193: if (((java.lang.Boolean) child).booleanValue() == _Vetoable) {
4194: if (returnConstName) {
4195: return VETOABLE;
4196: } else if (returnSchemaName) {
4197: return "vetoable";
4198: } else if (returnXPathName) {
4199: return "vetoable";
4200: } else {
4201: return "Vetoable";
4202: }
4203: }
4204: if (((java.lang.Boolean) child).booleanValue() == _Standalone) {
4205: if (returnConstName) {
4206: return STANDALONE;
4207: } else if (returnSchemaName) {
4208: return "standalone";
4209: } else if (returnXPathName) {
4210: return "standalone";
4211: } else {
4212: return "Standalone";
4213: }
4214: }
4215: if (((java.lang.Boolean) child).booleanValue() == _Auto) {
4216: if (returnConstName) {
4217: return AUTO;
4218: } else if (returnSchemaName) {
4219: return "auto";
4220: } else if (returnXPathName) {
4221: return "auto";
4222: } else {
4223: return "Auto";
4224: }
4225: }
4226: if (((java.lang.Boolean) child).booleanValue() == _ThrowErrors) {
4227: if (returnConstName) {
4228: return THROWERRORS;
4229: } else if (returnSchemaName) {
4230: return "throwErrors";
4231: } else if (returnXPathName) {
4232: return "throwErrors";
4233: } else {
4234: return "ThrowErrors";
4235: }
4236: }
4237: if (((java.lang.Boolean) child).booleanValue() == _GenerateXMLIO) {
4238: if (returnConstName) {
4239: return GENERATEXMLIO;
4240: } else if (returnSchemaName) {
4241: return "generateXMLIO";
4242: } else if (returnXPathName) {
4243: return "generateXMLIO";
4244: } else {
4245: return "GenerateXMLIO";
4246: }
4247: }
4248: if (((java.lang.Boolean) child).booleanValue() == _GenerateValidate) {
4249: if (returnConstName) {
4250: return GENERATEVALIDATE;
4251: } else if (returnSchemaName) {
4252: return "generateValidate";
4253: } else if (returnXPathName) {
4254: return "generateValidate";
4255: } else {
4256: return "GenerateValidate";
4257: }
4258: }
4259: if (((java.lang.Boolean) child).booleanValue() == _GeneratePropertyEvents) {
4260: if (returnConstName) {
4261: return GENERATEPROPERTYEVENTS;
4262: } else if (returnSchemaName) {
4263: return "generatePropertyEvents";
4264: } else if (returnXPathName) {
4265: return "generatePropertyEvents";
4266: } else {
4267: return "GeneratePropertyEvents";
4268: }
4269: }
4270: if (((java.lang.Boolean) child).booleanValue() == _GenerateStoreEvents) {
4271: if (returnConstName) {
4272: return GENERATESTOREEVENTS;
4273: } else if (returnSchemaName) {
4274: return "generateStoreEvents";
4275: } else if (returnXPathName) {
4276: return "generateStoreEvents";
4277: } else {
4278: return "GenerateStoreEvents";
4279: }
4280: }
4281: if (((java.lang.Boolean) child).booleanValue() == _GenerateTransactions) {
4282: if (returnConstName) {
4283: return GENERATETRANSACTIONS;
4284: } else if (returnSchemaName) {
4285: return "generateTransactions";
4286: } else if (returnXPathName) {
4287: return "generateTransactions";
4288: } else {
4289: return "GenerateTransactions";
4290: }
4291: }
4292: if (((java.lang.Boolean) child).booleanValue() == _AttributesAsProperties) {
4293: if (returnConstName) {
4294: return ATTRIBUTESASPROPERTIES;
4295: } else if (returnSchemaName) {
4296: return "attributesAsProperties";
4297: } else if (returnXPathName) {
4298: return "attributesAsProperties";
4299: } else {
4300: return "AttributesAsProperties";
4301: }
4302: }
4303: if (((java.lang.Boolean) child).booleanValue() == _GenerateDelegator) {
4304: if (returnConstName) {
4305: return GENERATEDELEGATOR;
4306: } else if (returnSchemaName) {
4307: return "generateDelegator";
4308: } else if (returnXPathName) {
4309: return "generateDelegator";
4310: } else {
4311: return "GenerateDelegator";
4312: }
4313: }
4314: if (((java.lang.Boolean) child).booleanValue() == _DefaultsAccessable) {
4315: if (returnConstName) {
4316: return DEFAULTSACCESSABLE;
4317: } else if (returnSchemaName) {
4318: return "defaultsAccessable";
4319: } else if (returnXPathName) {
4320: return "defaultsAccessable";
4321: } else {
4322: return "DefaultsAccessable";
4323: }
4324: }
4325: if (((java.lang.Boolean) child).booleanValue() == _UseInterfaces) {
4326: if (returnConstName) {
4327: return USEINTERFACES;
4328: } else if (returnSchemaName) {
4329: return "useInterfaces";
4330: } else if (returnXPathName) {
4331: return "useInterfaces";
4332: } else {
4333: return "UseInterfaces";
4334: }
4335: }
4336: if (((java.lang.Boolean) child).booleanValue() == _GenerateInterfaces) {
4337: if (returnConstName) {
4338: return GENERATEINTERFACES;
4339: } else if (returnSchemaName) {
4340: return "generateInterfaces";
4341: } else if (returnXPathName) {
4342: return "generateInterfaces";
4343: } else {
4344: return "GenerateInterfaces";
4345: }
4346: }
4347: if (((java.lang.Boolean) child).booleanValue() == _KeepElementPositions) {
4348: if (returnConstName) {
4349: return KEEPELEMENTPOSITIONS;
4350: } else if (returnSchemaName) {
4351: return "keepElementPositions";
4352: } else if (returnXPathName) {
4353: return "keepElementPositions";
4354: } else {
4355: return "KeepElementPositions";
4356: }
4357: }
4358: if (((java.lang.Boolean) child).booleanValue() == _RemoveUnreferencedNodes) {
4359: if (returnConstName) {
4360: return REMOVEUNREFERENCEDNODES;
4361: } else if (returnSchemaName) {
4362: return "removeUnreferencedNodes";
4363: } else if (returnXPathName) {
4364: return "removeUnreferencedNodes";
4365: } else {
4366: return "RemoveUnreferencedNodes";
4367: }
4368: }
4369: if (((java.lang.Boolean) child).booleanValue() == _DoCompile) {
4370: if (returnConstName) {
4371: return DOCOMPILE;
4372: } else if (returnSchemaName) {
4373: return "doCompile";
4374: } else if (returnXPathName) {
4375: return "doCompile";
4376: } else {
4377: return "DoCompile";
4378: }
4379: }
4380: if (((java.lang.Boolean) child).booleanValue() == _GenerateSwitches) {
4381: if (returnConstName) {
4382: return GENERATESWITCHES;
4383: } else if (returnSchemaName) {
4384: return "generateSwitches";
4385: } else if (returnXPathName) {
4386: return "generateSwitches";
4387: } else {
4388: return "GenerateSwitches";
4389: }
4390: }
4391: if (((java.lang.Boolean) child).booleanValue() == _ProcessComments) {
4392: if (returnConstName) {
4393: return PROCESSCOMMENTS;
4394: } else if (returnSchemaName) {
4395: return "processComments";
4396: } else if (returnXPathName) {
4397: return "processComments";
4398: } else {
4399: return "ProcessComments";
4400: }
4401: }
4402: if (((java.lang.Boolean) child).booleanValue() == _ProcessDocType) {
4403: if (returnConstName) {
4404: return PROCESSDOCTYPE;
4405: } else if (returnSchemaName) {
4406: return "processDocType";
4407: } else if (returnXPathName) {
4408: return "processDocType";
4409: } else {
4410: return "ProcessDocType";
4411: }
4412: }
4413: if (((java.lang.Boolean) child).booleanValue() == _CheckUpToDate) {
4414: if (returnConstName) {
4415: return CHECKUPTODATE;
4416: } else if (returnSchemaName) {
4417: return "checkUpToDate";
4418: } else if (returnXPathName) {
4419: return "checkUpToDate";
4420: } else {
4421: return "CheckUpToDate";
4422: }
4423: }
4424: if (((java.lang.Boolean) child).booleanValue() == _GenerateParentRefs) {
4425: if (returnConstName) {
4426: return GENERATEPARENTREFS;
4427: } else if (returnSchemaName) {
4428: return "generateParentRefs";
4429: } else if (returnXPathName) {
4430: return "generateParentRefs";
4431: } else {
4432: return "GenerateParentRefs";
4433: }
4434: }
4435: if (((java.lang.Boolean) child).booleanValue() == _GenerateHasChanged) {
4436: if (returnConstName) {
4437: return GENERATEHASCHANGED;
4438: } else if (returnSchemaName) {
4439: return "generateHasChanged";
4440: } else if (returnXPathName) {
4441: return "generateHasChanged";
4442: } else {
4443: return "GenerateHasChanged";
4444: }
4445: }
4446: if (((java.lang.Boolean) child).booleanValue() == _MinFeatures) {
4447: if (returnConstName) {
4448: return MINFEATURES;
4449: } else if (returnSchemaName) {
4450: return "minFeatures";
4451: } else if (returnXPathName) {
4452: return "minFeatures";
4453: } else {
4454: return "MinFeatures";
4455: }
4456: }
4457: if (((java.lang.Boolean) child).booleanValue() == _ForME) {
4458: if (returnConstName) {
4459: return FORME;
4460: } else if (returnSchemaName) {
4461: return "forME";
4462: } else if (returnXPathName) {
4463: return "forME";
4464: } else {
4465: return "ForME";
4466: }
4467: }
4468: if (((java.lang.Boolean) child).booleanValue() == _GenerateTagsFile) {
4469: if (returnConstName) {
4470: return GENERATETAGSFILE;
4471: } else if (returnSchemaName) {
4472: return "generateTagsFile";
4473: } else if (returnXPathName) {
4474: return "generateTagsFile";
4475: } else {
4476: return "GenerateTagsFile";
4477: }
4478: }
4479: if (((java.lang.Boolean) child).booleanValue() == _GenerateTimeStamp) {
4480: if (returnConstName) {
4481: return GENERATETIMESTAMP;
4482: } else if (returnSchemaName) {
4483: return "generateTimeStamp";
4484: } else if (returnXPathName) {
4485: return "generateTimeStamp";
4486: } else {
4487: return "GenerateTimeStamp";
4488: }
4489: }
4490: if (((java.lang.Boolean) child).booleanValue() == _Quiet) {
4491: if (returnConstName) {
4492: return QUIET;
4493: } else if (returnSchemaName) {
4494: return "quiet";
4495: } else if (returnXPathName) {
4496: return "quiet";
4497: } else {
4498: return "Quiet";
4499: }
4500: }
4501: if (((java.lang.Boolean) child).booleanValue() == _MakeDefaults) {
4502: if (returnConstName) {
4503: return MAKEDEFAULTS;
4504: } else if (returnSchemaName) {
4505: return "makeDefaults";
4506: } else if (returnXPathName) {
4507: return "makeDefaults";
4508: } else {
4509: return "MakeDefaults";
4510: }
4511: }
4512: if (((java.lang.Boolean) child).booleanValue() == _SetDefaults) {
4513: if (returnConstName) {
4514: return SETDEFAULTS;
4515: } else if (returnSchemaName) {
4516: return "setDefaults";
4517: } else if (returnXPathName) {
4518: return "setDefaults";
4519: } else {
4520: return "SetDefaults";
4521: }
4522: }
4523: if (((java.lang.Boolean) child).booleanValue() == _TrimNonStrings) {
4524: if (returnConstName) {
4525: return TRIMNONSTRINGS;
4526: } else if (returnSchemaName) {
4527: return "trimNonStrings";
4528: } else if (returnXPathName) {
4529: return "trimNonStrings";
4530: } else {
4531: return "TrimNonStrings";
4532: }
4533: }
4534: if (((java.lang.Boolean) child).booleanValue() == _UseRuntime) {
4535: if (returnConstName) {
4536: return USERUNTIME;
4537: } else if (returnSchemaName) {
4538: return "useRuntime";
4539: } else if (returnXPathName) {
4540: return "useRuntime";
4541: } else {
4542: return "UseRuntime";
4543: }
4544: }
4545: if (((java.lang.Boolean) child).booleanValue() == _ExtendBaseBean) {
4546: if (returnConstName) {
4547: return EXTENDBASEBEAN;
4548: } else if (returnSchemaName) {
4549: return "extendBaseBean";
4550: } else if (returnXPathName) {
4551: return "extendBaseBean";
4552: } else {
4553: return "ExtendBaseBean";
4554: }
4555: }
4556: if (((java.lang.Boolean) child).booleanValue() == _StaxProduceXMLEventReader) {
4557: if (returnConstName) {
4558: return STAXPRODUCEXMLEVENTREADER;
4559: } else if (returnSchemaName) {
4560: return "staxProduceXMLEventReader";
4561: } else if (returnXPathName) {
4562: return "staxProduceXMLEventReader";
4563: } else {
4564: return "StaxProduceXMLEventReader";
4565: }
4566: }
4567: if (((java.lang.Boolean) child).booleanValue() == _StaxUseXMLEventReader) {
4568: if (returnConstName) {
4569: return STAXUSEXMLEVENTREADER;
4570: } else if (returnSchemaName) {
4571: return "staxUseXMLEventReader";
4572: } else if (returnXPathName) {
4573: return "staxUseXMLEventReader";
4574: } else {
4575: return "StaxUseXMLEventReader";
4576: }
4577: }
4578: if (((java.lang.Boolean) child).booleanValue() == _OptionalScalars) {
4579: if (returnConstName) {
4580: return OPTIONALSCALARS;
4581: } else if (returnSchemaName) {
4582: return "optionalScalars";
4583: } else if (returnXPathName) {
4584: return "optionalScalars";
4585: } else {
4586: return "OptionalScalars";
4587: }
4588: }
4589: if (((java.lang.Boolean) child).booleanValue() == _RespectExtension) {
4590: if (returnConstName) {
4591: return RESPECTEXTENSION;
4592: } else if (returnSchemaName) {
4593: return "respectExtension";
4594: } else if (returnXPathName) {
4595: return "respectExtension";
4596: } else {
4597: return "RespectExtension";
4598: }
4599: }
4600: if (((java.lang.Boolean) child).booleanValue() == _LogSuspicious) {
4601: if (returnConstName) {
4602: return LOGSUSPICIOUS;
4603: } else if (returnSchemaName) {
4604: return "logSuspicious";
4605: } else if (returnXPathName) {
4606: return "logSuspicious";
4607: } else {
4608: return "LogSuspicious";
4609: }
4610: }
4611: }
4612: if (childObj instanceof org.netbeans.modules.schema2beansdev.beangraph.BeanGraph) {
4613: org.netbeans.modules.schema2beansdev.beangraph.BeanGraph child = (org.netbeans.modules.schema2beansdev.beangraph.BeanGraph) childObj;
4614: int index = 0;
4615: for (java.util.Iterator it = _ReadBeanGraphs.iterator(); it
4616: .hasNext();) {
4617: org.netbeans.modules.schema2beansdev.beangraph.BeanGraph element = (org.netbeans.modules.schema2beansdev.beangraph.BeanGraph) it
4618: .next();
4619: if (child == element) {
4620: if (returnConstName) {
4621: return READBEANGRAPHS;
4622: } else if (returnSchemaName) {
4623: return "readBeanGraphs";
4624: } else if (returnXPathName) {
4625: return "readBeanGraphs[position()=" + index
4626: + "]";
4627: } else {
4628: return "ReadBeanGraphs."
4629: + Integer.toHexString(index);
4630: }
4631: }
4632: ++index;
4633: }
4634: }
4635: return null;
4636: }
4637:
4638: /**
4639: * Return an array of all of the properties that are beans and are set.
4640: */
4641: public java.lang.Object[] childBeans(boolean recursive) {
4642: java.util.List children = new java.util.LinkedList();
4643: childBeans(recursive, children);
4644: java.lang.Object[] result = new java.lang.Object[children
4645: .size()];
4646: return (java.lang.Object[]) children.toArray(result);
4647: }
4648:
4649: /**
4650: * Put all child beans into the beans list.
4651: */
4652: public void childBeans(boolean recursive, java.util.List beans) {
4653: }
4654:
4655: public boolean equals(Object o) {
4656: return o instanceof org.netbeans.modules.schema2beansdev.S2bConfig
4657: && equals((org.netbeans.modules.schema2beansdev.S2bConfig) o);
4658: }
4659:
4660: public boolean equals(
4661: org.netbeans.modules.schema2beansdev.S2bConfig inst) {
4662: if (inst == this ) {
4663: return true;
4664: }
4665: if (inst == null) {
4666: return false;
4667: }
4668: if (!(_SchemaType == null ? inst._SchemaType == null
4669: : _SchemaType.equals(inst._SchemaType))) {
4670: return false;
4671: }
4672: if (_isSet_TraceParse != inst._isSet_TraceParse) {
4673: return false;
4674: }
4675: if (_isSet_TraceParse) {
4676: if (!(_TraceParse == inst._TraceParse)) {
4677: return false;
4678: }
4679: }
4680: if (_isSet_TraceGen != inst._isSet_TraceGen) {
4681: return false;
4682: }
4683: if (_isSet_TraceGen) {
4684: if (!(_TraceGen == inst._TraceGen)) {
4685: return false;
4686: }
4687: }
4688: if (_isSet_TraceMisc != inst._isSet_TraceMisc) {
4689: return false;
4690: }
4691: if (_isSet_TraceMisc) {
4692: if (!(_TraceMisc == inst._TraceMisc)) {
4693: return false;
4694: }
4695: }
4696: if (_isSet_TraceDot != inst._isSet_TraceDot) {
4697: return false;
4698: }
4699: if (_isSet_TraceDot) {
4700: if (!(_TraceDot == inst._TraceDot)) {
4701: return false;
4702: }
4703: }
4704: if (!(_Filename == null ? inst._Filename == null : _Filename
4705: .equals(inst._Filename))) {
4706: return false;
4707: }
4708: if (!(_FileIn == null ? inst._FileIn == null : _FileIn
4709: .equals(inst._FileIn))) {
4710: return false;
4711: }
4712: if (!(_DocRoot == null ? inst._DocRoot == null : _DocRoot
4713: .equals(inst._DocRoot))) {
4714: return false;
4715: }
4716: if (!(_RootDir == null ? inst._RootDir == null : _RootDir
4717: .equals(inst._RootDir))) {
4718: return false;
4719: }
4720: if (!(_PackagePath == null ? inst._PackagePath == null
4721: : _PackagePath.equals(inst._PackagePath))) {
4722: return false;
4723: }
4724: if (!(_Indent == null ? inst._Indent == null : _Indent
4725: .equals(inst._Indent))) {
4726: return false;
4727: }
4728: if (_isSet_IndentAmount != inst._isSet_IndentAmount) {
4729: return false;
4730: }
4731: if (_isSet_IndentAmount) {
4732: if (!(_IndentAmount == inst._IndentAmount)) {
4733: return false;
4734: }
4735: }
4736: if (!(_MddFile == null ? inst._MddFile == null : _MddFile
4737: .equals(inst._MddFile))) {
4738: return false;
4739: }
4740: if (!(_MddIn == null ? inst._MddIn == null : _MddIn
4741: .equals(inst._MddIn))) {
4742: return false;
4743: }
4744: if (!(_MetaDD == null ? inst._MetaDD == null : _MetaDD
4745: .equals(inst._MetaDD))) {
4746: return false;
4747: }
4748: if (_isSet_DoGeneration != inst._isSet_DoGeneration) {
4749: return false;
4750: }
4751: if (_isSet_DoGeneration) {
4752: if (!(_DoGeneration == inst._DoGeneration)) {
4753: return false;
4754: }
4755: }
4756: if (_isSet_ScalarException != inst._isSet_ScalarException) {
4757: return false;
4758: }
4759: if (_isSet_ScalarException) {
4760: if (!(_ScalarException == inst._ScalarException)) {
4761: return false;
4762: }
4763: }
4764: if (_isSet_DumpToString != inst._isSet_DumpToString) {
4765: return false;
4766: }
4767: if (_isSet_DumpToString) {
4768: if (!(_DumpToString == inst._DumpToString)) {
4769: return false;
4770: }
4771: }
4772: if (_isSet_Vetoable != inst._isSet_Vetoable) {
4773: return false;
4774: }
4775: if (_isSet_Vetoable) {
4776: if (!(_Vetoable == inst._Vetoable)) {
4777: return false;
4778: }
4779: }
4780: if (_isSet_Standalone != inst._isSet_Standalone) {
4781: return false;
4782: }
4783: if (_isSet_Standalone) {
4784: if (!(_Standalone == inst._Standalone)) {
4785: return false;
4786: }
4787: }
4788: if (_isSet_Auto != inst._isSet_Auto) {
4789: return false;
4790: }
4791: if (_isSet_Auto) {
4792: if (!(_Auto == inst._Auto)) {
4793: return false;
4794: }
4795: }
4796: if (!(_MessageOut == null ? inst._MessageOut == null
4797: : _MessageOut.equals(inst._MessageOut))) {
4798: return false;
4799: }
4800: if (!(_OutputStreamProvider == null ? inst._OutputStreamProvider == null
4801: : _OutputStreamProvider
4802: .equals(inst._OutputStreamProvider))) {
4803: return false;
4804: }
4805: if (_isSet_ThrowErrors != inst._isSet_ThrowErrors) {
4806: return false;
4807: }
4808: if (_isSet_ThrowErrors) {
4809: if (!(_ThrowErrors == inst._ThrowErrors)) {
4810: return false;
4811: }
4812: }
4813: if (_isSet_GenerateXMLIO != inst._isSet_GenerateXMLIO) {
4814: return false;
4815: }
4816: if (_isSet_GenerateXMLIO) {
4817: if (!(_GenerateXMLIO == inst._GenerateXMLIO)) {
4818: return false;
4819: }
4820: }
4821: if (_isSet_GenerateValidate != inst._isSet_GenerateValidate) {
4822: return false;
4823: }
4824: if (_isSet_GenerateValidate) {
4825: if (!(_GenerateValidate == inst._GenerateValidate)) {
4826: return false;
4827: }
4828: }
4829: if (_isSet_GeneratePropertyEvents != inst._isSet_GeneratePropertyEvents) {
4830: return false;
4831: }
4832: if (_isSet_GeneratePropertyEvents) {
4833: if (!(_GeneratePropertyEvents == inst._GeneratePropertyEvents)) {
4834: return false;
4835: }
4836: }
4837: if (_isSet_GenerateStoreEvents != inst._isSet_GenerateStoreEvents) {
4838: return false;
4839: }
4840: if (_isSet_GenerateStoreEvents) {
4841: if (!(_GenerateStoreEvents == inst._GenerateStoreEvents)) {
4842: return false;
4843: }
4844: }
4845: if (_isSet_GenerateTransactions != inst._isSet_GenerateTransactions) {
4846: return false;
4847: }
4848: if (_isSet_GenerateTransactions) {
4849: if (!(_GenerateTransactions == inst._GenerateTransactions)) {
4850: return false;
4851: }
4852: }
4853: if (_isSet_AttributesAsProperties != inst._isSet_AttributesAsProperties) {
4854: return false;
4855: }
4856: if (_isSet_AttributesAsProperties) {
4857: if (!(_AttributesAsProperties == inst._AttributesAsProperties)) {
4858: return false;
4859: }
4860: }
4861: if (_isSet_GenerateDelegator != inst._isSet_GenerateDelegator) {
4862: return false;
4863: }
4864: if (_isSet_GenerateDelegator) {
4865: if (!(_GenerateDelegator == inst._GenerateDelegator)) {
4866: return false;
4867: }
4868: }
4869: if (!(_DelegateDir == null ? inst._DelegateDir == null
4870: : _DelegateDir.equals(inst._DelegateDir))) {
4871: return false;
4872: }
4873: if (!(_DelegatePackage == null ? inst._DelegatePackage == null
4874: : _DelegatePackage.equals(inst._DelegatePackage))) {
4875: return false;
4876: }
4877: if (!(_GenerateCommonInterface == null ? inst._GenerateCommonInterface == null
4878: : _GenerateCommonInterface
4879: .equals(inst._GenerateCommonInterface))) {
4880: return false;
4881: }
4882: if (_isSet_DefaultsAccessable != inst._isSet_DefaultsAccessable) {
4883: return false;
4884: }
4885: if (_isSet_DefaultsAccessable) {
4886: if (!(_DefaultsAccessable == inst._DefaultsAccessable)) {
4887: return false;
4888: }
4889: }
4890: if (_isSet_UseInterfaces != inst._isSet_UseInterfaces) {
4891: return false;
4892: }
4893: if (_isSet_UseInterfaces) {
4894: if (!(_UseInterfaces == inst._UseInterfaces)) {
4895: return false;
4896: }
4897: }
4898: if (_isSet_GenerateInterfaces != inst._isSet_GenerateInterfaces) {
4899: return false;
4900: }
4901: if (_isSet_GenerateInterfaces) {
4902: if (!(_GenerateInterfaces == inst._GenerateInterfaces)) {
4903: return false;
4904: }
4905: }
4906: if (_isSet_KeepElementPositions != inst._isSet_KeepElementPositions) {
4907: return false;
4908: }
4909: if (_isSet_KeepElementPositions) {
4910: if (!(_KeepElementPositions == inst._KeepElementPositions)) {
4911: return false;
4912: }
4913: }
4914: if (_isSet_RemoveUnreferencedNodes != inst._isSet_RemoveUnreferencedNodes) {
4915: return false;
4916: }
4917: if (_isSet_RemoveUnreferencedNodes) {
4918: if (!(_RemoveUnreferencedNodes == inst._RemoveUnreferencedNodes)) {
4919: return false;
4920: }
4921: }
4922: if (!(_InputURI == null ? inst._InputURI == null : _InputURI
4923: .equals(inst._InputURI))) {
4924: return false;
4925: }
4926: if (!(_IndexedPropertyType == null ? inst._IndexedPropertyType == null
4927: : _IndexedPropertyType
4928: .equals(inst._IndexedPropertyType))) {
4929: return false;
4930: }
4931: if (_isSet_DoCompile != inst._isSet_DoCompile) {
4932: return false;
4933: }
4934: if (_isSet_DoCompile) {
4935: if (!(_DoCompile == inst._DoCompile)) {
4936: return false;
4937: }
4938: }
4939: if (_isSet_GenerateSwitches != inst._isSet_GenerateSwitches) {
4940: return false;
4941: }
4942: if (_isSet_GenerateSwitches) {
4943: if (!(_GenerateSwitches == inst._GenerateSwitches)) {
4944: return false;
4945: }
4946: }
4947: if (!(_DumpBeanTree == null ? inst._DumpBeanTree == null
4948: : _DumpBeanTree.equals(inst._DumpBeanTree))) {
4949: return false;
4950: }
4951: if (!(_GenerateDotGraph == null ? inst._GenerateDotGraph == null
4952: : _GenerateDotGraph.equals(inst._GenerateDotGraph))) {
4953: return false;
4954: }
4955: if (_isSet_ProcessComments != inst._isSet_ProcessComments) {
4956: return false;
4957: }
4958: if (_isSet_ProcessComments) {
4959: if (!(_ProcessComments == inst._ProcessComments)) {
4960: return false;
4961: }
4962: }
4963: if (_isSet_ProcessDocType != inst._isSet_ProcessDocType) {
4964: return false;
4965: }
4966: if (_isSet_ProcessDocType) {
4967: if (!(_ProcessDocType == inst._ProcessDocType)) {
4968: return false;
4969: }
4970: }
4971: if (_isSet_CheckUpToDate != inst._isSet_CheckUpToDate) {
4972: return false;
4973: }
4974: if (_isSet_CheckUpToDate) {
4975: if (!(_CheckUpToDate == inst._CheckUpToDate)) {
4976: return false;
4977: }
4978: }
4979: if (_isSet_GenerateParentRefs != inst._isSet_GenerateParentRefs) {
4980: return false;
4981: }
4982: if (_isSet_GenerateParentRefs) {
4983: if (!(_GenerateParentRefs == inst._GenerateParentRefs)) {
4984: return false;
4985: }
4986: }
4987: if (_isSet_GenerateHasChanged != inst._isSet_GenerateHasChanged) {
4988: return false;
4989: }
4990: if (_isSet_GenerateHasChanged) {
4991: if (!(_GenerateHasChanged == inst._GenerateHasChanged)) {
4992: return false;
4993: }
4994: }
4995: if (_isSet_NewestSourceTime != inst._isSet_NewestSourceTime) {
4996: return false;
4997: }
4998: if (_isSet_NewestSourceTime) {
4999: if (!(_NewestSourceTime == inst._NewestSourceTime)) {
5000: return false;
5001: }
5002: }
5003: if (!(_WriteBeanGraphFile == null ? inst._WriteBeanGraphFile == null
5004: : _WriteBeanGraphFile.equals(inst._WriteBeanGraphFile))) {
5005: return false;
5006: }
5007: if (sizeReadBeanGraphFiles() != inst.sizeReadBeanGraphFiles())
5008: return false;
5009: // Compare every element.
5010: for (java.util.Iterator it = _ReadBeanGraphFiles.iterator(), it2 = inst._ReadBeanGraphFiles
5011: .iterator(); it.hasNext() && it2.hasNext();) {
5012: java.io.File element = (java.io.File) it.next();
5013: java.io.File element2 = (java.io.File) it2.next();
5014: if (!(element == null ? element2 == null : element
5015: .equals(element2))) {
5016: return false;
5017: }
5018: }
5019: if (sizeReadBeanGraphs() != inst.sizeReadBeanGraphs())
5020: return false;
5021: // Compare every element.
5022: for (java.util.Iterator it = _ReadBeanGraphs.iterator(), it2 = inst._ReadBeanGraphs
5023: .iterator(); it.hasNext() && it2.hasNext();) {
5024: org.netbeans.modules.schema2beansdev.beangraph.BeanGraph element = (org.netbeans.modules.schema2beansdev.beangraph.BeanGraph) it
5025: .next();
5026: org.netbeans.modules.schema2beansdev.beangraph.BeanGraph element2 = (org.netbeans.modules.schema2beansdev.beangraph.BeanGraph) it2
5027: .next();
5028: if (!(element == null ? element2 == null : element
5029: .equals(element2))) {
5030: return false;
5031: }
5032: }
5033: if (_isSet_MinFeatures != inst._isSet_MinFeatures) {
5034: return false;
5035: }
5036: if (_isSet_MinFeatures) {
5037: if (!(_MinFeatures == inst._MinFeatures)) {
5038: return false;
5039: }
5040: }
5041: if (_isSet_ForME != inst._isSet_ForME) {
5042: return false;
5043: }
5044: if (_isSet_ForME) {
5045: if (!(_ForME == inst._ForME)) {
5046: return false;
5047: }
5048: }
5049: if (_isSet_GenerateTagsFile != inst._isSet_GenerateTagsFile) {
5050: return false;
5051: }
5052: if (_isSet_GenerateTagsFile) {
5053: if (!(_GenerateTagsFile == inst._GenerateTagsFile)) {
5054: return false;
5055: }
5056: }
5057: if (!(_CodeGeneratorFactory == null ? inst._CodeGeneratorFactory == null
5058: : _CodeGeneratorFactory
5059: .equals(inst._CodeGeneratorFactory))) {
5060: return false;
5061: }
5062: if (_isSet_GenerateTimeStamp != inst._isSet_GenerateTimeStamp) {
5063: return false;
5064: }
5065: if (_isSet_GenerateTimeStamp) {
5066: if (!(_GenerateTimeStamp == inst._GenerateTimeStamp)) {
5067: return false;
5068: }
5069: }
5070: if (_isSet_Quiet != inst._isSet_Quiet) {
5071: return false;
5072: }
5073: if (_isSet_Quiet) {
5074: if (!(_Quiet == inst._Quiet)) {
5075: return false;
5076: }
5077: }
5078: if (!(_WriteConfig == null ? inst._WriteConfig == null
5079: : _WriteConfig.equals(inst._WriteConfig))) {
5080: return false;
5081: }
5082: if (sizeReadConfig() != inst.sizeReadConfig())
5083: return false;
5084: // Compare every element.
5085: for (java.util.Iterator it = _ReadConfig.iterator(), it2 = inst._ReadConfig
5086: .iterator(); it.hasNext() && it2.hasNext();) {
5087: java.io.File element = (java.io.File) it.next();
5088: java.io.File element2 = (java.io.File) it2.next();
5089: if (!(element == null ? element2 == null : element
5090: .equals(element2))) {
5091: return false;
5092: }
5093: }
5094: if (_isSet_MakeDefaults != inst._isSet_MakeDefaults) {
5095: return false;
5096: }
5097: if (_isSet_MakeDefaults) {
5098: if (!(_MakeDefaults == inst._MakeDefaults)) {
5099: return false;
5100: }
5101: }
5102: if (_isSet_SetDefaults != inst._isSet_SetDefaults) {
5103: return false;
5104: }
5105: if (_isSet_SetDefaults) {
5106: if (!(_SetDefaults == inst._SetDefaults)) {
5107: return false;
5108: }
5109: }
5110: if (_isSet_TrimNonStrings != inst._isSet_TrimNonStrings) {
5111: return false;
5112: }
5113: if (_isSet_TrimNonStrings) {
5114: if (!(_TrimNonStrings == inst._TrimNonStrings)) {
5115: return false;
5116: }
5117: }
5118: if (_isSet_UseRuntime != inst._isSet_UseRuntime) {
5119: return false;
5120: }
5121: if (_isSet_UseRuntime) {
5122: if (!(_UseRuntime == inst._UseRuntime)) {
5123: return false;
5124: }
5125: }
5126: if (_isSet_ExtendBaseBean != inst._isSet_ExtendBaseBean) {
5127: return false;
5128: }
5129: if (_isSet_ExtendBaseBean) {
5130: if (!(_ExtendBaseBean == inst._ExtendBaseBean)) {
5131: return false;
5132: }
5133: }
5134: if (sizeFinder() != inst.sizeFinder())
5135: return false;
5136: // Compare every element.
5137: for (java.util.Iterator it = _Finder.iterator(), it2 = inst._Finder
5138: .iterator(); it.hasNext() && it2.hasNext();) {
5139: java.lang.String element = (java.lang.String) it.next();
5140: java.lang.String element2 = (java.lang.String) it2.next();
5141: if (!(element == null ? element2 == null : element
5142: .equals(element2))) {
5143: return false;
5144: }
5145: }
5146: if (!(_Target == null ? inst._Target == null : _Target
5147: .equals(inst._Target))) {
5148: return false;
5149: }
5150: if (_isSet_StaxProduceXMLEventReader != inst._isSet_StaxProduceXMLEventReader) {
5151: return false;
5152: }
5153: if (_isSet_StaxProduceXMLEventReader) {
5154: if (!(_StaxProduceXMLEventReader == inst._StaxProduceXMLEventReader)) {
5155: return false;
5156: }
5157: }
5158: if (_isSet_StaxUseXMLEventReader != inst._isSet_StaxUseXMLEventReader) {
5159: return false;
5160: }
5161: if (_isSet_StaxUseXMLEventReader) {
5162: if (!(_StaxUseXMLEventReader == inst._StaxUseXMLEventReader)) {
5163: return false;
5164: }
5165: }
5166: if (_isSet_OptionalScalars != inst._isSet_OptionalScalars) {
5167: return false;
5168: }
5169: if (_isSet_OptionalScalars) {
5170: if (!(_OptionalScalars == inst._OptionalScalars)) {
5171: return false;
5172: }
5173: }
5174: if (!(_DefaultElementType == null ? inst._DefaultElementType == null
5175: : _DefaultElementType.equals(inst._DefaultElementType))) {
5176: return false;
5177: }
5178: if (_isSet_RespectExtension != inst._isSet_RespectExtension) {
5179: return false;
5180: }
5181: if (_isSet_RespectExtension) {
5182: if (!(_RespectExtension == inst._RespectExtension)) {
5183: return false;
5184: }
5185: }
5186: if (_isSet_LogSuspicious != inst._isSet_LogSuspicious) {
5187: return false;
5188: }
5189: if (_isSet_LogSuspicious) {
5190: if (!(_LogSuspicious == inst._LogSuspicious)) {
5191: return false;
5192: }
5193: }
5194: return true;
5195: }
5196:
5197: public int hashCode() {
5198: int result = 17;
5199: result = 37 * result
5200: + (_SchemaType == null ? 0 : _SchemaType.hashCode());
5201: result = 37 * result
5202: + (_isSet_TraceParse ? 0 : (_TraceParse ? 0 : 1));
5203: result = 37 * result
5204: + (_isSet_TraceGen ? 0 : (_TraceGen ? 0 : 1));
5205: result = 37 * result
5206: + (_isSet_TraceMisc ? 0 : (_TraceMisc ? 0 : 1));
5207: result = 37 * result
5208: + (_isSet_TraceDot ? 0 : (_TraceDot ? 0 : 1));
5209: result = 37 * result
5210: + (_Filename == null ? 0 : _Filename.hashCode());
5211: result = 37 * result
5212: + (_FileIn == null ? 0 : _FileIn.hashCode());
5213: result = 37 * result
5214: + (_DocRoot == null ? 0 : _DocRoot.hashCode());
5215: result = 37 * result
5216: + (_RootDir == null ? 0 : _RootDir.hashCode());
5217: result = 37 * result
5218: + (_PackagePath == null ? 0 : _PackagePath.hashCode());
5219: result = 37 * result
5220: + (_Indent == null ? 0 : _Indent.hashCode());
5221: result = 37 * result
5222: + (_isSet_IndentAmount ? 0 : (_IndentAmount));
5223: result = 37 * result
5224: + (_MddFile == null ? 0 : _MddFile.hashCode());
5225: result = 37 * result + (_MddIn == null ? 0 : _MddIn.hashCode());
5226: result = 37 * result
5227: + (_MetaDD == null ? 0 : _MetaDD.hashCode());
5228: result = 37 * result
5229: + (_isSet_DoGeneration ? 0 : (_DoGeneration ? 0 : 1));
5230: result = 37
5231: * result
5232: + (_isSet_ScalarException ? 0 : (_ScalarException ? 0
5233: : 1));
5234: result = 37 * result
5235: + (_isSet_DumpToString ? 0 : (_DumpToString ? 0 : 1));
5236: result = 37 * result
5237: + (_isSet_Vetoable ? 0 : (_Vetoable ? 0 : 1));
5238: result = 37 * result
5239: + (_isSet_Standalone ? 0 : (_Standalone ? 0 : 1));
5240: result = 37 * result + (_isSet_Auto ? 0 : (_Auto ? 0 : 1));
5241: result = 37 * result
5242: + (_MessageOut == null ? 0 : _MessageOut.hashCode());
5243: result = 37
5244: * result
5245: + (_OutputStreamProvider == null ? 0
5246: : _OutputStreamProvider.hashCode());
5247: result = 37 * result
5248: + (_isSet_ThrowErrors ? 0 : (_ThrowErrors ? 0 : 1));
5249: result = 37 * result
5250: + (_isSet_GenerateXMLIO ? 0 : (_GenerateXMLIO ? 0 : 1));
5251: result = 37
5252: * result
5253: + (_isSet_GenerateValidate ? 0 : (_GenerateValidate ? 0
5254: : 1));
5255: result = 37
5256: * result
5257: + (_isSet_GeneratePropertyEvents ? 0
5258: : (_GeneratePropertyEvents ? 0 : 1));
5259: result = 37
5260: * result
5261: + (_isSet_GenerateStoreEvents ? 0
5262: : (_GenerateStoreEvents ? 0 : 1));
5263: result = 37
5264: * result
5265: + (_isSet_GenerateTransactions ? 0
5266: : (_GenerateTransactions ? 0 : 1));
5267: result = 37
5268: * result
5269: + (_isSet_AttributesAsProperties ? 0
5270: : (_AttributesAsProperties ? 0 : 1));
5271: result = 37
5272: * result
5273: + (_isSet_GenerateDelegator ? 0
5274: : (_GenerateDelegator ? 0 : 1));
5275: result = 37 * result
5276: + (_DelegateDir == null ? 0 : _DelegateDir.hashCode());
5277: result = 37
5278: * result
5279: + (_DelegatePackage == null ? 0 : _DelegatePackage
5280: .hashCode());
5281: result = 37
5282: * result
5283: + (_GenerateCommonInterface == null ? 0
5284: : _GenerateCommonInterface.hashCode());
5285: result = 37
5286: * result
5287: + (_isSet_DefaultsAccessable ? 0
5288: : (_DefaultsAccessable ? 0 : 1));
5289: result = 37 * result
5290: + (_isSet_UseInterfaces ? 0 : (_UseInterfaces ? 0 : 1));
5291: result = 37
5292: * result
5293: + (_isSet_GenerateInterfaces ? 0
5294: : (_GenerateInterfaces ? 0 : 1));
5295: result = 37
5296: * result
5297: + (_isSet_KeepElementPositions ? 0
5298: : (_KeepElementPositions ? 0 : 1));
5299: result = 37
5300: * result
5301: + (_isSet_RemoveUnreferencedNodes ? 0
5302: : (_RemoveUnreferencedNodes ? 0 : 1));
5303: result = 37 * result
5304: + (_InputURI == null ? 0 : _InputURI.hashCode());
5305: result = 37
5306: * result
5307: + (_IndexedPropertyType == null ? 0
5308: : _IndexedPropertyType.hashCode());
5309: result = 37 * result
5310: + (_isSet_DoCompile ? 0 : (_DoCompile ? 0 : 1));
5311: result = 37
5312: * result
5313: + (_isSet_GenerateSwitches ? 0 : (_GenerateSwitches ? 0
5314: : 1));
5315: result = 37
5316: * result
5317: + (_DumpBeanTree == null ? 0 : _DumpBeanTree.hashCode());
5318: result = 37
5319: * result
5320: + (_GenerateDotGraph == null ? 0 : _GenerateDotGraph
5321: .hashCode());
5322: result = 37
5323: * result
5324: + (_isSet_ProcessComments ? 0 : (_ProcessComments ? 0
5325: : 1));
5326: result = 37
5327: * result
5328: + (_isSet_ProcessDocType ? 0
5329: : (_ProcessDocType ? 0 : 1));
5330: result = 37 * result
5331: + (_isSet_CheckUpToDate ? 0 : (_CheckUpToDate ? 0 : 1));
5332: result = 37
5333: * result
5334: + (_isSet_GenerateParentRefs ? 0
5335: : (_GenerateParentRefs ? 0 : 1));
5336: result = 37
5337: * result
5338: + (_isSet_GenerateHasChanged ? 0
5339: : (_GenerateHasChanged ? 0 : 1));
5340: result = 37
5341: * result
5342: + (_isSet_NewestSourceTime ? 0
5343: : ((int) (_NewestSourceTime ^ (_NewestSourceTime >>> 32))));
5344: result = 37
5345: * result
5346: + (_WriteBeanGraphFile == null ? 0
5347: : _WriteBeanGraphFile.hashCode());
5348: result = 37
5349: * result
5350: + (_ReadBeanGraphFiles == null ? 0
5351: : _ReadBeanGraphFiles.hashCode());
5352: result = 37
5353: * result
5354: + (_ReadBeanGraphs == null ? 0 : _ReadBeanGraphs
5355: .hashCode());
5356: result = 37 * result
5357: + (_isSet_MinFeatures ? 0 : (_MinFeatures ? 0 : 1));
5358: result = 37 * result + (_isSet_ForME ? 0 : (_ForME ? 0 : 1));
5359: result = 37
5360: * result
5361: + (_isSet_GenerateTagsFile ? 0 : (_GenerateTagsFile ? 0
5362: : 1));
5363: result = 37
5364: * result
5365: + (_CodeGeneratorFactory == null ? 0
5366: : _CodeGeneratorFactory.hashCode());
5367: result = 37
5368: * result
5369: + (_isSet_GenerateTimeStamp ? 0
5370: : (_GenerateTimeStamp ? 0 : 1));
5371: result = 37 * result + (_isSet_Quiet ? 0 : (_Quiet ? 0 : 1));
5372: result = 37 * result
5373: + (_WriteConfig == null ? 0 : _WriteConfig.hashCode());
5374: result = 37 * result
5375: + (_ReadConfig == null ? 0 : _ReadConfig.hashCode());
5376: result = 37 * result
5377: + (_isSet_MakeDefaults ? 0 : (_MakeDefaults ? 0 : 1));
5378: result = 37 * result
5379: + (_isSet_SetDefaults ? 0 : (_SetDefaults ? 0 : 1));
5380: result = 37
5381: * result
5382: + (_isSet_TrimNonStrings ? 0
5383: : (_TrimNonStrings ? 0 : 1));
5384: result = 37 * result
5385: + (_isSet_UseRuntime ? 0 : (_UseRuntime ? 0 : 1));
5386: result = 37
5387: * result
5388: + (_isSet_ExtendBaseBean ? 0
5389: : (_ExtendBaseBean ? 0 : 1));
5390: result = 37 * result
5391: + (_Finder == null ? 0 : _Finder.hashCode());
5392: result = 37 * result
5393: + (_Target == null ? 0 : _Target.hashCode());
5394: result = 37
5395: * result
5396: + (_isSet_StaxProduceXMLEventReader ? 0
5397: : (_StaxProduceXMLEventReader ? 0 : 1));
5398: result = 37
5399: * result
5400: + (_isSet_StaxUseXMLEventReader ? 0
5401: : (_StaxUseXMLEventReader ? 0 : 1));
5402: result = 37
5403: * result
5404: + (_isSet_OptionalScalars ? 0 : (_OptionalScalars ? 0
5405: : 1));
5406: result = 37
5407: * result
5408: + (_DefaultElementType == null ? 0
5409: : _DefaultElementType.hashCode());
5410: result = 37
5411: * result
5412: + (_isSet_RespectExtension ? 0 : (_RespectExtension ? 0
5413: : 1));
5414: result = 37 * result
5415: + (_isSet_LogSuspicious ? 0 : (_LogSuspicious ? 0 : 1));
5416: return result;
5417: }
5418:
5419: public String toString() {
5420: java.io.StringWriter sw = new java.io.StringWriter();
5421: try {
5422: writeNode(sw);
5423: } catch (java.io.IOException e) {
5424: // How can we actually get an IOException on a StringWriter?
5425: throw new RuntimeException(e);
5426: }
5427: return sw.toString();
5428: }
5429:
5430: }
|