|
|||||||||
| Home >> All >> org >> [ jdom overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.jdom
Class Verifier

java.lang.Objectorg.jdom.Verifier
- public final class Verifier
- extends java.lang.Object
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.51 $, $Date: 2004/08/31 21:58:55 $
| Field Summary | |
private static java.lang.String |
CVS_ID
|
| Constructor Summary | |
private |
Verifier()
Ensure instantation cannot occur. |
| Method Summary | |
static java.lang.String |
checkAttributeName(java.lang.String name)
This will check the supplied name to see if it is legal for use as a JDOM Attribute name. |
static java.lang.String |
checkCDATASection(java.lang.String data)
This will check the supplied data to see if it is legal for use as JDOM CDATA. |
static java.lang.String |
checkCharacterData(java.lang.String text)
This will check the supplied string to see if it only contains characters allowed by the XML 1.0 specification. |
static java.lang.String |
checkCommentData(java.lang.String data)
This will check the supplied data to see if it is legal for use as JDOM Comment data. |
static java.lang.String |
checkElementName(java.lang.String name)
This will check the supplied name to see if it is legal for use as a JDOM Element name. |
static java.lang.String |
checkNamespaceCollision(Attribute attribute,
Element element)
Check if Attribute's namespace collides with a
Element's namespace. |
static java.lang.String |
checkNamespaceCollision(Namespace namespace,
Attribute attribute)
Check if a Namespace collides with a
Attribute's namespace. |
static java.lang.String |
checkNamespaceCollision(Namespace namespace,
Element element)
Check if a Namespace collides with a
Element's namespace. |
static java.lang.String |
checkNamespaceCollision(Namespace namespace,
java.util.List list)
Check if a Namespace collides with any namespace
from a list of objects. |
static java.lang.String |
checkNamespaceCollision(Namespace namespace,
Namespace other)
Check if two namespaces collide. |
static java.lang.String |
checkNamespacePrefix(java.lang.String prefix)
This will check the supplied name to see if it is legal for use as a JDOM Namespace prefix. |
static java.lang.String |
checkNamespaceURI(java.lang.String uri)
This will check the supplied name to see if it is legal for use as a JDOM Namespace URI. |
static java.lang.String |
checkProcessingInstructionData(java.lang.String data)
This will check the supplied data to see if it is legal for use as ProcessingInstruction data. |
static java.lang.String |
checkProcessingInstructionTarget(java.lang.String target)
This will check the supplied data to see if it is legal for use as a JDOM ProcessingInstruction target. |
static java.lang.String |
checkPublicID(java.lang.String publicID)
This will ensure that the data for a public identifier is legal. |
static java.lang.String |
checkSystemLiteral(java.lang.String systemLiteral)
This will ensure that the data for a system literal is legal. |
static java.lang.String |
checkURI(java.lang.String uri)
Checks a string to see if it is a legal RFC 2396 URI. |
static java.lang.String |
checkXMLName(java.lang.String name)
This is a utility function for sharing the base process of checking any XML name. |
static boolean |
isHexDigit(char c)
|
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
static boolean |
isXMLPublicIDCharacter(char c)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
CVS_ID
private static final java.lang.String CVS_ID
- See Also:
- Constant Field Values
| Constructor Detail |
Verifier
private Verifier()
- Ensure instantation cannot occur.
| Method Detail |
checkElementName
public static java.lang.String checkElementName(java.lang.String name)
- This will check the supplied name to see if it is legal for use as
a JDOM
Elementname.
checkAttributeName
public static java.lang.String checkAttributeName(java.lang.String name)
- This will check the supplied name to see if it is legal for use as
a JDOM
Attributename.
checkCharacterData
public static java.lang.String checkCharacterData(java.lang.String text)
- 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.
checkCDATASection
public static java.lang.String checkCDATASection(java.lang.String data)
- This will check the supplied data to see if it is legal for use as
JDOM
CDATA.
checkNamespacePrefix
public static java.lang.String checkNamespacePrefix(java.lang.String prefix)
- This will check the supplied name to see if it is legal for use as
a JDOM
Namespaceprefix.
checkNamespaceURI
public static java.lang.String checkNamespaceURI(java.lang.String uri)
- This will check the supplied name to see if it is legal for use as
a JDOM
NamespaceURI.
checkNamespaceCollision
public static java.lang.String checkNamespaceCollision(Namespace namespace, Namespace other)
- Check if two namespaces collide.
checkNamespaceCollision
public static java.lang.String checkNamespaceCollision(Attribute attribute, Element element)
checkNamespaceCollision
public static java.lang.String checkNamespaceCollision(Namespace namespace, Element element)
checkNamespaceCollision
public static java.lang.String checkNamespaceCollision(Namespace namespace, Attribute attribute)
checkNamespaceCollision
public static java.lang.String checkNamespaceCollision(Namespace namespace, java.util.List list)
- Check if a
Namespacecollides with any namespace from a list of objects.
checkProcessingInstructionTarget
public static java.lang.String checkProcessingInstructionTarget(java.lang.String target)
- This will check the supplied data to see if it is legal for use as
a JDOM
ProcessingInstructiontarget.
checkProcessingInstructionData
public static java.lang.String checkProcessingInstructionData(java.lang.String data)
- This will check the supplied data to see if it is legal for use as
ProcessingInstructiondata. Besides checking that all the characters are allowed in XML, this also checks that the data does not contain the PI end-string "?>".
checkCommentData
public static java.lang.String checkCommentData(java.lang.String data)
- This will check the supplied data to see if it is legal for use as
JDOM
Commentdata.
isXMLPublicIDCharacter
public static boolean isXMLPublicIDCharacter(char c)
checkPublicID
public static java.lang.String checkPublicID(java.lang.String publicID)
- This will ensure that the data for a public identifier
is legal.
checkSystemLiteral
public static java.lang.String checkSystemLiteral(java.lang.String systemLiteral)
- This will ensure that the data for a system literal
is legal.
checkXMLName
public static java.lang.String checkXMLName(java.lang.String name)
- This is a utility function for sharing the base process of checking
any XML name.
checkURI
public static java.lang.String checkURI(java.lang.String uri)
Checks a string to see if it is a legal RFC 2396 URI. Both absolute and relative URIs are supported.
isHexDigit
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
isURICharacter
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.
isXMLCharacter
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.
isXMLNameCharacter
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.
isXMLNameStartCharacter
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. This production does allow names
to begin with colons which the Namespaces in XML Recommendation
disallows.
isXMLLetterOrDigit
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.
isXMLLetter
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.
isXMLCombiningChar
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.
isXMLExtender
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.
isXMLDigit
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.
|
|||||||||
| Home >> All >> org >> [ jdom overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.jdom.Verifier