| java.lang.Object org.jdom.Verifier
Verifier | final public class Verifier (Code) | | A utility class to handle well-formedness checks on names, data, and other
verification tasks for JDOM. The class is final and may not be subclassed.
version: $Revision: 1.1 $, $Date: 2005/04/27 09:32:39 $ author: Brett McLaughlin author: Elliotte Rusty Harold author: Jason Hunter author: Bradley S. Huffman |
Method Summary | |
public static String | checkAttributeName(String name) This will check the supplied name to see if it is legal for use as
a JDOM
Attribute name.
Parameters: name - String name to check. | public static String | checkCDATASection(String data) This will check the supplied data to see if it is legal for use as
JDOM
CDATA .
Parameters: data - String data to check. | public static String | checkCharacterData(String text) This will check the supplied string to see if it only contains
characters allowed by the XML 1.0 specification. | public static String | checkCommentData(String data) This will check the supplied data to see if it is legal for use as
JDOM
Comment data.
Parameters: data - String data to check. | public static String | checkElementName(String name) This will check the supplied name to see if it is legal for use as
a JDOM
Element name.
Parameters: name - String name to check. | public static String | checkNamespaceCollision(Namespace namespace, Namespace other) Check if two namespaces collide.
Parameters: namespace - Namespace to check. Parameters: other - Namespace to check against. | public static String | checkNamespaceCollision(Attribute attribute, Element element) Check if
Attribute 's namespace collides with a
Element 's namespace.
Parameters: attribute - Attribute to check. Parameters: element - Element to check against. | public static String | checkNamespaceCollision(Namespace namespace, Element element) Check if a
Namespace collides with a
Element 's namespace.
Parameters: namespace - Namespace to check. Parameters: element - Element to check against. | public static String | checkNamespaceCollision(Namespace namespace, Attribute attribute) Check if a
Namespace collides with a
Attribute 's namespace.
Parameters: namespace - Namespace to check. Parameters: attribute - Attribute to check against. | public static String | checkNamespaceCollision(Namespace namespace, List list) Check if a
Namespace collides with any namespace
from a list of objects.
Parameters: namespace - Namespace to check. Parameters: list - List to check against. | public static String | checkNamespacePrefix(String prefix) This will check the supplied name to see if it is legal for use as
a JDOM
Namespace prefix.
Parameters: prefix - String prefix to check. | public static String | checkNamespaceURI(String uri) This will check the supplied name to see if it is legal for use as
a JDOM
Namespace URI.
Parameters: uri - String URI to check. | public static String | checkProcessingInstructionData(String data) This will check the supplied data to see if it is legal for use as
ProcessingInstruction data. | public static String | checkProcessingInstructionTarget(String target) This will check the supplied data to see if it is legal for use as
a JDOM
ProcessingInstruction target.
Parameters: target - String target to check. | public static String | checkPublicID(String publicID) This will ensure that the data for a public identifier
is legal.
Parameters: publicID - String public ID to check. | public static String | checkSystemLiteral(String systemLiteral) This will ensure that the data for a system literal
is legal.
Parameters: systemLiteral - String system literal to check. | public static String | checkURI(String uri)
Checks a string to see if it is a legal RFC 2396 URI.
Both absolute and relative URIs are supported.
Parameters: uri - String to check. | public static String | checkXMLName(String name) This is a utility function for sharing the base process of checking
any XML name.
Parameters: name - String to check for XML name compliance. | public static boolean | isHexDigit(char c)
This is a utility function for determining whether a specified
Unicode character is a hexadecimal digit as defined in RFC 2396;
that is, one of the ASCII characters 0-9, a-f, or A-F
Parameters: c - to check for hex digit. | public static boolean | isURICharacter(char c)
This is a utility function for determining whether
a specified Unicode character is legal in URI references
as determined by RFC 2396.
Parameters: c - char to check for URI reference compliance. | public static boolean | isXMLCharacter(int c) This is a utility function for determining whether a specified
character is a character according to production 2 of the
XML 1.0 specification. | public static boolean | isXMLCombiningChar(char c) This is a utility function for determining whether a specified character
is a combining character according to production 87
of the XML 1.0 specification.
Parameters: c - char to check. | public static boolean | isXMLDigit(char c) This is a utility function for determining whether a specified
Unicode character
is a digit according to production 88 of the XML 1.0 specification. | public static boolean | isXMLExtender(char c) This is a utility function for determining whether a specified
character is an extender according to production 88 of the XML 1.0
specification.
Parameters: c - char to check. | public static boolean | isXMLLetter(char c) This is a utility function for determining whether a specified character
is a letter according to production 84 of the XML 1.0 specification.
Parameters: c - char to check for XML name compliance. | public static boolean | isXMLLetterOrDigit(char c) This is a utility function for determining whether a specified
character is a letter or digit according to productions 84 and 88
of the XML 1.0 specification.
Parameters: c - char to check. | public static boolean | isXMLNameCharacter(char c) This is a utility function for determining whether a specified
character is a name character according to production 4 of the
XML 1.0 specification.
Parameters: c - char to check for XML name compliance. | public static boolean | isXMLNameStartCharacter(char c) This is a utility function for determining whether a specified
character is a legal name start character according to production 5
of the XML 1.0 specification. | public static boolean | isXMLPublicIDCharacter(char c) |
checkAttributeName | public static String checkAttributeName(String name)(Code) | | This will check the supplied name to see if it is legal for use as
a JDOM
Attribute name.
Parameters: name - String name to check. String reason name is illegal, ornull if name is OK. |
checkCDATASection | public static String checkCDATASection(String data)(Code) | | This will check the supplied data to see if it is legal for use as
JDOM
CDATA .
Parameters: data - String data to check. String reason data is illegal, ornull is name is OK. |
checkCharacterData | public static String checkCharacterData(String text)(Code) | | This will check the supplied string to see if it only contains
characters allowed by the XML 1.0 specification. The C0 controls
(e.g. null, vertical tab, formfeed, etc.) are specifically excluded
except for carriage return, linefeed, and the horizontal tab.
Surrogates are also excluded.
This method is useful for checking element content and attribute
values. Note that characters
like " and < are allowed in attribute values and element content.
They will simply be escaped as " or <
when the value is serialized.
Parameters: text - String value to check. String reason name is illegal, ornull if name is OK. |
checkCommentData | public static String checkCommentData(String data)(Code) | | This will check the supplied data to see if it is legal for use as
JDOM
Comment data.
Parameters: data - String data to check. String reason data is illegal, ornull if data is OK. |
checkElementName | public static String checkElementName(String name)(Code) | | This will check the supplied name to see if it is legal for use as
a JDOM
Element name.
Parameters: name - String name to check. String reason name is illegal, ornull if name is OK. |
checkNamespaceCollision | public static String checkNamespaceCollision(Namespace namespace, Namespace other)(Code) | | Check if two namespaces collide.
Parameters: namespace - Namespace to check. Parameters: other - Namespace to check against. String reason for collision, ornull if no collision. |
checkNamespaceCollision | public static String checkNamespaceCollision(Attribute attribute, Element element)(Code) | | Check if
Attribute 's namespace collides with a
Element 's namespace.
Parameters: attribute - Attribute to check. Parameters: element - Element to check against. String reason for collision, ornull if no collision. |
checkNamespaceCollision | public static String checkNamespaceCollision(Namespace namespace, Element element)(Code) | | Check if a
Namespace collides with a
Element 's namespace.
Parameters: namespace - Namespace to check. Parameters: element - Element to check against. String reason for collision, ornull if no collision. |
checkNamespaceCollision | public static String checkNamespaceCollision(Namespace namespace, Attribute attribute)(Code) | | Check if a
Namespace collides with a
Attribute 's namespace.
Parameters: namespace - Namespace to check. Parameters: attribute - Attribute to check against. String reason for collision, ornull if no collision. |
checkNamespaceCollision | public static String checkNamespaceCollision(Namespace namespace, List list)(Code) | | Check if a
Namespace collides with any namespace
from a list of objects.
Parameters: namespace - Namespace to check. Parameters: list - List to check against. String reason for collision, ornull if no collision. |
checkNamespacePrefix | public static String checkNamespacePrefix(String prefix)(Code) | | This will check the supplied name to see if it is legal for use as
a JDOM
Namespace prefix.
Parameters: prefix - String prefix to check. String reason name is illegal, ornull if name is OK. |
checkNamespaceURI | public static String checkNamespaceURI(String uri)(Code) | | This will check the supplied name to see if it is legal for use as
a JDOM
Namespace URI.
Parameters: uri - String URI to check. String reason name is illegal, ornull if name is OK. |
checkProcessingInstructionData | public static String checkProcessingInstructionData(String data)(Code) | | This will check the supplied data to see if it is legal for use as
ProcessingInstruction data. Besides checking that
all the characters are allowed in XML, this also checks
that the data does not contain the PI end-string "?>".
Parameters: data - String data to check. String reason data is illegal, ornull if data is OK. |
checkProcessingInstructionTarget | public static String checkProcessingInstructionTarget(String target)(Code) | | This will check the supplied data to see if it is legal for use as
a JDOM
ProcessingInstruction target.
Parameters: target - String target to check. String reason target is illegal, ornull if target is OK. |
checkPublicID | public static String checkPublicID(String publicID)(Code) | | This will ensure that the data for a public identifier
is legal.
Parameters: publicID - String public ID to check. String reason public ID is illegal, ornull if public ID is OK. |
checkSystemLiteral | public static String checkSystemLiteral(String systemLiteral)(Code) | | This will ensure that the data for a system literal
is legal.
Parameters: systemLiteral - String system literal to check. String reason system literal is illegal, ornull if system literal is OK. |
checkURI | public static String checkURI(String uri)(Code) | |
Checks a string to see if it is a legal RFC 2396 URI.
Both absolute and relative URIs are supported.
Parameters: uri - String to check. String reason the URI is illegal, ornull if OK. |
checkXMLName | public static String checkXMLName(String name)(Code) | | This is a utility function for sharing the base process of checking
any XML name.
Parameters: name - String to check for XML name compliance. String reason the name is illegal, ornull if OK. |
isHexDigit | public static boolean isHexDigit(char c)(Code) | |
This is a utility function for determining whether a specified
Unicode character is a hexadecimal digit as defined in RFC 2396;
that is, one of the ASCII characters 0-9, a-f, or A-F
Parameters: c - to check for hex digit. true if it's allowed, false otherwise. |
isURICharacter | public static boolean isURICharacter(char c)(Code) | |
This is a utility function for determining whether
a specified Unicode character is legal in URI references
as determined by RFC 2396.
Parameters: c - char to check for URI reference compliance. true if it's allowed, false otherwise. |
isXMLCharacter | public static boolean isXMLCharacter(int c)(Code) | | This is a utility function for determining whether a specified
character is a character according to production 2 of the
XML 1.0 specification.
Parameters: c - char to check for XML compliance boolean true if it's a character, false otherwise |
isXMLCombiningChar | public static boolean isXMLCombiningChar(char c)(Code) | | This is a utility function for determining whether a specified character
is a combining character according to production 87
of the XML 1.0 specification.
Parameters: c - char to check. boolean true if it's a combining character,false otherwise. |
isXMLDigit | public static boolean isXMLDigit(char c)(Code) | | This is a utility function for determining whether a specified
Unicode character
is a digit according to production 88 of the XML 1.0 specification.
Parameters: c - char to check for XML digit compliance boolean true if it's a digit, false otherwise |
isXMLExtender | public static boolean isXMLExtender(char c)(Code) | | This is a utility function for determining whether a specified
character is an extender according to production 88 of the XML 1.0
specification.
Parameters: c - char to check. String true if it's an extender, false otherwise. |
isXMLLetter | public static boolean isXMLLetter(char c)(Code) | | This is a utility function for determining whether a specified character
is a letter according to production 84 of the XML 1.0 specification.
Parameters: c - char to check for XML name compliance. String true if it's a letter, false otherwise. |
isXMLLetterOrDigit | public static boolean isXMLLetterOrDigit(char c)(Code) | | This is a utility function for determining whether a specified
character is a letter or digit according to productions 84 and 88
of the XML 1.0 specification.
Parameters: c - char to check. boolean true if it's letter or digit, false otherwise. |
isXMLNameCharacter | public static boolean isXMLNameCharacter(char c)(Code) | | This is a utility function for determining whether a specified
character is a name character according to production 4 of the
XML 1.0 specification.
Parameters: c - char to check for XML name compliance. boolean true if it's a name character, false otherwise. |
isXMLNameStartCharacter | public static boolean isXMLNameStartCharacter(char c)(Code) | | This is a utility function for determining whether a specified
character is a legal name start character according to production 5
of the XML 1.0 specification. This production does allow names
to begin with colons which the Namespaces in XML Recommendation
disallows.
Parameters: c - char to check for XML name start compliance. boolean true if it's a name start character, false otherwise. |
isXMLPublicIDCharacter | public static boolean isXMLPublicIDCharacter(char c)(Code) | | |
|
|