Class SHShapeImpl

    • Field Summary

      • Fields inherited from class org.apache.jena.rdf.model.impl.ResourceImpl

        factory, rdfNodeFactory
      • Fields inherited from class org.apache.jena.enhanced.EnhNode

        enhGraph, node
    • Constructor Summary

      Constructors 
      Constructor Description
      SHShapeImpl​(org.apache.jena.graph.Node node, org.apache.jena.enhanced.EnhGraph graph)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.jena.rdf.model.Resource getPath()
      Gets the value resource of sh:path or null (for node shapes).
      List<SHPropertyShape> getPropertyShapes()
      Gets all property shapes declared for this shape using either sh:parameter or sh:property.
      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.
      Iterable<SHRule> getRules()
      Gets the rules attached to this shape via sh:rule.
      org.apache.jena.rdf.model.Resource getSeverity()
      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 isDeactivated()
      Checks if this shape has been deactivated.
      boolean isPropertyShape()
      Checks if this is a property shape, based on the presence or absence of sh:path.
      • Methods inherited from class org.apache.jena.rdf.model.impl.ResourceImpl

        abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, asLiteral, asResource, begin, commit, getId, getLocalName, getModel, getModelCom, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getRequiredProperty, getStmtTerm, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, mustHaveModel, removeAll, removeProperties, toString, visitWith
      • Methods inherited from class org.apache.jena.enhanced.EnhNode

        as, asNode, canAs, canSupport, convertTo, equals, getGraph, getPersonality, hashCode, isAnon, isLiteral, isResource, isStmtResource, isURIResource, isValid, viewAs
      • Methods inherited from class org.apache.jena.enhanced.Polymorphic

        addView, alreadyHasView, asInternal, supports
      • 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
    • Constructor Detail

      • SHShapeImpl

        public SHShapeImpl​(org.apache.jena.graph.Node node,
                           org.apache.jena.enhanced.EnhGraph graph)
    • Method Detail

      • getPath

        public org.apache.jena.rdf.model.Resource getPath()
        Description copied from interface: SHShape
        Gets the value resource of sh:path or null (for node shapes).
        Specified by:
        getPath in interface SHShape
        Returns:
        the path resource
      • getPropertyShapes

        public List<SHPropertyShape> getPropertyShapes()
        Description copied from interface: SHShape
        Gets all property shapes declared for this shape using either sh:parameter or sh:property.
        Specified by:
        getPropertyShapes in interface SHShape
        Returns:
        the property shapes
      • getPropertyShapes

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

        public Iterable<SHRule> getRules()
        Description copied from interface: SHShape
        Gets the rules attached to this shape via sh:rule.
        Specified by:
        getRules in interface SHShape
        Returns:
        the rules
      • getSeverity

        public org.apache.jena.rdf.model.Resource getSeverity()
        Description copied from interface: SHShape
        Returns the sh:severity of this shape, defaulting to sh:Violation.
        Specified by:
        getSeverity in interface SHShape
        Returns:
        the severity
      • hasTargetNode

        public boolean hasTargetNode​(org.apache.jena.rdf.model.RDFNode node)
        Description copied from interface: SHShape
        Checks if a given node is in the target of this shape.
        Specified by:
        hasTargetNode in interface SHShape
        Parameters:
        node - the node to test
        Returns:
        true if node is in target
      • isDeactivated

        public boolean isDeactivated()
        Description copied from interface: SHShape
        Checks if this shape has been deactivated.
        Specified by:
        isDeactivated in interface SHShape
        Returns:
        true if deactivated
      • isPropertyShape

        public boolean isPropertyShape()
        Description copied from interface: SHShape
        Checks if this is a property shape, based on the presence or absence of sh:path.
        Specified by:
        isPropertyShape in interface SHShape
        Returns:
        true iff this has a value for sh:path