Codota Logo
IQConverter
Code IndexAdd Codota to your IDE (free)

How to use
IQConverter
in
it.unibz.inf.ontop.iq.tools

Best Java code snippets using it.unibz.inf.ontop.iq.tools.IQConverter (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: ontop/ontop

  private IntermediateQuery liftBinding(IntermediateQuery query) throws EmptyQueryException {
    IQ iq = iqConverter.convert(query);
    return iqConverter.convert(iq.liftBinding(), query.getDBMetadata(), query.getExecutorRegistry());
  }
}
origin: ontop/ontop

@Override
public NodeCentricOptimizationResults<N> apply(SubstitutionPropagationProposal<N> proposal,
                        IntermediateQuery query, QueryTreeComponent treeComponent)
    throws InvalidQueryOptimizationProposalException {
  N focusNode = proposal.getFocusNode();
  IQTree propagatedSubTree = propagate(iqConverter.convertTree(query, focusNode),
      proposal.getSubstitution());
  treeComponent.replaceSubTreeByIQ(focusNode, propagatedSubTree);
  return new NodeCentricOptimizationResultsImpl<>(query, Optional.of(propagatedSubTree.getRootNode()));
}
origin: ontop/ontop

  @Override
  public IntermediateQuery optimize(IntermediateQuery query) throws EmptyQueryException {
    IQ initialIQ = iqConverter.convert(query);

    IQ liftedIQ = optimizer.optimize(initialIQ);

    return iqConverter.convert(liftedIQ, query.getDBMetadata(), query.getExecutorRegistry());
  }
}
origin: ontop/ontop

private IQ normalizeIQ(IntermediateQuery intermediateQuery) {
  // Trick for pushing down expressions under unions:
  //   - there the context may be concrete enough for evaluating certain expressions
  //   - useful for dealing with SPARQL EBVs for instance
  IntermediateQuery pushedDownQuery = pushDownExpressionOptimizer.optimize(intermediateQuery);
  log.debug("New query after pushing down the boolean expressions (temporary): \n" + pushedDownQuery);
  IQ flattenIQ = unionFlattener.optimize(iqConverter.convert(pushedDownQuery));
  log.debug("New query after flattening the union: \n" + flattenIQ);
  IQTree treeAfterPullOut = optimizerFactory.createEETransformer(flattenIQ.getVariableGenerator()).transform(flattenIQ.getTree());
  log.debug("Query tree after pulling out equalities: \n" + treeAfterPullOut);
  // Pulling up is needed when filtering conditions appear above a data atom on the left
  // (causes problems to the IQ2DatalogConverter)
  try {
    IntermediateQuery queryAfterPullUp = pullUpExpressionOptimizer.optimize(iqConverter.convert(
        iqFactory.createIQ(flattenIQ.getProjectionAtom(), treeAfterPullOut),
        intermediateQuery.getDBMetadata(), intermediateQuery.getExecutorRegistry()));
    log.debug("New query after pulling up the boolean expressions: \n" + queryAfterPullUp);
    return iqConverter.convert(queryAfterPullUp);
  } catch (EmptyQueryException e) {
    // Not expected
    throw new MinorOntopInternalBugException(e.getMessage());
  }
}
origin: ontop/ontop

IntermediateQuery intermediateQuery = iqConverter.convert(unfoldedIQ, dbMetadata, executorRegistry);
it.unibz.inf.ontop.iq.toolsIQConverter

Most used methods

  • convert
  • convertTree

Popular in Java

  • Running tasks concurrently on multiple threads
  • findViewById (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • putExtra (Intent)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now