|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cip4.jdflib.validate.JDFValidator
public class JDFValidator
this is the non-commandline part of the original checkJDF and used both by the JDF Editor and checkJDF
Refactored JDFValidator to be non-static in order to make it thread compatible. Previously, only one thread at a time could call JDFValidator from within the
same JVM. Now an instance of JDFValidator and the the method validate should be called. JDFValidator can still be called from the command line in the same
way as before.
TODO Break out validation error handling logging so that new error handlers can easily be registered. For example, there should be an error handler for
logging to the XML log file and an error handler for logging to the sysOut. Perhaps org.xml.sax.ErrorHandler could be used?
| Nested Class Summary | |
|---|---|
protected static class |
JDFValidator.MySysOut
This is just a quick and dirty class to centrally switch print on and off |
| Field Summary | |
|---|---|
VString |
allFiles
|
boolean |
bMultiID
|
protected boolean |
bPrintNameSpace
|
boolean |
bQuiet
|
boolean |
bTiming
|
boolean |
bValidate
|
boolean |
bWarnDanglingURL
if true, warn on URL attributes that point to Nirvana |
protected boolean |
bWarning
|
String |
devCapFile
|
JDFElement.EnumValidationLevel |
level
|
protected XMLDoc |
pOut
|
String |
proxyHost
|
String |
proxyPort
|
String |
schemaLocation
|
protected JDFValidator.MySysOut |
sysOut
|
JDFBaseDataTypes.EnumFitsValue |
testlists
|
protected String |
translation
|
VString |
vBadID
|
protected static String |
version
|
VString |
vMultiID
|
String |
xmlOutputName
|
String |
xslStyleSheet
|
| Constructor Summary | |
|---|---|
JDFValidator()
|
|
| Method Summary | |
|---|---|
void |
addFile(String xmlFile)
|
boolean |
isBWarning()
|
boolean |
isValid(JDFDoc doc)
process a single document as specified by doc if doc==null, reprocess the currently stored document |
XMLDoc |
processAllFiles()
processes all files that have been placed into the public VString member JDFValidator.allFiles |
XMLDoc |
processMimeStream(InputStream inStream)
process a mime file |
XMLDoc |
processSingleDocument(JDFDoc doc)
process a single document as specified by doc if doc==null, reprocess the currently stored document |
XMLDoc |
processSingleFile(InputStream inStream,
String url,
String xmlFile)
Deprecated. - use either processSingleDoc, processSingleStream or processSinglFile(String) this will be made private |
protected XMLDoc |
processSingleFile(InputStream inStream,
String url,
String xmlFile,
javax.mail.BodyPart bp)
processes a single file |
XMLDoc |
processSingleFile(String fileName)
process a single file document as specified by fileName |
XMLDoc |
processSingleStream(InputStream stream,
String fileName,
javax.mail.BodyPart bp)
process a single document as specified by doc |
XMLDoc |
processSingleURLStream(InputStream stream,
String url)
process a single document as specified by doc |
XMLDoc |
processZipFile(File argFile)
we may want to create something similar for a zip stream |
protected void |
setAllFiles(MyArgs args)
|
void |
setDoc(JDFDoc d)
set the JDFDoc (JDF or JMF) to set |
void |
setIgnorePrivate(boolean bIgnore)
if bI |
void |
setJDFSchemaLocation(File _schemaLocation)
|
void |
setJDFSchemaLocation(String _schemaLocation)
Deprecated. use setJDFSchemaLocation(File) |
void |
setPrint(boolean b)
sets the System.out print on or off |
void |
setValidatorFactory(ICheckValidatorFactory pvalidatorFactory)
|
void |
setWarning(boolean warning)
|
static String |
toMessageString(KElement checkOut)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public VString vBadID
public VString vMultiID
protected XMLDoc pOut
protected String translation
public boolean bTiming
protected boolean bWarning
public boolean bQuiet
protected boolean bPrintNameSpace
public boolean bValidate
public boolean bWarnDanglingURL
public JDFElement.EnumValidationLevel level
public VString allFiles
public String proxyHost
public String proxyPort
public String schemaLocation
public String xmlOutputName
public String xslStyleSheet
public String devCapFile
public JDFBaseDataTypes.EnumFitsValue testlists
public boolean bMultiID
protected static final String version
protected JDFValidator.MySysOut sysOut
| Constructor Detail |
|---|
public JDFValidator()
| Method Detail |
|---|
public static String toMessageString(KElement checkOut)
checkOut -
public void setDoc(JDFDoc d)
d - the JDFDoc to set this topublic void setIgnorePrivate(boolean bIgnore)
bIgnore - public void setPrint(boolean b)
b - @Deprecated public void setJDFSchemaLocation(String _schemaLocation)
_schemaLocation - public void setJDFSchemaLocation(File _schemaLocation)
_schemaLocation - the schema locationpublic XMLDoc processAllFiles()
public XMLDoc processZipFile(File argFile)
argFile -
public XMLDoc processMimeStream(InputStream inStream)
argFile -
public XMLDoc processSingleDocument(JDFDoc doc)
doc - the parsed document to process
public boolean isValid(JDFDoc doc)
doc - the parsed document to process
public XMLDoc processSingleURLStream(InputStream stream,
String url)
stream - the input streamurl - the url that the stream is sent to
public XMLDoc processSingleStream(InputStream stream,
String fileName,
javax.mail.BodyPart bp)
stream - the input streamfileName - the fileName that the stream originated frombp -
public XMLDoc processSingleFile(String fileName)
fileName - the path of the file to parse and validate
@Deprecated
public XMLDoc processSingleFile(InputStream inStream,
String url,
String xmlFile)
inStream - url - xmlFile -
protected XMLDoc processSingleFile(InputStream inStream,
String url,
String xmlFile,
javax.mail.BodyPart bp)
inStream - url - xmlFile -
protected void setAllFiles(MyArgs args)
public void addFile(String xmlFile)
public boolean isBWarning()
public void setWarning(boolean warning)
warning - the bWarning to setpublic void setValidatorFactory(ICheckValidatorFactory pvalidatorFactory)
validatorFactory - the validatorFactory to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||