Tabnine Logo
RIOT
Code IndexAdd Tabnine to your IDE (free)

How to use
RIOT
in
org.apache.jena.riot

Best Java code snippets using org.apache.jena.riot.RIOT (Showing top 17 results out of 315)

origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

  /** @deprecated Use org.apache.jena.riot.RIOT#init() */
  @Deprecated
  public static void init() { org.apache.jena.riot.RIOT.init() ; }
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

public static void register() {
  if ( registered )
    return ;
  registered = true ;
  VERSION = getVersion() ;
  BUILD_DATE = getBuildDate() ;
  SystemInfo sysInfo2 = new SystemInfo(RIOT.riotIRI, RIOT.PATH, VERSION, BUILD_DATE) ;
  SystemARQ.registerSubSystem(sysInfo2) ;
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Override
protected void processModulesAndArgs()
{ 
  if ( this.contains(argStrict) )
    RIOT.setStrictMode(true) ;
}
origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

/** 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() ;
  }
}

origin: apache/jena

public RDFWriter build() { 
  if ( context == null )
    context = RIOT.getContext().copy();
  if ( dataset == null && graph == null )
    throw new RiotException("No source to be written");
  return new RDFWriter(dataset, graph, format, lang, baseURI, context);
}

origin: apache/jena

RIOT.register() ;
origin: apache/jena

/** Create a {@link ParserProfile}. */
public static ParserProfile createParserProfile(FactoryRDF factory, ErrorHandler errorHandler, 
                   IRIResolver resolver, boolean checking) {
  return new ParserProfileStd(factory, 
                errorHandler,
                resolver,
                PrefixMapFactory.createForInput(),
                RIOT.getContext().copy(),
                checking, false);
}
origin: apache/jena

@Override
public void start() {
  RIOT.init();
  SerializerRDF.init();
}
origin: apache/jena

public static void register() {
  if ( registered )
    return ;
  registered = true ;
  VERSION = getVersion() ;
  BUILD_DATE = getBuildDate() ;
  SystemInfo sysInfo2 = new SystemInfo(RIOT.riotIRI, RIOT.PATH, VERSION, BUILD_DATE) ;
  SystemARQ.registerSubSystem(sysInfo2) ;
}
origin: apache/jena

/** Create a {@link ParserProfile} with default settings, and a specific error handler. */
public static ParserProfile createParserProfile(FactoryRDF factory, ErrorHandler errorHandler, boolean checking) {
  return new ParserProfileStd(factory, 
                errorHandler,
                IRIResolver.create(),
                PrefixMapFactory.createForInput(),
                RIOT.getContext().copy(),
                checking, false);
}

origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Override
protected void exec()
{
  if ( modLangParse.strictMode() )
    RIOT.setStrictMode(true) ; 
  
  if ( modLangParse.getRDFSVocab() != null )
    setup = new InferenceSetupRDFS(modLangParse.getRDFSVocab()) ;
   try {
    if ( super.getPositional().isEmpty() )
      parseFile("-") ;
    else
    {
      boolean b = super.getPositional().size() > 1 ;
      for ( String fn : super.getPositional() )
      {
        if ( b && ! super.isQuiet() )
          SysRIOT.getLogger().info("File: "+fn) ;
        parseFile(fn) ;
      }
    }
  } finally {
    System.err.flush() ;
    System.out.flush() ;
    if ( super.getPositional().size() > 1 && modTime.timingEnabled() )
      output("Total", totalTuples, totalMillis, langHandlerOverall) ;
  }
}

origin: org.semweb4j/rdf2go.impl.jena

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
}
origin: apache/jena

private ParserProfile makeParserProfile(IRIResolver resolver, ErrorHandler errorHandler, boolean checking) {
  if ( errorHandler == null )
    errorHandler = ErrorHandlerFactory.errorHandlerStd;
  return new ParserProfileStd(RiotLib.factoryRDF(), 
                errorHandler,
                resolver,
                PrefixMapFactory.createForInput(),
                RIOT.getContext().copy(),
                checking, false) ;
}
origin: org.semweb4j/rdf2go.impl.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);
}
 
origin: apache/jena

/** Create a {@link ParserProfile}, no resolving, no prefix map. */
static ParserProfile parserProfile(ErrorHandler errorHandler) {
  return new ParserProfileStd(RiotLib.factoryRDF(), 
                errorHandler,
                IRIResolver.createNoResolve(),
                PrefixMapFactory.emptyPrefixMap(),
                RIOT.getContext().copy(),
                true, false) ;
}
origin: castagna/jena-examples

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");
}

origin: apache/jena

/** Internal ParserProfile used to create nodes from strings. */ 
private static ParserProfile setupInternalParserProfile() {
  PrefixMap pmap = PrefixMapFactory.createForInput();
  pmap.add("rdf",  ARQConstants.rdfPrefix);
  pmap.add("rdfs", ARQConstants.rdfsPrefix);
  pmap.add("xsd",  ARQConstants.xsdPrefix);
  pmap.add("owl" , ARQConstants.owlPrefix);
  pmap.add("fn" ,  ARQConstants.fnPrefix); 
  pmap.add("op" ,  ARQConstants.fnPrefix); 
  pmap.add("ex" ,  "http://example/ns#");
  pmap.add("" ,    "http://example/");
  
  return new ParserProfileStd(RiotLib.factoryRDF(), 
                ErrorHandlerFactory.errorHandlerStd,
                IRIResolver.create(),
                pmap,
                RIOT.getContext().copy(),
                true, false);
}

org.apache.jena.riotRIOT

Most used methods

  • init
  • getBuildDate
  • getContext
  • getVersion
  • register
  • setStrictMode

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • getSharedPreferences (Context)
  • setRequestProperty (URLConnection)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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