Interface Fragment
- All Superinterfaces:
HasElement
- All Known Subinterfaces:
Fragment1,Fragment2,Fragment3,GeneralizedFragment2
- All Known Implementing Classes:
Concept,Fragment2Impl,Fragment3Impl,FragmentImpl,FragmentWrapperBase,MappedFragment,PropertyRelation
A (SPARQL) fragment is a unifying abstraction for queries and graph patterns which allows treating both as tables.
Variables can be marked as "distinguished" which means that they will be projected when generating a relation's
effective SPARQL query.
Furthermore, the relation inferface declares several methods for constructing joins between relations.
- Author:
- raven Mar 7, 2018
-
Method Summary
Modifier and TypeMethodDescriptionstatic FragmentapplyDefaultNodeTransform(Fragment r, org.apache.jena.sparql.graph.NodeTransform nodeTransform) default FragmentapplyNodeTransform(org.apache.jena.sparql.graph.NodeTransform nodeTransform) default Fragmentdefault Fragmentfilter(org.apache.jena.sparql.core.Var var, org.apache.jena.graph.Node node) default Fragmentfilter(org.apache.jena.sparql.expr.Expr expr) default Fragmentfilter(org.apache.jena.sparql.expr.Expr... exprs) default List<org.apache.jena.sparql.syntax.Element>default Set<org.apache.jena.sparql.core.Var>Return the set of mentioned variables without the distinguished onesList<org.apache.jena.sparql.core.Var>getVars()Return the distinguished variables of the relation.default Set<org.apache.jena.sparql.core.Var>default FragmentJoinerdefault FragmentJoinerjoinOn(org.apache.jena.sparql.core.Var... vars) default FragmentJoinerdefault FragmentJoinerprependOn(org.apache.jena.sparql.core.Var... vars) default Fragmentdefault Fragmentproject(org.apache.jena.sparql.core.Var... vars) default Fragmentdefault FragmentRename the variables of the relation to the given variables In case of clashes, prior variables will be replaced with fresh ones.default Fragment1default Fragment2default Fragment3default org.apache.jena.query.QuerytoQuery()Methods inherited from interface org.aksw.jenax.sparql.fragment.api.HasElement
extractQuery, extractTable, getElement, holdsQuery, holdsTable, toOp
-
Method Details
-
getVars
List<org.apache.jena.sparql.core.Var> getVars()Return the distinguished variables of the relation. The returned list is should be duplicate-free. The variables are NOT required to occur in the relation's element.- Returns:
- A list of variables
-
getNonDistinguishedVars
Return the set of mentioned variables without the distinguished ones- Returns:
-
rename
-
rename
Rename the variables of the relation to the given variables In case of clashes, prior variables will be replaced with fresh ones. Delegates otFragmentUtils.rename(Fragment, List).- Parameters:
r-targetVars-- Returns:
-
toFragment1
-
toFragment2
-
toFragment3
-
getVarsMentioned
-
applyNodeTransform
-
applyDefaultNodeTransform
-
joinOn
-
joinOn
-
prependOn
-
prependOn
-
project
-
project
-
filter
-
filter
-
filter
-
filter
-
toQuery
default org.apache.jena.query.Query toQuery() -
getElements
-