Class ResourceValidationResult

java.lang.Object
org.topbraid.shacl.validation.ResourceValidationResult
All Implemented Interfaces:
ValidationResult

public class ResourceValidationResult extends Object implements ValidationResult
A ValidationResult backed by an existing Resource.
Author:
Holger Knublauch
  • Constructor Summary

    Constructors
    Constructor
    Description
    ResourceValidationResult(org.apache.jena.rdf.model.Resource result)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    org.apache.jena.rdf.model.RDFNode
    See sh:focusNode.
    Gets the human-readable message attached to the result.
    Collection<org.apache.jena.rdf.model.RDFNode>
    Gets the human-readable message attached to the result (see sh:resultMessage).
    org.apache.jena.rdf.model.Resource
    See sh:resultPath.
    List<org.apache.jena.rdf.model.RDFNode>
    getPropertyValues(org.apache.jena.rdf.model.Property predicate)
    Provides access to other RDF values that may exist for the result instance, for any given property.
    org.apache.jena.rdf.model.Resource
     
    org.apache.jena.rdf.model.Resource
    See sh:resultSeverity.
    org.apache.jena.rdf.model.Resource
    See sh:sourceConstraint.
    org.apache.jena.rdf.model.Resource
    See sh:sourceConstraintComponent.
    org.apache.jena.rdf.model.Resource
    See sh:sourceShape.
    org.apache.jena.rdf.model.RDFNode
    See sh:value.
    int
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ResourceValidationResult

      public ResourceValidationResult(org.apache.jena.rdf.model.Resource result)
  • Method Details

    • getFocusNode

      public org.apache.jena.rdf.model.RDFNode getFocusNode()
      Description copied from interface: ValidationResult
      See sh:focusNode.
      Specified by:
      getFocusNode in interface ValidationResult
      Returns:
    • getMessage

      public String getMessage()
      Description copied from interface: ValidationResult
      Gets the human-readable message attached to the result. Note that validation results can have multiple messages in different languages, getMessages() might be a better choice.
      Specified by:
      getMessage in interface ValidationResult
      Returns:
      a message or null
    • getMessages

      public Collection<org.apache.jena.rdf.model.RDFNode> getMessages()
      Description copied from interface: ValidationResult
      Gets the human-readable message attached to the result (see sh:resultMessage).
      Specified by:
      getMessages in interface ValidationResult
      Returns:
    • getPath

      public org.apache.jena.rdf.model.Resource getPath()
      Description copied from interface: ValidationResult
      See sh:resultPath.
      Specified by:
      getPath in interface ValidationResult
      Returns:
    • getPropertyValues

      public List<org.apache.jena.rdf.model.RDFNode> getPropertyValues(org.apache.jena.rdf.model.Property predicate)
      Description copied from interface: ValidationResult
      Provides access to other RDF values that may exist for the result instance, for any given property.
      Specified by:
      getPropertyValues in interface ValidationResult
      Parameters:
      predicate - the property to get the values of
      Returns:
      the values, often empty
    • getResource

      public org.apache.jena.rdf.model.Resource getResource()
    • getSeverity

      public org.apache.jena.rdf.model.Resource getSeverity()
      Description copied from interface: ValidationResult
      See sh:resultSeverity.
      Specified by:
      getSeverity in interface ValidationResult
      Returns:
    • getSourceConstraint

      public org.apache.jena.rdf.model.Resource getSourceConstraint()
      Description copied from interface: ValidationResult
      See sh:sourceConstraint.
      Specified by:
      getSourceConstraint in interface ValidationResult
      Returns:
    • getSourceConstraintComponent

      public org.apache.jena.rdf.model.Resource getSourceConstraintComponent()
      Description copied from interface: ValidationResult
      See sh:sourceConstraintComponent.
      Specified by:
      getSourceConstraintComponent in interface ValidationResult
      Returns:
    • getSourceShape

      public org.apache.jena.rdf.model.Resource getSourceShape()
      Description copied from interface: ValidationResult
      See sh:sourceShape.
      Specified by:
      getSourceShape in interface ValidationResult
      Returns:
    • getValue

      public org.apache.jena.rdf.model.RDFNode getValue()
      Description copied from interface: ValidationResult
      See sh:value.
      Specified by:
      getValue in interface ValidationResult
      Returns:
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object