|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.taursys.dom.DocumentAdapterBuilder com.taursys.dom.TidyDocumentAdapterBuilder
TidyDocumentAdapterBuilder is used to create a DOM_2_20001113_DocumentAdapter. It provides a variety of build methods with options to validate the document source. It uses the JTidy 04Aug2000r7-dev DOMParser to create the DocumentAdapter.
Field Summary | |
static java.lang.String |
FEATURE_CORRECT_COMMENTS
|
static java.lang.String |
FEATURE_INDENT_DOCUMENT
|
static java.lang.String |
FEATURE_ONLY_ERRORS
|
static java.lang.String |
FEATURE_QUIET
|
static java.lang.String |
FEATURE_TIDY_MARK
|
static java.lang.String |
PROPERTY_ERROR_OUT
|
Fields inherited from class com.taursys.dom.DocumentAdapterBuilder |
MESSAGE_NULL_INPUT_STREAM |
Constructor Summary | |
TidyDocumentAdapterBuilder()
Constructs new builder with FEATURE_TIDY_MARK set false, FEATURE_CORRECT_COMMENTS set true and PROPERTY_ERROR_OUT set to a dummy print stream. |
Method Summary | |
DocumentAdapter |
build(java.io.InputStream is)
Build a new DocumentAdapter from the XML document contained in the InputStream. |
java.io.PrintWriter |
getErrout()
|
boolean |
getFeature(java.lang.String featureName)
Returns true if given featureName is enables, otherwise false See the Specific DocumentAdapterBuilder, DocumentBuilder and/or Parser for the specific Features and Properties. |
java.lang.Object |
getProperty(java.lang.String propertyName)
Gets the given property. |
boolean |
isCorrectComments()
|
boolean |
isIndentDocument()
|
boolean |
isOnlyErrors()
|
boolean |
isQuiet()
|
boolean |
isTidyMark()
|
void |
setCorrectComments(boolean correctComments)
|
void |
setErrout(java.io.PrintWriter arg0)
|
void |
setFeature(java.lang.String featureName,
boolean value)
Enables the given featureName if value is true, otherwise disables feature. |
void |
setIndentDocument(boolean indentDocument)
|
void |
setOnlyErrors(boolean arg0)
|
void |
setProperty(java.lang.String propertyName,
java.lang.Object value)
Sets the given property to the given value. |
void |
setQuiet(boolean arg0)
|
void |
setTidyMark(boolean arg0)
|
Methods inherited from class com.taursys.dom.DocumentAdapterBuilder |
build, build, build, build |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String FEATURE_CORRECT_COMMENTS
public static final java.lang.String FEATURE_INDENT_DOCUMENT
public static final java.lang.String FEATURE_ONLY_ERRORS
public static final java.lang.String FEATURE_QUIET
public static final java.lang.String FEATURE_TIDY_MARK
public static final java.lang.String PROPERTY_ERROR_OUT
Constructor Detail |
public TidyDocumentAdapterBuilder()
Method Detail |
public void setFeature(java.lang.String featureName, boolean value)
DocumentAdapterBuilder
setFeature
in class DocumentAdapterBuilder
featureName
- to enable/disablevalue
- true to enable, false to disablepublic boolean getFeature(java.lang.String featureName)
DocumentAdapterBuilder
getFeature
in class DocumentAdapterBuilder
featureName
- to query
public void setProperty(java.lang.String propertyName, java.lang.Object value)
DocumentAdapterBuilder
setProperty
in class DocumentAdapterBuilder
propertyName
- name of the property to setvalue
- for the propertypublic java.lang.Object getProperty(java.lang.String propertyName)
DocumentAdapterBuilder
getProperty
in class DocumentAdapterBuilder
propertyName
- to retrieve
public DocumentAdapter build(java.io.InputStream is) throws DocumentAdapterBuilderException
DocumentAdapterBuilder
build
in class DocumentAdapterBuilder
is
- InputStream containing the XML source document
DocumentAdapterBuilderException
- if invalid parameters or problems parsing the document.public boolean isCorrectComments()
public void setCorrectComments(boolean correctComments)
public boolean isIndentDocument()
public void setIndentDocument(boolean indentDocument)
public boolean isOnlyErrors()
public boolean isQuiet()
public boolean isTidyMark()
public void setOnlyErrors(boolean arg0)
public void setQuiet(boolean arg0)
public void setTidyMark(boolean arg0)
public java.io.PrintWriter getErrout()
public void setErrout(java.io.PrintWriter arg0)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |