test_class.file: jena-sparql-api-utils/src/test/java/org/aksw/jena_sparql_api/utils/QueryUtilsTest.java
test_class.identifier: QueryUtilsTest
test_case.body: @Test
      public void testReducedPrefixes() {
          Query query = QueryFactory.create(String.join("\n",
              "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>",
              "PREFIX foo: <http://example.org/foo/>",
              "PREFIX bar: <http://example.org/bar/>",
              "PREFIX baz: <http://example.org/baz/>",
              "SELECT * {",
              "  { SELECT * {",
              "    ?s a foo:Foo.",
              "  } }",
              "  ?s rdf:type foo:Bar",
              "}"));
  
          PrefixMapping pm = org.aksw.jena_sparql_api.utils.QueryUtils.usedPrefixes(query);
  
          Assert.assertEquals(pm.getNsPrefixMap().keySet(), new HashSet<>(Arrays.asList("rdf", "foo")));
          //Query prefixCleanedQuery = QueryTransformOps.shallowCopy(query);
          //prefixCleanedQuery.setPrefixMapping(pm);
          //System.out.println(prefixCleanedQuery);
  
      }
test_case.class_method_signature: QueryUtilsTest.testReducedPrefixes()
test_case.full_signature: @Test public void testReducedPrefixes()
test_case.identifier: testReducedPrefixes
test_case.invocations: create join usedPrefixes assertEquals keySet getNsPrefixMap asList
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testReducedPrefixes()
focal_class.file: jena-sparql-api-utils/src/main/java/org/aksw/jena_sparql_api/utils/QueryUtils.java
focal_class.identifier: QueryUtils
focal_class.class_method_signature: QueryUtils.applyOpTransform(Query beforeQuery, Function<? super Op, ? extends Op> transform)
focal_class.full_signature: public static Query applyOpTransform(Query beforeQuery, Function<? super Op, ? extends Op> transform)
focal_class.identifier: applyOpTransform
focal_class.modifiers: public static
focal_class.parameters: (Query beforeQuery, Function<? super Op, ? extends Op> transform)
focal_class.return: Query
focal_class.signature: Query applyOpTransform(Query beforeQuery, Function<? super Op, ? extends Op> transform)
focal_class.class_method_signature: QueryUtils.restoreQueryForm(Query query, Query proto)
focal_class.full_signature: public static Query restoreQueryForm(Query query, Query proto)
focal_class.identifier: restoreQueryForm
focal_class.modifiers: public static
focal_class.parameters: (Query query, Query proto)
focal_class.return: Query
focal_class.signature: Query restoreQueryForm(Query query, Query proto)
focal_class.class_method_signature: QueryUtils.selectToConstruct(Query query, Template template)
focal_class.full_signature: public static Query selectToConstruct(Query query, Template template)
focal_class.identifier: selectToConstruct
focal_class.modifiers: public static
focal_class.parameters: (Query query, Template template)
focal_class.return: Query
focal_class.signature: Query selectToConstruct(Query query, Template template)
focal_class.class_method_signature: QueryUtils.rewrite(Query beforeQuery, Function<? super Op, ? extends Op> xform)
focal_class.full_signature: public static Query rewrite(Query beforeQuery, Function<? super Op, ? extends Op> xform)
focal_class.identifier: rewrite
focal_class.modifiers: public static
focal_class.parameters: (Query beforeQuery, Function<? super Op, ? extends Op> xform)
focal_class.return: Query
focal_class.signature: Query rewrite(Query beforeQuery, Function<? super Op, ? extends Op> xform)
focal_class.class_method_signature: QueryUtils.asPatternForConstruct(Query q)
focal_class.full_signature: public static Element asPatternForConstruct(Query q)
focal_class.identifier: asPatternForConstruct
focal_class.modifiers: public static
focal_class.parameters: (Query q)
focal_class.return: Element
focal_class.signature: Element asPatternForConstruct(Query q)
focal_class.class_method_signature: QueryUtils.canActAsConstruct(Query q)
focal_class.full_signature: public static boolean canActAsConstruct(Query q)
focal_class.identifier: canActAsConstruct
focal_class.modifiers: public static
focal_class.parameters: (Query q)
focal_class.return: boolean
focal_class.signature: boolean canActAsConstruct(Query q)
focal_class.class_method_signature: QueryUtils.mentionedVars(Query query)
focal_class.full_signature: public static Set<Var> mentionedVars(Query query)
focal_class.identifier: mentionedVars
focal_class.modifiers: public static
focal_class.parameters: (Query query)
focal_class.return: Set<Var>
focal_class.signature: Set<Var> mentionedVars(Query query)
focal_class.class_method_signature: QueryUtils.mentionedNodes(Query query)
focal_class.full_signature: public static Set<Node> mentionedNodes(Query query)
focal_class.identifier: mentionedNodes
focal_class.modifiers: public static
focal_class.parameters: (Query query)
focal_class.return: Set<Node>
focal_class.signature: Set<Node> mentionedNodes(Query query)
focal_class.class_method_signature: QueryUtils.freshVar(Query query)
focal_class.full_signature: public static Var freshVar(Query query)
focal_class.identifier: freshVar
focal_class.modifiers: public static
focal_class.parameters: (Query query)
focal_class.return: Var
focal_class.signature: Var freshVar(Query query)
focal_class.class_method_signature: QueryUtils.freshVar(Query query, String baseVarName)
focal_class.full_signature: public static Var freshVar(Query query, String baseVarName)
focal_class.identifier: freshVar
focal_class.modifiers: public static
focal_class.parameters: (Query query, String baseVarName)
focal_class.return: Var
focal_class.signature: Var freshVar(Query query, String baseVarName)
focal_class.class_method_signature: QueryUtils.applyNodeTransform(Map<String, Node> jsonMapping, NodeTransform nodeTransform)
focal_class.full_signature: public static Map<String, Node> applyNodeTransform(Map<String, Node> jsonMapping, NodeTransform nodeTransform)
focal_class.identifier: applyNodeTransform
focal_class.modifiers: public static
focal_class.parameters: (Map<String, Node> jsonMapping, NodeTransform nodeTransform)
focal_class.return: Map<String, Node>
focal_class.signature: Map<String, Node> applyNodeTransform(Map<String, Node> jsonMapping, NodeTransform nodeTransform)
focal_class.class_method_signature: QueryUtils.applyNodeTransform(Query query, NodeTransform nodeTransform)
focal_class.full_signature: public static Query applyNodeTransform(Query query, NodeTransform nodeTransform)
focal_class.identifier: applyNodeTransform
focal_class.modifiers: public static
focal_class.parameters: (Query query, NodeTransform nodeTransform)
focal_class.return: Query
focal_class.signature: Query applyNodeTransform(Query query, NodeTransform nodeTransform)
focal_class.class_method_signature: QueryUtils.usedPrefixes(Query query, PrefixMapping global)
focal_class.full_signature: public static PrefixMapping usedPrefixes(Query query, PrefixMapping global)
focal_class.identifier: usedPrefixes
focal_class.modifiers: public static
focal_class.parameters: (Query query, PrefixMapping global)
focal_class.return: PrefixMapping
focal_class.signature: PrefixMapping usedPrefixes(Query query, PrefixMapping global)
focal_class.class_method_signature: QueryUtils.usedPrefixes(Query query)
focal_class.full_signature: public static PrefixMapping usedPrefixes(Query query)
focal_class.identifier: usedPrefixes
focal_class.modifiers: public static
focal_class.parameters: (Query query)
focal_class.return: PrefixMapping
focal_class.signature: PrefixMapping usedPrefixes(Query query)
focal_class.class_method_signature: QueryUtils.usedReferencePrefixes(Query query, PrefixMapping pm)
focal_class.full_signature: public static PrefixMapping usedReferencePrefixes(Query query, PrefixMapping pm)
focal_class.identifier: usedReferencePrefixes
focal_class.modifiers: public static
focal_class.parameters: (Query query, PrefixMapping pm)
focal_class.return: PrefixMapping
focal_class.signature: PrefixMapping usedReferencePrefixes(Query query, PrefixMapping pm)
focal_class.class_method_signature: QueryUtils.optimizePrefixes(Query query, PrefixMapping globalPm)
focal_class.full_signature: public static Query optimizePrefixes(Query query, PrefixMapping globalPm)
focal_class.identifier: optimizePrefixes
focal_class.modifiers: public static
focal_class.parameters: (Query query, PrefixMapping globalPm)
focal_class.return: Query
focal_class.signature: Query optimizePrefixes(Query query, PrefixMapping globalPm)
focal_class.class_method_signature: QueryUtils.optimizePrefixes(Query query)
focal_class.full_signature: public static Query optimizePrefixes(Query query)
focal_class.identifier: optimizePrefixes
focal_class.modifiers: public static
focal_class.parameters: (Query query)
focal_class.return: Query
focal_class.signature: Query optimizePrefixes(Query query)
focal_class.class_method_signature: QueryUtils.randomizeVars(Query query)
focal_class.full_signature: public static Query randomizeVars(Query query)
focal_class.identifier: randomizeVars
focal_class.modifiers: public static
focal_class.parameters: (Query query)
focal_class.return: Query
focal_class.signature: Query randomizeVars(Query query)
focal_class.class_method_signature: QueryUtils.createRandomVarMap(Query query, String base)
focal_class.full_signature: public static Map<Var, Var> createRandomVarMap(Query query, String base)
focal_class.identifier: createRandomVarMap
focal_class.modifiers: public static
focal_class.parameters: (Query query, String base)
focal_class.return: Map<Var, Var>
focal_class.signature: Map<Var, Var> createRandomVarMap(Query query, String base)
focal_class.class_method_signature: QueryUtils.injectFilter(Query query, String exprStr)
focal_class.full_signature: public static void injectFilter(Query query, String exprStr)
focal_class.identifier: injectFilter
focal_class.modifiers: public static
focal_class.parameters: (Query query, String exprStr)
focal_class.return: void
focal_class.signature: void injectFilter(Query query, String exprStr)
focal_class.class_method_signature: QueryUtils.injectFilter(Query query, Expr expr)
focal_class.full_signature: public static void injectFilter(Query query, Expr expr)
focal_class.identifier: injectFilter
focal_class.modifiers: public static
focal_class.parameters: (Query query, Expr expr)
focal_class.return: void
focal_class.signature: void injectFilter(Query query, Expr expr)
focal_class.class_method_signature: QueryUtils.injectElement(Query query, Element element)
focal_class.full_signature: public static void injectElement(Query query, Element element)
focal_class.identifier: injectElement
focal_class.modifiers: public static
focal_class.parameters: (Query query, Element element)
focal_class.return: void
focal_class.signature: void injectElement(Query query, Element element)
focal_class.class_method_signature: QueryUtils.toRange(OpSlice op)
focal_class.full_signature: public static Range<Long> toRange(OpSlice op)
focal_class.identifier: toRange
focal_class.modifiers: public static
focal_class.parameters: (OpSlice op)
focal_class.return: Range<Long>
focal_class.signature: Range<Long> toRange(OpSlice op)
focal_class.class_method_signature: QueryUtils.applyRange(Op op, Range<Long> range)
focal_class.full_signature: public static Op applyRange(Op op, Range<Long> range)
focal_class.identifier: applyRange
focal_class.modifiers: public static
focal_class.parameters: (Op op, Range<Long> range)
focal_class.return: Op
focal_class.signature: Op applyRange(Op op, Range<Long> range)
focal_class.class_method_signature: QueryUtils.applySlice(Query query, Long offset, Long limit, boolean cloneOnChange)
focal_class.full_signature: public static Query applySlice(Query query, Long offset, Long limit, boolean cloneOnChange)
focal_class.identifier: applySlice
focal_class.modifiers: public static
focal_class.parameters: (Query query, Long offset, Long limit, boolean cloneOnChange)
focal_class.return: Query
focal_class.signature: Query applySlice(Query query, Long offset, Long limit, boolean cloneOnChange)
focal_class.class_method_signature: QueryUtils.applyRange(Query query, Range<Long> range)
focal_class.full_signature: public static void applyRange(Query query, Range<Long> range)
focal_class.identifier: applyRange
focal_class.modifiers: public static
focal_class.parameters: (Query query, Range<Long> range)
focal_class.return: void
focal_class.signature: void applyRange(Query query, Range<Long> range)
focal_class.class_method_signature: QueryUtils.createRange(Long limit, Long offset)
focal_class.full_signature: public static Range<Long> createRange(Long limit, Long offset)
focal_class.identifier: createRange
focal_class.modifiers: public static
focal_class.parameters: (Long limit, Long offset)
focal_class.return: Range<Long>
focal_class.signature: Range<Long> createRange(Long limit, Long offset)
focal_class.class_method_signature: QueryUtils.rangeToOffset(Range<Long> range)
focal_class.full_signature: public static long rangeToOffset(Range<Long> range)
focal_class.identifier: rangeToOffset
focal_class.modifiers: public static
focal_class.parameters: (Range<Long> range)
focal_class.return: long
focal_class.signature: long rangeToOffset(Range<Long> range)
focal_class.class_method_signature: QueryUtils.rangeToLimit(Range<Long> range)
focal_class.full_signature: public static long rangeToLimit(Range<Long> range)
focal_class.identifier: rangeToLimit
focal_class.modifiers: public static
focal_class.parameters: (Range<Long> range)
focal_class.return: long
focal_class.signature: long rangeToLimit(Range<Long> range)
focal_class.class_method_signature: QueryUtils.toRange(Query query)
focal_class.full_signature: public static Range<Long> toRange(Query query)
focal_class.identifier: toRange
focal_class.modifiers: public static
focal_class.parameters: (Query query)
focal_class.return: Range<Long>
focal_class.signature: Range<Long> toRange(Query query)
focal_class.class_method_signature: QueryUtils.toRange(Long offset, Long limit)
focal_class.full_signature: public static Range<Long> toRange(Long offset, Long limit)
focal_class.identifier: toRange
focal_class.modifiers: public static
focal_class.parameters: (Long offset, Long limit)
focal_class.return: Range<Long>
focal_class.signature: Range<Long> toRange(Long offset, Long limit)
focal_class.class_method_signature: QueryUtils.subRange(Range<Long> parent, Range<Long> child)
focal_class.full_signature: public static Range<Long> subRange(Range<Long> parent, Range<Long> child)
focal_class.identifier: subRange
focal_class.modifiers: public static
focal_class.parameters: (Range<Long> parent, Range<Long> child)
focal_class.return: Range<Long>
focal_class.signature: Range<Long> subRange(Range<Long> parent, Range<Long> child)
focal_class.class_method_signature: QueryUtils.applyDatasetDescription(Query query,
              DatasetDescription dd)
