Class InstanceOntologyOrderPredicateImpl

    • Constructor Detail

      • InstanceOntologyOrderPredicateImpl

        public InstanceOntologyOrderPredicateImpl​(AtomicClassImpl parentClass)

        Constructor for InstanceOntologyOrderPredicateImpl.

        Parameters:
        parentClass - a AtomicClassImpl object
    • Method Detail

      • holdsFor

        public boolean holdsFor​(Object value)
        Each InstancePredicate must implement this method to check if the given value is an element of the InstancePredicate.
        Specified by:
        holdsFor in interface InstancePredicate
        Parameters:
        value - The value to check
        Returns:
        true if the value is an element of the InstancePredicate
      • init

        public void init​(String rootNodeUri,
                         String... relations)
        (Re)Inits the predicate with the given root uri and relations. Collects a set of valid values from the ontology respecting the given root node and added relations.
        Specified by:
        init in interface InstanceOntologyOrderPredicate
        Parameters:
        rootNodeUri - the root node uri
        relations - the list of relations that should be added.
      • init

        public void init()
        Re-inits the predicate. Uses a given root node and relations. Collects a set of valid values from the ontology.
        Specified by:
        init in interface InstanceOntologyOrderPredicate
      • getParentNodes

        public Set<org.apache.jena.rdf.model.Resource> getParentNodes​(org.apache.jena.rdf.model.Resource node)

        getParentNodes.

        Specified by:
        getParentNodes in interface InstanceOntologyOrderPredicate
        Parameters:
        node - a Resource object
        Returns:
        a Set object
      • setParentNodes

        public void setParentNodes​(org.apache.jena.rdf.model.Resource node,
                                   Set<org.apache.jena.rdf.model.Resource> parentNodes)

        setParentNodes.

        Specified by:
        setParentNodes in interface InstanceOntologyOrderPredicate
        Parameters:
        node - a Resource object
        parentNodes - a Set object
      • setIntersection

        public void setIntersection​(Set<org.apache.jena.rdf.model.Resource> nodeSetA,
                                    Set<org.apache.jena.rdf.model.Resource> nodeSetB,
                                    boolean intersection)

        setIntersection.

        Specified by:
        setIntersection in interface InstanceOntologyOrderPredicate
        Parameters:
        nodeSetA - a Set object
        nodeSetB - a Set object
        intersection - a boolean