SMILA (incubation) API documentation

org.eclipse.smila.processing.pipelets.xmlprocessing.util
Class XMLUtilsConfig

java.lang.Object
  extended by org.eclipse.smila.processing.pipelets.xmlprocessing.util.XMLUtilsConfig

public class XMLUtilsConfig
extends java.lang.Object

This class holds data to construct and set the parser in XMLUtils.


Constructor Summary
XMLUtilsConfig()
          Shorthand for XMLUtilsConfig(true, false).
XMLUtilsConfig(boolean validate, boolean includeIgnorableWhitespace)
          Validation by XML Schema is always turned on.
 
Method Summary
 java.util.Iterator<java.lang.String> getFeatures()
          Returns all features as String-Objects in this iterator.
 boolean getFeatureValue(java.lang.String feature)
          Returns the value of a given feature.
 java.lang.Boolean getIncludeIgnorabelWhitespace()
          Shorthand for getFeature("http://apache.org/xml/features/dom/include-ignorable-whitespace") .
 java.lang.Boolean getValidate()
          Shorthand for getFeature("http://xml.org/sax/features/validation") .
 void setFeature(java.lang.String feature, boolean value)
          These are the same features as allowed by the used parser.
 void setIncludeIgnorabelWhitespace(boolean value)
          Shorthand for setFeature("http://apache.org/xml/features/dom/include-ignorable-whitespace", value) .
 void setValidate(boolean value)
          Shorthand for setFeature("http://xml.org/sax/features/validation", value) .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLUtilsConfig

public XMLUtilsConfig()
Shorthand for
 XMLUtilsConfig(true, false).
 
This means that validation and stripping of empty text nodes is turned on by default. ************************************************************************


XMLUtilsConfig

public XMLUtilsConfig(boolean validate,
                      boolean includeIgnorableWhitespace)
Validation by XML Schema is always turned on.

Parameters:
validate - boolean flag if to validate
includeIgnorableWhitespace - boolean flag if ti include ignorable whitespaces
Method Detail

getIncludeIgnorabelWhitespace

public java.lang.Boolean getIncludeIgnorabelWhitespace()
Shorthand for
 getFeature("http://apache.org/xml/features/dom/include-ignorable-whitespace")
 
.

Returns:
a Boolean

setIncludeIgnorabelWhitespace

public void setIncludeIgnorabelWhitespace(boolean value)
Shorthand for
 setFeature("http://apache.org/xml/features/dom/include-ignorable-whitespace", value)
 
. If this is turned on then validation must be turned on eventually too other wise an exception will be thrown when given this as a paramter to a parse()-method in XMLUtils.

Parameters:
value - boolean flag

getValidate

public java.lang.Boolean getValidate()
Shorthand for
 getFeature("http://xml.org/sax/features/validation")
 
.

Returns:
a Boolean

setValidate

public void setValidate(boolean value)
Shorthand for
 setFeature("http://xml.org/sax/features/validation", value)
 
.

Parameters:
value - boolean flag

setFeature

public void setFeature(java.lang.String feature,
                       boolean value)
These are the same features as allowed by the used parser. However, it's not checked here if they are supported or not.

Parameters:
feature - the feature
value - the boolean value

getFeatures

public java.util.Iterator<java.lang.String> getFeatures()
Returns all features as String-Objects in this iterator. Used in conjuction with #getFeatureValue() it is possible to retrieve all set features and their values.

Returns:
an Iterator

getFeatureValue

public boolean getFeatureValue(java.lang.String feature)
Returns the value of a given feature. Used in conjuction with getFeatures() it is possible to retrieve all set features and their values.

Parameters:
feature - the feature
Returns:
a boolean

SMILA (incubation) API documentation