focal_class.full_signature: public static void applyDatasetDescription(Query query,
              DatasetDescription dd)
focal_class.identifier: applyDatasetDescription
focal_class.modifiers: public static
focal_class.parameters: (Query query,
              DatasetDescription dd)
focal_class.return: void
focal_class.signature: void applyDatasetDescription(Query query,
              DatasetDescription dd)
focal_class.class_method_signature: QueryUtils.fixVarNames(Query query)
focal_class.full_signature: public static Query fixVarNames(Query query)
focal_class.identifier: fixVarNames
focal_class.modifiers: public static
focal_class.parameters: (Query query)
focal_class.return: Query
focal_class.signature: Query fixVarNames(Query query)
focal_class.class_method_signature: QueryUtils.elementToQuery(Element pattern, String resultVar)
focal_class.full_signature: public static Query elementToQuery(Element pattern, String resultVar)
focal_class.identifier: elementToQuery
focal_class.modifiers: public static
focal_class.parameters: (Element pattern, String resultVar)
focal_class.return: Query
focal_class.signature: Query elementToQuery(Element pattern, String resultVar)
focal_class.class_method_signature: QueryUtils.elementToQuery(Element pattern)
focal_class.full_signature: public static Query elementToQuery(Element pattern)
focal_class.identifier: elementToQuery
focal_class.modifiers: public static
focal_class.parameters: (Element pattern)
focal_class.return: Query
focal_class.signature: Query elementToQuery(Element pattern)
focal_class.class_method_signature: QueryUtils.instanciate(Iterable<Quad> quads, Binding binding)
focal_class.full_signature: public static Set<Quad> instanciate(Iterable<Quad> quads, Binding binding)
focal_class.identifier: instanciate
focal_class.modifiers: public static
focal_class.parameters: (Iterable<Quad> quads, Binding binding)
focal_class.return: Set<Quad>
focal_class.signature: Set<Quad> instanciate(Iterable<Quad> quads, Binding binding)
focal_method.body: public static PrefixMapping usedPrefixes(Query query, PrefixMapping global) {
          PrefixMapping local = query.getPrefixMapping();
          PrefixMapping pm = global == null ? local : new PrefixMapping2(global, local);
          PrefixMapping result = usedReferencePrefixes(query, pm);
          return result;
      }
focal_method.class_method_signature: QueryUtils.usedPrefixes(Query query, PrefixMapping global)
focal_method.full_signature: public static PrefixMapping usedPrefixes(Query query, PrefixMapping global)
focal_method.identifier: usedPrefixes
focal_method.invocations: getPrefixMapping usedReferencePrefixes
focal_method.modifiers: public static
focal_method.parameters: (Query query, PrefixMapping global)
focal_method.return: PrefixMapping
focal_method.signature: PrefixMapping usedPrefixes(Query query, PrefixMapping global)