/** @deprecated Use org.apache.jena.riot.RIOT#init() */ @Deprecated public static void init() { org.apache.jena.riot.RIOT.init() ; } }
@Override public void start() { RIOT.init(); SerializerRDF.init(); }
public ModelSetImplJena(com.hp.hpl.jena.query.Dataset dataset) { this.dataset = dataset; this.lock = this.dataset.getLock(); org.apache.jena.riot.RIOT.init(); //wires RIOT readers/writers into Jena }
public ModelImplJena(URI contextURI, com.hp.hpl.jena.rdf.model.Model jenaModel, Reasoning reasoning) { this.contextURI = contextURI; this.reasoning = reasoning; // re-use this.jenaModel = jenaModel; //wires RIOT readers/writers into Jena org.apache.jena.riot.RIOT.init(); // Fix for Jena lowercase language name "N-Triples": RDFReaderFImpl.setBaseReaderClassName("N-Triples", com.hp.hpl.jena.rdf.model.impl.NTripleReader.class.getName()) ; RDFWriterFImpl.setBaseWriterClassName("N-Triples", com.hp.hpl.jena.rdf.model.impl.NTripleWriter.class.getName()); applyReasoning(reasoning); }
public static void main(String[] args) { InputStream in = Utils.getResourceAsStream("data/data.ttl"); RIOT.init() ; Model model = ModelFactory.createDefaultModel(); // creates an in-memory Jena Model model.read(in, null, "TURTLE"); // parses an InputStream assuming RDF in Turtle format // Write the Jena Model in Turtle, RDF/XML and N-Triples format System.out.println("\n---- Turtle ----"); model.write(System.out, "TURTLE"); System.out.println("\n---- RDF/XML ----"); model.write(System.out, "RDF/XML"); System.out.println("\n---- RDF/XML Abbreviated ----"); model.write(System.out, "RDF/XML-ABBREV"); System.out.println("\n---- N-Triples ----"); model.write(System.out, "N-TRIPLES"); System.out.println("\n---- RDF/JSON ----"); model.write(System.out, "RDF/JSON"); }
/** Ensure things have started - applications do not need call this. * The method is public so any part of ARQ can call it. * Note the final static initializer call */ public static void init() { if ( initialized ) return ; synchronized(initLock) { if ( initialized ) return ; initialized = true ; globalContext = defaultSettings() ; RIOT.init() ; StageBuilder.init() ; ARQMgt.init() ; // After context and after PATH/NAME/VERSION/BUILD_DATE are set MappingRegistry.addPrefixMapping(ARQ.arqSymbolPrefix, ARQ.arqParamNS) ; // This is the pattern for any subsystem to register. SystemInfo sysInfo = new SystemInfo(ARQ.arqIRI, ARQ.PATH, ARQ.VERSION, ARQ.BUILD_DATE) ; SystemARQ.registerSubSystem(sysInfo) ; // Register RIOT details here, not earlier, to avoid // initialization loops with RIOT.init() called directly. RIOT.register() ; } }