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

How to use
OntopConnection
in
it.unibz.inf.ontop.answering.connection

Best Java code snippets using it.unibz.inf.ontop.answering.connection.OntopConnection (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: ontop/ontop

/**
 * Releases all the connection resources
 */
public void close() throws OntopConnectionException {
  if (tmpStatement != null) {
    tmpStatement.close();
  }
  if (ontopConnection != null) {
    ontopConnection.close();
  }
}
origin: ontop/ontop

@Override
public OntopOWLStatement createStatement() throws OWLException {
  try {
    return new DefaultOntopOWLStatement(conn.createStatement(), inputQueryFactory);
  } catch (OntopConnectionException e) {
    throw new OWLException(e);
  }
}

origin: ontop/ontop

@Override
public boolean getAutoCommit() throws OWLException {
  try {
    return conn.getAutoCommit();
  } catch (OntopConnectionException e) {
    throw new OWLException(e);
  }
}
origin: ontop/ontop

if (autoCommit == this.ontopConnection.getAutoCommit()) {
  return;
  this.ontopConnection.setAutoCommit(autoCommit);
} catch (OntopConnectionException e) {
  throw new RepositoryException(e);
origin: ontop/ontop

@Override
public void rollBack() throws OWLException {
  try {
    conn.rollBack();
  } catch (OntopConnectionException e) {
    throw new OWLException(e);
  }
}
origin: ontop/ontop

@Override
public void setAutoCommit(boolean autocommit) throws OWLException {
  try {
    conn.setAutoCommit(autocommit);
  } catch (OntopConnectionException e) {
    throw new OWLException(e);
  }
}
origin: ontop/ontop

@Override
public void commit() throws RepositoryException {
  // Commits all updates that have been performed as part of this
  // connection sofar.
  if (isActive()) {
    try {
      // System.out.println("QuestConn commit..");
      ontopConnection.commit();
      this.isActive = false;
    } catch (OntopConnectionException e) {
      throw new RepositoryException(e);
    }
  } else {
    throw new RepositoryException(
        "Connection does not have an active transaction.");
  }
}
origin: ontop/ontop

@Override
public boolean isClosed() throws OWLException {
  try {
    return conn.isClosed();
  } catch (OntopConnectionException e) {
    throw new OWLException(e);
  }
}
origin: it.unibz.inf.ontop/ontop-rdf4j

if (autoCommit == this.ontopConnection.getAutoCommit()) {
  return;
  this.ontopConnection.setAutoCommit(autoCommit);
} catch (OntopConnectionException e) {
  throw new RepositoryException(e);
origin: it.unibz.inf.ontop/ontop-rdf4j

@Override
public void rollback() throws RepositoryException {
  // Rolls back all updates that have been performed as part of this
  // connection sofar.
  if (isActive()) {
    try {
      this.ontopConnection.rollBack();
      this.isActive = false;
    } catch (OntopConnectionException e) {
      throw new RepositoryException(e);
    }
  } else {
    throw new RepositoryException(
        "Connection does not have an active transaction.");
  }
}
origin: it.unibz.inf.ontop/ontop-rdf4j

@Override
public void commit() throws RepositoryException {
  // Commits all updates that have been performed as part of this
  // connection sofar.
  if (isActive()) {
    try {
      // System.out.println("QuestConn commit..");
      ontopConnection.commit();
      this.isActive = false;
    } catch (OntopConnectionException e) {
      throw new RepositoryException(e);
    }
  } else {
    throw new RepositoryException(
        "Connection does not have an active transaction.");
  }
}
origin: ontop/ontop

@Override
public boolean evaluate() throws QueryEvaluationException {
  AskQuery query = factory.createAskQuery(getQueryString(), getParsedQuery());
  try (OntopStatement stm = conn.createStatement();
     BooleanResultSet rs = stm.execute(query)) {
    return rs.getValue();
  } catch (OntopConnectionException | OntopQueryAnsweringException e) {
    throw new QueryEvaluationException(e);
  }
}
origin: ontop/ontop

@Override
public void commit() throws OWLException {
  try {
    conn.close();
  } catch (OntopConnectionException e) {
    throw new OWLException(e);
  }
}
origin: ontop/ontop

@Override
public boolean isAutoCommit() throws RepositoryException {
  //Checks whether the connection is in auto-commit mode.
  try {
    return ontopConnection.getAutoCommit();
  } catch (OntopConnectionException e) {
    throw new RepositoryException(e);
  }
}
origin: ontop/ontop

@Override
public void rollback() throws RepositoryException {
  // Rolls back all updates that have been performed as part of this
  // connection sofar.
  if (isActive()) {
    try {
      this.ontopConnection.rollBack();
      this.isActive = false;
    } catch (OntopConnectionException e) {
      throw new RepositoryException(e);
    }
  } else {
    throw new RepositoryException(
        "Connection does not have an active transaction.");
  }
}
origin: it.unibz.inf.ontop/ontop-rdf4j

@Override
public boolean evaluate() throws QueryEvaluationException {
  AskQuery query = factory.createAskQuery(getQueryString(), getParsedQuery());
  try (OntopStatement stm = conn.createStatement();
     BooleanResultSet rs = stm.execute(query)) {
    return rs.getValue();
  } catch (OntopConnectionException | OntopQueryAnsweringException e) {
    throw new QueryEvaluationException(e);
  }
}
origin: it.unibz.inf.ontop/ontop-rdf4j

@Override
public void close() throws RepositoryException {
  //Closes the connection, freeing resources. 
  //If the connection is not in autoCommit mode, 
  //all non-committed operations will be lost. 
  isOpen = false;
    try {
      ontopConnection.close();
    } catch (Exception e) {
      throw new RepositoryException(e);
    }
} 

origin: it.unibz.inf.ontop/ontop-rdf4j

@Override
public boolean isAutoCommit() throws RepositoryException {
  //Checks whether the connection is in auto-commit mode.
  try {
    return ontopConnection.getAutoCommit();
  } catch (OntopConnectionException e) {
    throw new RepositoryException(e);
  }
}
origin: ontop/ontop

private boolean executeConsistencyQuery(String strQuery) throws OWLException {
  try (OntopConnection connection = queryEngine.getConnection();
     OntopStatement st = connection.createStatement()) {
    AskQuery query = inputQueryFactory.createAskQuery(strQuery);
    BooleanResultSet trs = st.execute(query);
    if (trs != null) {
      boolean b = trs.getValue();
      trs.close();
      if (b)
        return false;
    }
    return true;
  } catch (Exception e) {
    throw new OWLException(e);
  }
}
origin: ontop/ontop

@Override
public void close() throws RepositoryException {
  //Closes the connection, freeing resources. 
  //If the connection is not in autoCommit mode, 
  //all non-committed operations will be lost. 
  isOpen = false;
    try {
      ontopConnection.close();
    } catch (Exception e) {
      throw new RepositoryException(e);
    }
} 

it.unibz.inf.ontop.answering.connectionOntopConnection

Most used methods

  • close
  • createStatement
  • getAutoCommit
  • rollBack
  • setAutoCommit
  • commit
  • isClosed

Popular in Java

  • Creating JSON documents from java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSharedPreferences (Context)
  • orElseThrow (Optional)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
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