public class S2bConfig extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
S2bConfig.ReadState |
static class |
S2bConfig.ValidateException |
| Constructor and Description |
|---|
S2bConfig()
Normal starting point constructor.
|
S2bConfig(S2bConfig source)
Deep copy
|
S2bConfig(S2bConfig source,
boolean justData)
Deep copy
|
S2bConfig(String schemaType,
File rootDir,
String indent,
boolean doGeneration,
boolean scalarException,
boolean generateXMLIO,
String indexedPropertyType,
boolean generateTimeStamp,
boolean quiet,
boolean makeDefaults)
Required parameters constructor
|
| Modifier and Type | Method and Description |
|---|---|
String |
_getSchemaLocation() |
void |
_setSchemaLocation(String location) |
int |
addFinder(String value) |
int |
addReadBeanGraphFiles(File value) |
int |
addReadBeanGraphs(BeanGraph value) |
int |
addReadConfig(File value) |
void |
changePropertyByName(String name,
Object value) |
Object[] |
childBeans(boolean recursive)
Return an array of all of the properties that are beans and are set.
|
void |
childBeans(boolean recursive,
List beans)
Put all child beans into the beans list.
|
boolean |
equals(Object o) |
boolean |
equals(S2bConfig inst) |
List |
fetchFinderList() |
Object |
fetchPropertyByName(String name) |
List |
fetchReadBeanGraphFilesList() |
List |
fetchReadBeanGraphsList() |
List |
fetchReadConfigList() |
CodeGeneratorFactory |
getCodeGeneratorFactory() |
String |
getDefaultElementType() |
File |
getDelegateDir() |
String |
getDelegatePackage() |
String |
getDocRoot() |
File |
getDumpBeanTree() |
InputStream |
getFileIn() |
File |
getFilename() |
String[] |
getFinder() |
String |
getFinder(int index) |
String |
getGenerateCommonInterface() |
File |
getGenerateDotGraph() |
String |
getIndent() |
int |
getIndentAmount() |
String |
getIndexedPropertyType() |
String |
getInputURI() |
File |
getMddFile() |
InputStream |
getMddIn() |
PrintStream |
getMessageOut() |
MetaDD |
getMetaDD() |
long |
getNewestSourceTime() |
GenBeans.OutputStreamProvider |
getOutputStreamProvider() |
String |
getPackagePath() |
File[] |
getReadBeanGraphFiles() |
File |
getReadBeanGraphFiles(int index) |
BeanGraph[] |
getReadBeanGraphs() |
BeanGraph |
getReadBeanGraphs(int index) |
File[] |
getReadConfig() |
File |
getReadConfig(int index) |
File |
getRootDir() |
String |
getSchemaType() |
String |
getTarget() |
File |
getWriteBeanGraphFile() |
File |
getWriteConfig() |
int |
hashCode() |
boolean |
isAttributesAsProperties() |
boolean |
isAuto() |
boolean |
isCheckUpToDate() |
boolean |
isDefaultsAccessable() |
boolean |
isDoCompile() |
boolean |
isDoGeneration() |
boolean |
isDumpToString() |
boolean |
isExtendBaseBean() |
boolean |
isForME() |
boolean |
isGenerateDelegator() |
boolean |
isGenerateHasChanged() |
boolean |
isGenerateInterfaces() |
boolean |
isGenerateParentRefs() |
boolean |
isGeneratePropertyEvents() |
boolean |
isGenerateStoreEvents() |
boolean |
isGenerateSwitches() |
boolean |
isGenerateTagsFile() |
boolean |
isGenerateTimeStamp() |
boolean |
isGenerateTransactions() |
boolean |
isGenerateValidate() |
boolean |
isGenerateXMLIO() |
boolean |
isJava5() |
boolean |
isKeepElementPositions() |
boolean |
isLogSuspicious() |
boolean |
isMakeDefaults() |
boolean |
isMinFeatures() |
boolean |
isOptionalScalars() |
boolean |
isProcessComments() |
boolean |
isProcessDocType() |
boolean |
isQuiet() |
boolean |
isRemoveUnreferencedNodes() |
boolean |
isRespectExtension() |
boolean |
isScalarException() |
boolean |
isSetDefaults() |
boolean |
isStandalone() |
boolean |
isStaxProduceXMLEventReader() |
boolean |
isStaxUseXMLEventReader() |
boolean |
isThrowErrors() |
boolean |
isTraceDot() |
boolean |
isTraceGen() |
boolean |
isTraceMisc() |
boolean |
isTraceParse() |
boolean |
isTrimNonStrings() |
boolean |
isUseInterfaces() |
boolean |
isUseRuntime() |
boolean |
isVetoable() |
protected void |
missingArgument(String[] args,
String arg) |
protected void |
missingMandatoryArgument(String arg) |
String |
nameChild(Object childObj) |
String |
nameChild(Object childObj,
boolean returnConstName,
boolean returnSchemaName) |
String |
nameChild(Object childObj,
boolean returnConstName,
boolean returnSchemaName,
boolean returnXPathName) |
String |
nameSelf() |
boolean |
parseArguments(String[] args) |
static S2bConfig |
read(Document document) |
static S2bConfig |
read(File f) |
static S2bConfig |
read(InputSource in,
boolean validate,
EntityResolver er,
ErrorHandler eh) |
static S2bConfig |
read(InputStream in) |
protected void |
readFromDocument(Document document) |
void |
readNode(Node node) |
void |
readNode(Node node,
Map namespacePrefixes) |
protected void |
readNodeAttributes(Node node,
Map namespacePrefixes,
NamedNodeMap attrs) |
protected boolean |
readNodeChild(Node childNode,
String childNodeName,
String childNodeValue,
Map namespacePrefixes) |
protected void |
readNodeChildren(Node node,
Map namespacePrefixes) |
static S2bConfig |
readNoEntityResolver(InputStream in)
Warning: in readNoEntityResolver character and entity references will
not be read from any DTD in the XML source.
|
int |
removeFinder(String value)
Search from the end looking for @param value, and then remove it.
|
int |
removeReadBeanGraphFiles(File value)
Search from the end looking for @param value, and then remove it.
|
int |
removeReadBeanGraphs(BeanGraph value)
Search from the end looking for @param value, and then remove it.
|
int |
removeReadConfig(File value)
Search from the end looking for @param value, and then remove it.
|
void |
setAttributesAsProperties(boolean value) |
void |
setAuto(boolean value) |
void |
setCheckUpToDate(boolean value) |
void |
setCodeGeneratorFactory(CodeGeneratorFactory value) |
void |
setDefaultElementType(String value) |
void |
setDefaultsAccessable(boolean value) |
void |
setDelegateDir(File value) |
void |
setDelegatePackage(String value) |
void |
setDoCompile(boolean value) |
void |
setDocRoot(String value) |
void |
setDoGeneration(boolean value) |
void |
setDumpBeanTree(File value) |
void |
setDumpToString(boolean value) |
void |
setExtendBaseBean(boolean value) |
void |
setFileIn(InputStream value) |
void |
setFilename(File value) |
void |
setFinder(int index,
String value) |
void |
setFinder(String[] value) |
void |
setForME(boolean value) |
void |
setGenerateCommonInterface(String value) |
void |
setGenerateDelegator(boolean value) |
void |
setGenerateDotGraph(File value) |
void |
setGenerateHasChanged(boolean value) |
void |
setGenerateInterfaces(boolean value) |
void |
setGenerateParentRefs(boolean value) |
void |
setGeneratePropertyEvents(boolean value) |
void |
setGenerateStoreEvents(boolean value) |
void |
setGenerateSwitches(boolean value) |
void |
setGenerateTagsFile(boolean value) |
void |
setGenerateTimeStamp(boolean value) |
void |
setGenerateTransactions(boolean value) |
void |
setGenerateValidate(boolean value) |
void |
setGenerateXMLIO(boolean value) |
void |
setIndent(String value) |
void |
setIndentAmount(int value) |
void |
setIndexedPropertyType(String value) |
void |
setInputURI(String value) |
void |
setJava5(boolean value) |
void |
setKeepElementPositions(boolean value) |
void |
setLogSuspicious(boolean value) |
void |
setMakeDefaults(boolean value) |
void |
setMddFile(File value) |
void |
setMddIn(InputStream value) |
void |
setMessageOut(PrintStream value) |
void |
setMetaDD(MetaDD value) |
void |
setMinFeatures(boolean value) |
void |
setNewestSourceTime(long value) |
void |
setOptionalScalars(boolean value) |
void |
setOutputStreamProvider(GenBeans.OutputStreamProvider value) |
void |
setPackagePath(String value) |
void |
setProcessComments(boolean value) |
void |
setProcessDocType(boolean value) |
void |
setQuiet(boolean value) |
void |
setReadBeanGraphFiles(File[] value) |
void |
setReadBeanGraphFiles(int index,
File value) |
void |
setReadBeanGraphs(BeanGraph[] value) |
void |
setReadBeanGraphs(int index,
BeanGraph value) |
void |
setReadConfig(File[] value) |
void |
setReadConfig(int index,
File value) |
void |
setRemoveUnreferencedNodes(boolean value) |
void |
setRespectExtension(boolean value) |
void |
setRootDir(File value) |
void |
setScalarException(boolean value) |
void |
setSchemaType(String value) |
void |
setSetDefaults(boolean value) |
void |
setStandalone(boolean value) |
void |
setStaxProduceXMLEventReader(boolean value) |
void |
setStaxUseXMLEventReader(boolean value) |
void |
setTarget(String value) |
void |
setThrowErrors(boolean value) |
void |
setTraceDot(boolean value) |
void |
setTraceGen(boolean value) |
void |
setTraceMisc(boolean value) |
void |
setTraceParse(boolean value) |
void |
setTrimNonStrings(boolean value) |
void |
setUseInterfaces(boolean value) |
void |
setUseRuntime(boolean value) |
void |
setVetoable(boolean value) |
void |
setWriteBeanGraphFile(File value) |
void |
setWriteConfig(File value) |
void |
showHelp(PrintStream out) |
int |
sizeFinder() |
int |
sizeReadBeanGraphFiles() |
int |
sizeReadBeanGraphs() |
int |
sizeReadConfig() |
String |
toString() |
protected int |
unknownArgument(String[] args,
String arg,
int argNum) |
void |
validate() |
void |
write(File f) |
void |
write(OutputStream out) |
void |
write(OutputStream out,
String encoding) |
void |
write(Writer out,
String encoding)
Print this Java Bean to @param out including an XML header.
|
void |
writeNode(Writer out) |
void |
writeNode(Writer out,
String nodeName,
String indent) |
void |
writeNode(Writer out,
String nodeName,
String namespace,
String indent,
Map namespaceMap)
It's not recommended to call this method directly.
|
protected void |
writeNodeAttributes(Writer out,
String nodeName,
String namespace,
String indent,
Map namespaceMap) |
protected void |
writeNodeChildren(Writer out,
String nodeName,
String namespace,
String indent,
Map namespaceMap) |
static void |
writeXML(Writer out,
char msg,
boolean attribute) |
static void |
writeXML(Writer out,
String msg)
Takes some text to be printed into an XML stream and escapes any
characters that might make it invalid XML (like '<').
|
static void |
writeXML(Writer out,
String msg,
boolean attribute) |
public static final String SCHEMATYPE
public static final String TRACEPARSE
public static final String TRACEGEN
public static final String TRACEMISC
public static final String TRACEDOT
public static final String FILENAME
public static final String FILEIN
public static final String DOCROOT
public static final String ROOTDIR
public static final String PACKAGEPATH
public static final String INDENT
public static final String INDENTAMOUNT
public static final String MDDFILE
public static final String MDDIN
public static final String METADD
public static final String DOGENERATION
public static final String SCALAREXCEPTION
public static final String DUMPTOSTRING
public static final String VETOABLE
public static final String STANDALONE
public static final String AUTO
public static final String MESSAGEOUT
public static final String OUTPUTSTREAMPROVIDER
public static final String THROWERRORS
public static final String GENERATEXMLIO
public static final String GENERATEVALIDATE
public static final String GENERATEPROPERTYEVENTS
public static final String GENERATESTOREEVENTS
public static final String GENERATETRANSACTIONS
public static final String ATTRIBUTESASPROPERTIES
public static final String GENERATEDELEGATOR
public static final String DELEGATEDIR
public static final String DELEGATEPACKAGE
public static final String GENERATECOMMONINTERFACE
public static final String DEFAULTSACCESSABLE
public static final String USEINTERFACES
public static final String GENERATEINTERFACES
public static final String KEEPELEMENTPOSITIONS
public static final String REMOVEUNREFERENCEDNODES
public static final String INPUTURI
public static final String INDEXEDPROPERTYTYPE
public static final String DOCOMPILE
public static final String GENERATESWITCHES
public static final String DUMPBEANTREE
public static final String GENERATEDOTGRAPH
public static final String PROCESSCOMMENTS
public static final String PROCESSDOCTYPE
public static final String CHECKUPTODATE
public static final String GENERATEPARENTREFS
public static final String GENERATEHASCHANGED
public static final String NEWESTSOURCETIME
public static final String WRITEBEANGRAPHFILE
public static final String READBEANGRAPHFILES
public static final String READBEANGRAPHS
public static final String MINFEATURES
public static final String FORME
public static final String JAVA5
public static final String GENERATETAGSFILE
public static final String CODEGENERATORFACTORY
public static final String GENERATETIMESTAMP
public static final String QUIET
public static final String WRITECONFIG
public static final String READCONFIG
public static final String MAKEDEFAULTS
public static final String SETDEFAULTS
public static final String TRIMNONSTRINGS
public static final String USERUNTIME
public static final String EXTENDBASEBEAN
public static final String FINDER
public static final String TARGET
public static final String STAXPRODUCEXMLEVENTREADER
public static final String STAXUSEXMLEVENTREADER
public static final String OPTIONALSCALARS
public static final String DEFAULTELEMENTTYPE
public static final String RESPECTEXTENSION
public static final String LOGSUSPICIOUS
public S2bConfig()
public S2bConfig(String schemaType, File rootDir, String indent, boolean doGeneration, boolean scalarException, boolean generateXMLIO, String indexedPropertyType, boolean generateTimeStamp, boolean quiet, boolean makeDefaults)
public S2bConfig(S2bConfig source)
public S2bConfig(S2bConfig source, boolean justData)
justData - just copy the XML relevant datapublic void setSchemaType(String value)
public String getSchemaType()
public void setTraceParse(boolean value)
public boolean isTraceParse()
public void setTraceGen(boolean value)
public boolean isTraceGen()
public void setTraceMisc(boolean value)
public boolean isTraceMisc()
public void setTraceDot(boolean value)
public boolean isTraceDot()
public void setFilename(File value)
public File getFilename()
public void setFileIn(InputStream value)
public InputStream getFileIn()
public void setDocRoot(String value)
public String getDocRoot()
public void setRootDir(File value)
public File getRootDir()
public void setPackagePath(String value)
public String getPackagePath()
public void setIndent(String value)
public String getIndent()
public void setIndentAmount(int value)
public int getIndentAmount()
public void setMddFile(File value)
public File getMddFile()
public void setMddIn(InputStream value)
public InputStream getMddIn()
public void setMetaDD(MetaDD value)
public MetaDD getMetaDD()
public void setDoGeneration(boolean value)
public boolean isDoGeneration()
public void setScalarException(boolean value)
public boolean isScalarException()
public void setDumpToString(boolean value)
public boolean isDumpToString()
public void setVetoable(boolean value)
public boolean isVetoable()
public void setStandalone(boolean value)
public boolean isStandalone()
public void setAuto(boolean value)
public boolean isAuto()
public void setMessageOut(PrintStream value)
public PrintStream getMessageOut()
public void setOutputStreamProvider(GenBeans.OutputStreamProvider value)
public GenBeans.OutputStreamProvider getOutputStreamProvider()
public void setThrowErrors(boolean value)
public boolean isThrowErrors()
public void setGenerateXMLIO(boolean value)
public boolean isGenerateXMLIO()
public void setGenerateValidate(boolean value)
public boolean isGenerateValidate()
public void setGeneratePropertyEvents(boolean value)
public boolean isGeneratePropertyEvents()
public void setGenerateStoreEvents(boolean value)
public boolean isGenerateStoreEvents()
public void setGenerateTransactions(boolean value)
public boolean isGenerateTransactions()
public void setAttributesAsProperties(boolean value)
public boolean isAttributesAsProperties()
public void setGenerateDelegator(boolean value)
public boolean isGenerateDelegator()
public void setDelegateDir(File value)
public File getDelegateDir()
public void setDelegatePackage(String value)
public String getDelegatePackage()
public void setGenerateCommonInterface(String value)
public String getGenerateCommonInterface()
public void setDefaultsAccessable(boolean value)
public boolean isDefaultsAccessable()
public void setUseInterfaces(boolean value)
public boolean isUseInterfaces()
public void setGenerateInterfaces(boolean value)
public boolean isGenerateInterfaces()
public void setKeepElementPositions(boolean value)
public boolean isKeepElementPositions()
public void setRemoveUnreferencedNodes(boolean value)
public boolean isRemoveUnreferencedNodes()
public void setInputURI(String value)
public String getInputURI()
public void setIndexedPropertyType(String value)
public String getIndexedPropertyType()
public void setDoCompile(boolean value)
public boolean isDoCompile()
public void setGenerateSwitches(boolean value)
public boolean isGenerateSwitches()
public void setDumpBeanTree(File value)
public File getDumpBeanTree()
public void setGenerateDotGraph(File value)
public File getGenerateDotGraph()
public void setProcessComments(boolean value)
public boolean isProcessComments()
public void setProcessDocType(boolean value)
public boolean isProcessDocType()
public void setCheckUpToDate(boolean value)
public boolean isCheckUpToDate()
public void setGenerateParentRefs(boolean value)
public boolean isGenerateParentRefs()
public void setGenerateHasChanged(boolean value)
public boolean isGenerateHasChanged()
public void setNewestSourceTime(long value)
public long getNewestSourceTime()
public void setWriteBeanGraphFile(File value)
public File getWriteBeanGraphFile()
public void setReadBeanGraphFiles(File[] value)
public void setReadBeanGraphFiles(int index,
File value)
public File[] getReadBeanGraphFiles()
public List fetchReadBeanGraphFilesList()
public File getReadBeanGraphFiles(int index)
public int sizeReadBeanGraphFiles()
public int addReadBeanGraphFiles(File value)
public int removeReadBeanGraphFiles(File value)
public void setReadBeanGraphs(BeanGraph[] value)
public void setReadBeanGraphs(int index,
BeanGraph value)
public BeanGraph[] getReadBeanGraphs()
public List fetchReadBeanGraphsList()
public BeanGraph getReadBeanGraphs(int index)
public int sizeReadBeanGraphs()
public int addReadBeanGraphs(BeanGraph value)
public int removeReadBeanGraphs(BeanGraph value)
public void setMinFeatures(boolean value)
public boolean isMinFeatures()
public void setForME(boolean value)
public boolean isForME()
public void setJava5(boolean value)
public boolean isJava5()
public void setGenerateTagsFile(boolean value)
public boolean isGenerateTagsFile()
public void setCodeGeneratorFactory(CodeGeneratorFactory value)
public CodeGeneratorFactory getCodeGeneratorFactory()
public void setGenerateTimeStamp(boolean value)
public boolean isGenerateTimeStamp()
public void setQuiet(boolean value)
public boolean isQuiet()
public void setWriteConfig(File value)
public File getWriteConfig()
public void setReadConfig(File[] value)
public void setReadConfig(int index,
File value)
public File[] getReadConfig()
public List fetchReadConfigList()
public File getReadConfig(int index)
public int sizeReadConfig()
public int addReadConfig(File value)
public int removeReadConfig(File value)
public void setMakeDefaults(boolean value)
public boolean isMakeDefaults()
public void setSetDefaults(boolean value)
public boolean isSetDefaults()
public void setTrimNonStrings(boolean value)
public boolean isTrimNonStrings()
public void setUseRuntime(boolean value)
public boolean isUseRuntime()
public void setExtendBaseBean(boolean value)
public boolean isExtendBaseBean()
public void setFinder(String[] value)
public void setFinder(int index,
String value)
public String[] getFinder()
public List fetchFinderList()
public String getFinder(int index)
public int sizeFinder()
public int addFinder(String value)
public int removeFinder(String value)
public void setTarget(String value)
public String getTarget()
public void setStaxProduceXMLEventReader(boolean value)
public boolean isStaxProduceXMLEventReader()
public void setStaxUseXMLEventReader(boolean value)
public boolean isStaxUseXMLEventReader()
public void setOptionalScalars(boolean value)
public boolean isOptionalScalars()
public void setDefaultElementType(String value)
public String getDefaultElementType()
public void setRespectExtension(boolean value)
public boolean isRespectExtension()
public void setLogSuspicious(boolean value)
public boolean isLogSuspicious()
public void _setSchemaLocation(String location)
public String _getSchemaLocation()
public void write(File f) throws IOException
IOExceptionpublic void write(OutputStream out) throws IOException
IOExceptionpublic void write(OutputStream out, String encoding) throws IOException
IOExceptionpublic void write(Writer out, String encoding) throws IOException
encoding - is the encoding style that @param out was opened with.IOExceptionpublic void writeNode(Writer out) throws IOException
IOExceptionpublic void writeNode(Writer out, String nodeName, String indent) throws IOException
IOExceptionpublic void writeNode(Writer out, String nodeName, String namespace, String indent, Map namespaceMap) throws IOException
IOExceptionprotected void writeNodeAttributes(Writer out, String nodeName, String namespace, String indent, Map namespaceMap) throws IOException
IOExceptionprotected void writeNodeChildren(Writer out, String nodeName, String namespace, String indent, Map namespaceMap) throws IOException
IOExceptionpublic static S2bConfig read(File f) throws ParserConfigurationException, SAXException, IOException
public static S2bConfig read(InputStream in) throws ParserConfigurationException, SAXException, IOException
public static S2bConfig readNoEntityResolver(InputStream in) throws ParserConfigurationException, SAXException, IOException
public static S2bConfig read(InputSource in, boolean validate, EntityResolver er, ErrorHandler eh) throws ParserConfigurationException, SAXException, IOException
protected void readFromDocument(Document document)
public void readNode(Node node)
protected void readNodeAttributes(Node node, Map namespacePrefixes, NamedNodeMap attrs)
protected boolean readNodeChild(Node childNode, String childNodeName, String childNodeValue, Map namespacePrefixes)
public static void writeXML(Writer out, String msg) throws IOException
IOExceptionpublic static void writeXML(Writer out, String msg, boolean attribute) throws IOException
IOExceptionpublic static void writeXML(Writer out, char msg, boolean attribute) throws IOException
IOExceptionpublic void validate()
throws S2bConfig.ValidateException
S2bConfig.ValidateExceptionpublic boolean parseArguments(String[] args)
protected void missingMandatoryArgument(String arg)
public void showHelp(PrintStream out)
public String nameSelf()
public String nameChild(Object childObj, boolean returnConstName, boolean returnSchemaName)
childObj - The child object to search forreturnSchemaName - Whether or not the schema name should be returned or the property namepublic String nameChild(Object childObj, boolean returnConstName, boolean returnSchemaName, boolean returnXPathName)
childObj - The child object to search forreturnSchemaName - Whether or not the schema name should be returned or the property namepublic Object[] childBeans(boolean recursive)
public void childBeans(boolean recursive,
List beans)
public boolean equals(S2bConfig inst)
Copyright © 2017. All Rights Reserved.