Interface FacetNode

All Superinterfaces:
Castable, TraversalNode<FacetNode,FacetDirNode,FacetMultiNode>
All Known Subinterfaces:
FacetNodeResource

public interface FacetNode extends TraversalNode<FacetNode,FacetDirNode,FacetMultiNode>, Castable
An object backed by the set of resources at a certain (possibly empty) path of properties.
Author:
Claus Stadler, Jul 23, 2018
  • Method Details

    • traverse

      default FacetNode traverse(FacetPath path)
    • goTo

      static FacetNode goTo(FacetNode start, FacetPath path)
    • path

      default List<org.aksw.commons.util.Directed<FacetNode>> path()
      TODO Maybe remove this method; do we really need it? The list of taken steps to reach the current node. The last item in the list is this node together with the reaching direction - UNLESS this node is the root, then the list is empty. The path never includes the root node.
      Returns:
    • facetPath

      default FacetPath facetPath()
    • query

      FacetedQuery query()
    • chRoot

      @Beta FacetNode chRoot()
      Change the root of this FacetNode's faceted query to this node. All transitive parents of this node are turned to children. Implementations of this operation should leave all FacetNodes intact. FacetDirNodes may become invalidated by this operation under certain conditions. TODO Below is probably outdated by now - check It is not totally clear to me, what exact changes this method should do, but the corner stones are: - There should be no changes to the id of all nodes in the rdf model corresponding to any of FacetNode, FacetDirNode and Constraint -> Clarify, whether the nodes used for the map structures on BgpMultiNode can remain the same Ideally, changing the root back should give exactly the same query as before. - The changes are - Set the query()'s root to this node - Update the directions of the transitions accordingly - As this node becomes the root, its underlying BgpNode's parent must become null in the process
      Returns:
    • chFocus

      @Beta FacetNode chFocus()
    • as

      FacetNode as(String varName)
    • as

      FacetNode as(org.apache.jena.sparql.core.Var var)
    • alias

      org.apache.jena.sparql.core.Var alias()
    • parent

      FacetNode parent()
    • reachingDirection

      Direction reachingDirection()
      Create a faceted query over the values of this node without constraining the set of matched items of the outer query. This essentially allows for placing filters into OPTIONAL blocks: SELECT ?person ?city { ?person hasAdress ?address OPTIONAL { ?address hasCountry ?country . FILTER(?country IN (...)) ?address hasCity ?city . # Projected path with exists constraint on the sub facet } }
    • reachingPredicate

      org.apache.jena.graph.Node reachingPredicate()
    • reachingAlias

      String reachingAlias()
    • targetComponent

      org.apache.jena.graph.Node targetComponent()
    • reachingFacetStep

      default FacetStep reachingFacetStep()
    • resolve

      default FacetNode resolve(org.aksw.commons.path.core.Path<FacetStep> facetPath)
    • getReachingRelation

      Fragment2 getReachingRelation()
    • root

      FacetNode root()
    • enterConstraints

      ConstraintFacade<? extends FacetNode> enterConstraints()
      List all
      Returns:
    • availableValues

      FacetedDataQuery<org.apache.jena.rdf.model.RDFNode> availableValues()
    • remainingValues

      FacetedDataQuery<org.apache.jena.rdf.model.RDFNode> remainingValues()