public class JDFValidator extends Object
sysOut
. Perhaps org.xml.sax.ErrorHandler
could be used?Modifier and Type | Class and Description |
---|---|
protected static class |
JDFValidator.MySysOut
This is just a quick and dirty class to centrally switch print on and off
|
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
JDFValidator() |
Modifier and Type | Method and Description |
---|---|
void |
addFile(String xmlFile) |
protected String |
getInvalidText(JDFElement jdfElement) |
protected KElement |
getTestElement(KElement kElement,
KElement xmlParent) |
boolean |
isBWarning() |
boolean |
isValid(JDFDoc doc)
process a single document as specified by doc if doc==null, reprocess the currently stored document
|
protected JDFElement |
printBadJDF(KElement kElement,
int indent,
KElement xmlParent,
boolean bIsNodeRoot,
String id,
String elmName,
KElement testElement,
boolean bIsValid) |
protected void |
printNonNamespace(KElement kElement,
int indent,
KElement xmlParent,
String pref,
String elmName,
String nsURI,
KElement testElement,
boolean isJDFNS,
boolean bTypo) |
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)
this can be either a file or a network url
|
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) |
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
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
- protected JDFElement printBadJDF(KElement kElement, int indent, KElement xmlParent, boolean bIsNodeRoot, String id, String elmName, KElement testElement, boolean bIsValid)
protected void printNonNamespace(KElement kElement, int indent, KElement xmlParent, String pref, String elmName, String nsURI, KElement testElement, boolean isJDFNS, boolean bTypo)
protected String getInvalidText(JDFElement jdfElement)
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 processpublic boolean isValid(JDFDoc doc)
doc
- the parsed document to processpublic XMLDoc processSingleURLStream(InputStream stream, String url)
stream
- the input streamurl
- the url that the stream is sent topublic 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 setCopyright © 2018. All rights reserved.