Package org.apache.clerezza.rdf.rdfjson.serializer

Examples of org.apache.clerezza.rdf.rdfjson.serializer.RdfJsonSerializingProvider


        parser = new Parser(); // add Jena-supported formats + RDF/JSON
        parser.bindParsingProvider(new JenaParserProvider());
        parser.bindParsingProvider(new RdfJsonParsingProvider());
        serializer = new Serializer(); // add Jena-supported formats + RDF/JSON
        serializer.bindSerializingProvider(new JenaSerializerProvider());
        serializer.bindSerializingProvider(new RdfJsonSerializingProvider());

        // reset Stanbol objects
    }
View Full Code Here


        parser = new Parser(); // add Jena-supported formats + RDF/JSON
        parser.bindParsingProvider(new JenaParserProvider());
        parser.bindParsingProvider(new RdfJsonParsingProvider());
        serializer = new Serializer(); // add Jena-supported formats + RDF/JSON
        serializer.bindSerializingProvider(new JenaSerializerProvider());
        serializer.bindSerializingProvider(new RdfJsonSerializingProvider());

        // reset Stanbol objects
        ontologyProvider = new ClerezzaOntologyProvider(tcManager, offline, parser);
        collectorfactory = new ClerezzaCollectorFactory(ontologyProvider, config);
        resetManagers();
View Full Code Here

        tcManager = new TcManager();
        tcManager.addWeightedTcProvider(new SimpleTcProvider());
       
        serializer = new Serializer();
        serializer.bindSerializingProvider(new JenaSerializerProvider());
        serializer.bindSerializingProvider(new RdfJsonSerializingProvider());
       
        parser = new Parser();
        parser.bindParsingProvider(new JenaParserProvider());
        parser.bindParsingProvider(new RdfJsonParsingProvider());
    }
View Full Code Here

                }
            } else if (mediaType.toString().equals(KRFormat.RDF_JSON)) {

                TripleCollection mGraph = OWLAPIToClerezzaConverter.owlOntologyToClerezzaMGraph(ontology);

                RdfJsonSerializingProvider provider = new RdfJsonSerializingProvider();
                provider.serialize(out, mGraph, SupportedFormat.RDF_JSON);

            }
        } catch (OWLOntologyCreationException e1) {
            log.error("An error occurred.", e1);
        }
View Full Code Here

                    }
                } else if (mediaType.toString().equals(KRFormat.RDF_JSON)) {
   
                    TripleCollection mGraph = OWLAPIToClerezzaConverter.owlOntologyToClerezzaMGraph(ontology);
   
                    RdfJsonSerializingProvider provider = new RdfJsonSerializingProvider();
                    provider.serialize(out, mGraph, SupportedFormat.RDF_JSON);
   
                }
            } catch (OWLOntologyCreationException e1) {
                log.error("An error occurred.", e1);
            }
View Full Code Here

                }
            } else if (mediaType.toString().equals(KRFormat.RDF_JSON)) {

                TripleCollection mGraph = OWLAPIToClerezzaConverter.owlOntologyToClerezzaMGraph(ontology);

                RdfJsonSerializingProvider provider = new RdfJsonSerializingProvider();
                provider.serialize(out, mGraph, SupportedFormat.RDF_JSON);

            }
        } catch (OWLOntologyCreationException e1) {
            log.error("An error occurred.", e1);
        }
View Full Code Here

            // Non-native formats that require a conversion to Clerezza
            if (RDF_JSON_TYPE.equals(mediaType) || N3_TYPE.equals(mediaType)
                || TEXT_PLAIN.equals(mediaType.toString()) || N_TRIPLE_TYPE.equals(mediaType)) {
                TripleCollection mGraph = OWLAPIToClerezzaConverter.owlOntologyToClerezzaMGraph(ontology);
                SerializingProvider serializer = null;
                if (RDF_JSON_TYPE.equals(mediaType)) serializer = new RdfJsonSerializingProvider();
                else if (N3_TYPE.equals(mediaType) || N_TRIPLE_TYPE.equals(mediaType)
                         || TEXT_PLAIN.equals(mediaType.toString())) serializer = new JenaSerializerProvider();

                // text/plain is interpreted as N3.
                if (serializer != null) serializer.serialize(out, mGraph,
View Full Code Here

        parser.bindParsingProvider(new JenaParserProvider());
        parser.bindParsingProvider(new RdfJsonParsingProvider());

        serializer = new Serializer();
        serializer.bindSerializingProvider(new JenaSerializerProvider());
        serializer.bindSerializingProvider(new RdfJsonSerializingProvider());

        ontologyProvider = new ClerezzaOntologyProvider(tcManager, offline, parser);
        Dictionary<String,Object> onmconf = new Hashtable<String,Object>();
        onmconf.put(ONManager.ONTOLOGY_NETWORK_NS, "http://stanbol.apache.org/scope/");
        onManager = new ONManagerImpl(ontologyProvider, offline, onmconf);
View Full Code Here

TOP

Related Classes of org.apache.clerezza.rdf.rdfjson.serializer.RdfJsonSerializingProvider

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.