congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Session.addOntology
Code IndexAdd Tabnine to your IDE (free)

How to use
addOntology
method
in
org.apache.stanbol.ontologymanager.servicesapi.session.Session

Best Java code snippets using org.apache.stanbol.ontologymanager.servicesapi.session.Session.addOntology (Showing top 6 results out of 315)

origin: apache/stanbol

  /**
   * Tells the session that it should manage the ontology obtained by dereferencing the supplied IRI.<br>
   * <br>
   * Note that the PUT method cannot be used, as it is not possible to predict what ID the ontology will
   * have until it is parsed.
   * 
   * @param content
   *            the ontology physical IRI
   * @return {@link Status#OK} if the addition was successful, {@link Status#NOT_FOUND} if there is no such
   *         session at all, {@link Status#FORBIDDEN} if the session is locked or cannot modified for some
   *         other reason, {@link Status#INTERNAL_SERVER_ERROR} if some other error occurs.
   */
  @POST
  @Consumes(value = MediaType.TEXT_PLAIN)
  public Response manageOntology(String iri, @PathParam("id") String sessionId, @Context HttpHeaders headers) {

    session = sesMgr.getSession(sessionId);
    if (session == null) return Response.status(NOT_FOUND).build();
    try {
      session.addOntology(new RootOntologySource(IRI.create(iri)));
    } catch (UnmodifiableOntologyCollectorException e) {
      throw new WebApplicationException(e, FORBIDDEN);
    } catch (OWLOntologyCreationException e) {
      throw new WebApplicationException(e, INTERNAL_SERVER_ERROR);
    }
    ResponseBuilder rb = Response.ok();
//        addCORSOrigin(servletContext, rb, headers);
    return rb.build();
  }

origin: apache/stanbol

src = new GraphContentInputSource(content, mt, ontologyProvider.getStore());
log.debug("SUCCESS parse with media type {}.", mt);
OWLOntologyID key = session.addOntology(src);
if (key == null || key.isAnonymous()) {
  log.error("FAILED parse with media type {}.", mt);
origin: apache/stanbol

for (OWLOntologyID key : struct.getOntologyKeysForSession(sessionId))
  try {
    session.addOntology(new StoredOntologySource(key));
  } catch (MissingOntologyException ex) {
    log.error(
origin: org.apache.stanbol/org.apache.stanbol.ontologymanager.multiplexer.clerezza

for (OWLOntologyID key : struct.getOntologyKeysForSession(sessionId))
  try {
    session.addOntology(new StoredOntologySource(key));
  } catch (MissingOntologyException ex) {
    log.error(
origin: apache/stanbol

  log.debug("Adding ontology from input source {}", src);
  long b4add = System.currentTimeMillis();
  OWLOntologyID key = session.addOntology(src);
  if (key == null || key.isAnonymous()) throw new WebApplicationException(INTERNAL_SERVER_ERROR);
  session.addOntology(new StoredOntologySource(OntologyUtils.decode(key)));
rb = Response.seeOther(URI.create("/ontonet/session/" + session.getID()));
origin: apache/stanbol

  session.addOntology(new GraphSource(signaturesGraph));
  session.addOntology(new GraphSource(metadataGraph));
} catch (UnmodifiableOntologyCollectorException e1) {
  throw new EngineException("Cannot add enhancement graph to OntoNet session for refactoring", e1);
org.apache.stanbol.ontologymanager.servicesapi.sessionSessionaddOntology

Popular methods of Session

  • export
  • getID
  • attachScope
    Instructs the session to reference the supplied ontology scope. This way, whenever session data are
  • detachScope
    Instructs the session to no longer reference the supplied ontology scope. If a scope with the suppli
  • getAttachedScopes
    Gets the identifiers of the scopes currently attached to this session.
  • listManagedOntologies
  • addOntologyCollectorListener
  • addSessionListener
  • close
    Closes this Session irreversibly. Most likely includes setting the state to ZOMBIE.
  • getOntology
  • getSessionState
    Returns the current state of this KReS session.
  • hasOntology
  • getSessionState,
  • hasOntology,
  • removeOntology,
  • setActive,
  • setConnectivityPolicy

Popular in Java

  • Reading from database using SQL prepared statement
  • findViewById (Activity)
  • getSharedPreferences (Context)
  • addToBackStack (FragmentTransaction)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now