Interface SHShape

All Superinterfaces:
org.apache.jena.graph.FrontsNode, org.apache.jena.rdf.model.RDFNode, org.apache.jena.rdf.model.Resource, SHResource
All Known Subinterfaces:
SHNodeShape, SHParameter, SHPropertyShape
All Known Implementing Classes:
SHNodeShapeImpl, SHParameterImpl, SHPropertyShapeImpl, SHShapeImpl

public interface SHShape extends SHResource
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.jena.rdf.model.Resource
    Returns either sh:NodeShape or sh:PropertyShape.
    org.apache.jena.rdf.model.Resource
    Gets the value resource of sh:path or null (for node shapes).
    Gets all property shapes declared for this shape using either sh:parameter or sh:property.
    getPropertyShapes(org.apache.jena.rdf.model.RDFNode predicate)
    Gets all property shapes declared for this shape using either sh:parameter or sh:property that are about a given predicate.
    Gets the rules attached to this shape via sh:rule.
    org.apache.jena.rdf.model.Resource
    Returns the sh:severity of this shape, defaulting to sh:Violation.
    boolean
    hasTargetNode(org.apache.jena.rdf.model.RDFNode node)
    Checks if a given node is in the target of this shape.
    boolean
    Checks if this shape has been deactivated.
    boolean
    Checks if this is a property shape, based on the presence or absence of sh:path.

    Methods inherited from interface org.apache.jena.graph.FrontsNode

    asNode

    Methods inherited from interface org.apache.jena.rdf.model.RDFNode

    as, asLiteral, asResource, canAs, getModel, isAnon, isLiteral, isResource, isStmtResource, isURIResource, visitWith

    Methods inherited from interface org.apache.jena.rdf.model.Resource

    abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getId, getLocalName, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getRequiredProperty, getStmtTerm, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, removeAll, removeProperties, toString
  • Method Details

    • getContext

      org.apache.jena.rdf.model.Resource getContext()
      Returns either sh:NodeShape or sh:PropertyShape.
      Returns:
      the context
    • getPath

      org.apache.jena.rdf.model.Resource getPath()
      Gets the value resource of sh:path or null (for node shapes).
      Returns:
      the path resource
    • getPropertyShapes

      List<SHPropertyShape> getPropertyShapes()
      Gets all property shapes declared for this shape using either sh:parameter or sh:property.
      Returns:
      the property shapes
    • getPropertyShapes

      List<SHPropertyShape> getPropertyShapes(org.apache.jena.rdf.model.RDFNode predicate)
      Gets all property shapes declared for this shape using either sh:parameter or sh:property that are about a given predicate.
      Parameters:
      predicate - the predicate
      Returns:
      a possibly empty list
    • getRules

      Iterable<SHRule> getRules()
      Gets the rules attached to this shape via sh:rule.
      Returns:
      the rules
    • getSeverity

      org.apache.jena.rdf.model.Resource getSeverity()
      Returns the sh:severity of this shape, defaulting to sh:Violation.
      Returns:
      the severity
    • hasTargetNode

      boolean hasTargetNode(org.apache.jena.rdf.model.RDFNode node)
      Checks if a given node is in the target of this shape.
      Parameters:
      node - the node to test
      Returns:
      true if node is in target
    • isDeactivated

      boolean isDeactivated()
      Checks if this shape has been deactivated.
      Returns:
      true if deactivated
    • isPropertyShape

      boolean isPropertyShape()
      Checks if this is a property shape, based on the presence or absence of sh:path.
      Returns:
      true iff this has a value for sh:path