com.hp.hpl.jena.iri.impl
Class ViolationImpl

java.lang.Object
  extended by com.hp.hpl.jena.iri.Violation
      extended by com.hp.hpl.jena.iri.impl.ViolationImpl
All Implemented Interfaces:
IRIComponents, ViolationCodes

public class ViolationImpl
extends Violation


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.hp.hpl.jena.iri.ViolationCodes
ViolationCodes.Initialize
 
Field Summary
 
Fields inherited from interface com.hp.hpl.jena.iri.ViolationCodes
ACE_PREFIX, BAD_BIDI_SUBCOMPONENT, BAD_DOT_IN_IDN, BAD_IDN, BAD_IDN_UNASSIGNED_CHARS, BIDI_FORMATTING_CHARACTER, COMPATIBILITY_CHARACTER, CONTROL_CHARACTER, DEFAULT_PORT_SHOULD_BE_OMITTED, DEPRECATED_UNICODE_CHARACTER, DISCOURAGED_IRI_CHARACTER, DISCOURAGED_XML_CHARACTER, DNS_LABEL_DASH_START_OR_END, DNS_LABEL_LENGTH_LIMIT, DNS_LENGTH_LIMIT, DOUBLE_DASH_IN_REG_NAME, DOUBLE_WHITESPACE, EMPTY_SCHEME, HAS_PASSWORD, ILLEGAL_CHARACTER, ILLEGAL_PERCENT_ENCODING, IP_V4_OCTET_RANGE, IP_V6_OR_FUTURE_ADDRESS_SYNTAX, IPv6ADDRESS_SHOULD_BE_LOWERCASE, LONE_SURROGATE, LOWERCASE_PREFERRED, MAYBE_NOT_NFC, MAYBE_NOT_NFKC, NON_INITIAL_DOT_SEGMENT, NON_URI_CHARACTER, NON_XML_CHARACTER, NOT_DNS_NAME, NOT_NFC, NOT_NFKC, NOT_UTF8_ESCAPE, NOT_UTF8_ESCAPE_IN_HOST, NOT_XML_SCHEMA_WHITESPACE, PERCENT, PERCENT_20, PERCENT_ENCODING_SHOULD_BE_UPPERCASE, PORT_SHOULD_NOT_BE_EMPTY, PORT_SHOULD_NOT_BE_WELL_KNOWN, PORT_SHOULD_NOT_START_IN_ZERO, PRIVATE_USE_CHARACTER, PROHIBITED_COMPONENT_PRESENT, QUERY_IN_LEGACY_SCHEME, REQUIRED_COMPONENT_MISSING, SCHEME_INCLUDES_DASH, SCHEME_MUST_START_WITH_LETTER, SCHEME_PATTERN_MATCH_FAILED, SCHEME_PREFERS_LOWERCASE, SCHEME_REQUIRES_LOWERCASE, SUPERFLUOUS_ASCII_PERCENT_ENCODING, SUPERFLUOUS_NON_ASCII_PERCENT_ENCODING, UNASSIGNED_UNICODE_CHARACTER, UNDEFINED_UNICODE_CHARACTER, UNICODE_CONTROL_CHARACTER, UNICODE_WHITESPACE, UNREGISTERED_IANA_SCHEME, UNREGISTERED_NONIETF_SCHEME_TREE, UNWISE_CHARACTER, USE_PUNYCODE_NOT_PERCENTS, WHITESPACE
 
Fields inherited from interface com.hp.hpl.jena.iri.IRIComponents
AUTHORITY, FRAGMENT, HOST, PATH, PATHQUERY, PORT, QUERY, SCHEME, USER
 
Constructor Summary
ViolationImpl(IRI iri, int slot, int code)
           
 
Method Summary
 String codeName()
          A string version of the code number, corresponding to the name of the java identifier.
 String component()
          The name of the component in which the problem occurred.
 int getComponent()
          A value from IRIComponents indicating which component of the IRI is involved with this error.
 IRI getIRI()
          The IRI that triggered this condition.
 String getLongMessage()
          A long description of the error condition, typically including the
 String getShortMessage()
          A short description of the error condition.
 String getSpecificationURL()
          The URL of the section of the specification which has been violated.
 int getViolationCode()
          The value from ViolationCodes corresponding to this condition.
 boolean isError()
          Using the settings of the factory associated with the IRI associated with this violation, is this condition intended as an error (or as a warning)?
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ViolationImpl

public ViolationImpl(IRI iri,
                     int slot,
                     int code)
Method Detail

getViolationCode

public int getViolationCode()
Description copied from class: Violation
The value from ViolationCodes corresponding to this condition.

Specified by:
getViolationCode in class Violation
Returns:
An error code.

getIRI

public IRI getIRI()
Description copied from class: Violation
The IRI that triggered this condition. If an IRI has been constructed by resolving a relative reference against a base IRI then exceptions associated with that IRI will have the most informative value here, which can be any of the three IRIs involved (the base IRI, the relative IRI or the resolved IRI).

Specified by:
getIRI in class Violation
Returns:
The IRI that triggered the error.

getComponent

public int getComponent()
Description copied from class: Violation
A value from IRIComponents indicating which component of the IRI is involved with this error.

Specified by:
getComponent in class Violation
Returns:
A code indicating the IRI component in which the error occurred.

component

public String component()
Description copied from class: Violation
The name of the component in which the problem occurred.

Specified by:
component in class Violation
Returns:
A component name.

codeName

public String codeName()
Description copied from class: Violation
A string version of the code number, corresponding to the name of the java identifier.

Specified by:
codeName in class Violation
Returns:
The name of the java identifier of the error code for this error.

isError

public boolean isError()
Description copied from class: Violation
Using the settings of the factory associated with the IRI associated with this violation, is this condition intended as an error (or as a warning)?

Specified by:
isError in class Violation
Returns:
true if this condition is an error, false if it is a warning.

getShortMessage

public String getShortMessage()
Description copied from class: Violation
A short description of the error condition. (Short is in comparison with Violation.getLongMessage(), not an absolute value).

Specified by:
getShortMessage in class Violation
Returns:
The error message.

getLongMessage

public String getLongMessage()
Description copied from class: Violation
A long description of the error condition, typically including the

Specified by:
getLongMessage in class Violation
Returns:
The error message.

getSpecificationURL

public String getSpecificationURL()
Description copied from class: Violation
The URL of the section of the specification which has been violated.

Specified by:
getSpecificationURL in class Violation
Returns:
The error message.


Copyright ? 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP