Class ViolationImpl

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

public class ViolationImpl extends Violation
  • Constructor Details

    • ViolationImpl

      public ViolationImpl(IRI iri, int slot, int code)
  • Method Details

    • 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.