Class Violation

java.lang.Object
org.apache.jena.iri.Violation
All Implemented Interfaces:
IRIComponents, ViolationCodes
Direct Known Subclasses:
ViolationImpl

public abstract class Violation extends Object implements ViolationCodes, IRIComponents
Information concerning a violation of some specification concerning IRIs. This may be wrapped in an IRIException and thrown, or may be returned by IRI.violations(boolean). Which conditions result in errors and warnings depends on the setting of the related IRIFactory.
  • Constructor Details

    • Violation

      public Violation()
  • Method Details

    • getViolationCode

      public abstract int getViolationCode()
      The value from ViolationCodes corresponding to this condition.
      Returns:
      An error code.
    • getIRI

      public abstract IRI getIRI()
      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).
      Returns:
      The IRI that triggered the error.
    • getComponent

      public abstract int getComponent()
      A value from IRIComponents indicating which component of the IRI is involved with this error.
      Returns:
      A code indicating the IRI component in which the error occurred.
    • codeName

      public abstract String codeName()
      A string version of the code number, corresponding to the name of the java identifier.
      Returns:
      The name of the java identifier of the error code for this error.
    • getShortMessage

      public abstract String getShortMessage()
      A short description of the error condition. (Short is in comparison with getLongMessage(), not an absolute value).
      Returns:
      The error message.
    • getLongMessage

      public abstract String getLongMessage()
      A long description of the error condition, typically including the
      Returns:
      The error message.
    • getSpecificationURL

      public abstract String getSpecificationURL()
      The URL of the section of the specification which has been violated.
      Returns:
      The error message.
    • isError

      public abstract 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)?
      Returns:
      true if this condition is an error, false if it is a warning.
    • component

      public abstract String component()
      The name of the component in which the problem occurred.
      Returns:
      A component name.