org.attoparser.markup.html
Class HtmlParsingConfiguration

Object
  extended by org.attoparser.markup.html.HtmlParsingConfiguration
All Implemented Interfaces:
Serializable

public final class HtmlParsingConfiguration
extends Object
implements Serializable

Since:
1.1
Author:
Daniel Fernández
See Also:
Serialized Form

Constructor Summary
HtmlParsingConfiguration()
           
 
Method Summary
 HtmlParsingConfiguration clone()
           
 boolean getRequireUniqueAttributesInElement()
           Determines whether attributes should never appear duplicated in elements.
 boolean getRequireXmlWellFormedAttributeValues()
           Determine whether element attributes will be required to be well-formed from the XML standpoint.
 MarkupParsingConfiguration.UniqueRootElementPresence getUniqueRootElementPresence()
           This value determines whether it will be required that the document has a unique root element.
 boolean isCaseSensitive()
           Determines whether validations performed on the parsed document should be case sensitive or not (e.g. attribute names, document root element name, element open vs close elements, etc.)
 void setCaseSensitive(boolean caseSensitive)
           
 void setRequireUniqueAttributesInElement(boolean requireUniqueAttributesInElement)
           
 void setRequireXmlWellFormedAttributeValues(boolean requireXmlWellFormedAttributeValues)
           
 void setUniqueRootElementPresence(MarkupParsingConfiguration.UniqueRootElementPresence uniqueRootElementPresence)
           
protected static void validateNotNull(Object obj, String message)
           
 
Methods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlParsingConfiguration

public HtmlParsingConfiguration()
Method Detail

isCaseSensitive

public boolean isCaseSensitive()

Determines whether validations performed on the parsed document should be case sensitive or not (e.g. attribute names, document root element name, element open vs close elements, etc.)

Default is false.

Returns:
whether validations should be case sensitive or not.

setCaseSensitive

public void setCaseSensitive(boolean caseSensitive)

getRequireXmlWellFormedAttributeValues

public boolean getRequireXmlWellFormedAttributeValues()

Determine whether element attributes will be required to be well-formed from the XML standpoint. This means:

Default is false.

Returns:
whether attributes should be XML-well-formed or not.

setRequireXmlWellFormedAttributeValues

public void setRequireXmlWellFormedAttributeValues(boolean requireXmlWellFormedAttributeValues)

getRequireUniqueAttributesInElement

public boolean getRequireUniqueAttributesInElement()

Determines whether attributes should never appear duplicated in elements.

Default is false.

Returns:
whether attributes should never appear duplicated in elements.

setRequireUniqueAttributesInElement

public void setRequireUniqueAttributesInElement(boolean requireUniqueAttributesInElement)

getUniqueRootElementPresence

public MarkupParsingConfiguration.UniqueRootElementPresence getUniqueRootElementPresence()

This value determines whether it will be required that the document has a unique root element.

If set to MarkupParsingConfiguration.UniqueRootElementPresence.REQUIRED_ALWAYS, then a document with more than one elements at the root level will never be considered valid. And if there is a DOCTYPE clause, it will be checked that the root name established at the DOCTYPE clause is the same as the document's element root.

If set to MarkupParsingConfiguration.UniqueRootElementPresence.DEPENDS_ON_PROLOG_DOCTYPE, then:

Default value is MarkupParsingConfiguration.UniqueRootElementPresence.DEPENDS_ON_PROLOG_DOCTYPE.

Returns:
the configuration value for validating the presence of a unique root element.

setUniqueRootElementPresence

public void setUniqueRootElementPresence(MarkupParsingConfiguration.UniqueRootElementPresence uniqueRootElementPresence)

clone

public HtmlParsingConfiguration clone()
                               throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException

validateNotNull

protected static void validateNotNull(Object obj,
                                      String message)


Copyright © 2012 The ATTOPARSER team. All Rights Reserved.