Package org.apache.stanbol.ontologymanager.ontonet.api.io

Examples of org.apache.stanbol.ontologymanager.ontonet.api.io.GraphContentInputSource


        OntologyProvider<TcProvider> provider = new ClerezzaOntologyProvider(tcManager,
                new OfflineConfigurationImpl(new Hashtable<String,Object>()), parser);

        InputStream content = TestClerezzaInputSources.class
                .getResourceAsStream("/ontologies/droppedcharacters.owl");
        OntologyInputSource<?,TcProvider> src = new GraphContentInputSource(content, SupportedFormat.RDF_XML,
            new SimpleTcProvider(), parser);
       
        log.info("After input source creation, TcManager has {} graphs. ", tcManager.listTripleCollections()
                .size());
        for (UriRef name : tcManager.listTripleCollections())
View Full Code Here


                       RDF_JSON})
    public Response manageOntology(InputStream content, @Context HttpHeaders headers) {
        long before = System.currentTimeMillis();
        if (session == null) return Response.status(NOT_FOUND).build();
        try {
            session.addOntology(new GraphContentInputSource(content)
            // new OntologyContentInputSource(content)
            );
        } catch (UnmodifiableOntologyCollectorException e) {
            throw new WebApplicationException(e, FORBIDDEN);
        }
View Full Code Here

             * For the time being, REST services operate in-memory (i.e. no TcProvider is supplied to the
             * input source). This means that only the final processed graph is stored.
             *
             * TODO : we might find a reason to change that in the future.
             */
            new GraphContentInputSource(content, headers.getMediaType().toString())
            // new OntologyContentInputSource(content)
                    );
        } catch (UnmodifiableOntologyCollectorException e) {
            throw new WebApplicationException(e, FORBIDDEN);
        }
View Full Code Here

TOP

Related Classes of org.apache.stanbol.ontologymanager.ontonet.api.io.GraphContentInputSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.