congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ReasonerRegistry.getRDFSReasoner
Code IndexAdd Tabnine to your IDE (free)

How to use
getRDFSReasoner
method
in
org.apache.jena.reasoner.ReasonerRegistry

Best Java code snippets using org.apache.jena.reasoner.ReasonerRegistry.getRDFSReasoner (Showing top 10 results out of 315)

origin: org.apache.jena/jena-core

/**
 * Return a Model through which all the RDFS entailments
 * derivable from the given model are accessible. Some work is done
 * when the inferenced model is created but each query will also trigger some
 * additional inference work.
 *
 * @param model the Model containing both instance data and schema assertions to be inferenced over
 */
public static InfModel createRDFSModel(Model model) {
   Reasoner reasoner = ReasonerRegistry.getRDFSReasoner();
   InfGraph graph = reasoner.bind( model.getGraph() );
   return new InfModelImpl( graph );
}
origin: apache/jena

/**
 * Return a Model through which all the RDFS entailments
 * derivable from the given model are accessible. Some work is done
 * when the inferenced model is created but each query will also trigger some
 * additional inference work.
 *
 * @param model the Model containing both instance data and schema assertions to be inferenced over
 */
public static InfModel createRDFSModel(Model model) {
   Reasoner reasoner = ReasonerRegistry.getRDFSReasoner();
   InfGraph graph = reasoner.bind( model.getGraph() );
   return new InfModelImpl( graph );
}
origin: apache/jena

/**
 * Return a Model through which all the RDFS entailments
 * derivable from the given data and schema models are accessible.
 * There is no strict requirement to separate schema and instance data between the two
 * arguments.
 *
 * @param model a Model containing instance data assertions
 * @param schema a Model containing RDFS schema data
 */
public static InfModel createRDFSModel( Model schema, Model model ) {
   Reasoner reasoner = ReasonerRegistry.getRDFSReasoner();
   InfGraph graph  = reasoner.bindSchema(schema.getGraph()).bind(model.getGraph());
   return new InfModelImpl( graph );
}
origin: org.apache.jena/jena-core

/**
 * Return a Model through which all the RDFS entailments
 * derivable from the given data and schema models are accessible.
 * There is no strict requirement to separate schema and instance data between the two
 * arguments.
 *
 * @param model a Model containing instance data assertions
 * @param schema a Model containing RDFS schema data
 */
public static InfModel createRDFSModel( Model schema, Model model ) {
   Reasoner reasoner = ReasonerRegistry.getRDFSReasoner();
   InfGraph graph  = reasoner.bindSchema(schema.getGraph()).bind(model.getGraph());
   return new InfModelImpl( graph );
}
origin: apache/jena

/**
 * Test that reset does actually clear out all the data.
 * We use the RDFS configuration because uses both TGC, forward and backward
 * rules and so is a good check.
 */
public void testRebind2() {
  String NS = "http://jena.hpl.hp.com/test#";
  Model base = ModelFactory.createDefaultModel();
  Resource A = base.createResource(NS + "A");
  Resource B = base.createResource(NS + "B");
  Resource I = base.createResource(NS + "i");
  A.addProperty(RDFS.subClassOf, B);
  I.addProperty(RDF.type, A);
  InfModel inf = ModelFactory.createInfModel(ReasonerRegistry.getRDFSReasoner(), base);
  assertTrue(inf.containsResource(A) && inf.containsResource(I));
  base.removeAll();
  inf.rebind();
  assertFalse(inf.containsResource(A) || inf.containsResource(I));
}
  
origin: org.apache.jena/jena-core

/**
 * Test that reset does actually clear out all the data.
 * We use the RDFS configuration because uses both TGC, forward and backward
 * rules and so is a good check.
 */
public void testRebind2() {
  String NS = "http://jena.hpl.hp.com/test#";
  Model base = ModelFactory.createDefaultModel();
  Resource A = base.createResource(NS + "A");
  Resource B = base.createResource(NS + "B");
  Resource I = base.createResource(NS + "i");
  A.addProperty(RDFS.subClassOf, B);
  I.addProperty(RDF.type, A);
  InfModel inf = ModelFactory.createInfModel(ReasonerRegistry.getRDFSReasoner(), base);
  assertTrue(inf.containsResource(A) && inf.containsResource(I));
  base.removeAll();
  inf.rebind();
  assertFalse(inf.containsResource(A) || inf.containsResource(I));
}
  
origin: apache/jena

Graph data = Factory.createGraphMem();
data.add(new Triple(a, p, b));
InfGraph igraph = ReasonerRegistry.getRDFSReasoner().bind(new Union(tdata, data));
TestUtil.assertIteratorValues(this, igraph.find(a, ty, null),
new Object[] {
igraph = ReasonerRegistry.getRDFSReasoner().bindSchema(tdata).bind(data);
TestUtil.assertIteratorValues(this, igraph.find(a, ty, null),
new Object[] {
origin: org.apache.jena/jena-core

Graph data = Factory.createGraphMem();
data.add(new Triple(a, p, b));
InfGraph igraph = ReasonerRegistry.getRDFSReasoner().bind(new Union(tdata, data));
TestUtil.assertIteratorValues(this, igraph.find(a, ty, null),
new Object[] {
igraph = ReasonerRegistry.getRDFSReasoner().bindSchema(tdata).bind(data);
TestUtil.assertIteratorValues(this, igraph.find(a, ty, null),
new Object[] {
origin: apache/jena

/**
 * Check interface extensions which had an earlier bug with null handling
 */
public void testListWithPosits() {
  String NS = PrintUtil.egNS;
  Model data = ModelFactory.createDefaultModel();
  Resource c1 = data.createResource(NS + "C1");
  Resource c2 = data.createResource(NS + "C2");
  Resource c3 = data.createResource(NS + "C3");
  data.add(c2, RDFS.subClassOf, c3);
  Model premise = ModelFactory.createDefaultModel();
  premise.add(c1, RDFS.subClassOf, c2);
  InfModel im = ModelFactory.createInfModel(ReasonerRegistry.getRDFSReasoner(), data);
  TestUtil.assertIteratorValues(this, im.listStatements(c1, RDFS.subClassOf, null, premise),
      new Object[] {
        data.createStatement(c1, RDFS.subClassOf, c2),
        data.createStatement(c1, RDFS.subClassOf, c3),
        data.createStatement(c1, RDFS.subClassOf, c1)
      });
  
  OntModel om = ModelFactory.createOntologyModel(OntModelSpec.RDFS_MEM_RDFS_INF, data);
  TestUtil.assertIteratorValues(this, om.listStatements(c1, RDFS.subClassOf, null, premise),
      new Object[] {
        data.createStatement(c1, RDFS.subClassOf, c2),
        data.createStatement(c1, RDFS.subClassOf, c3),
        data.createStatement(c1, RDFS.subClassOf, c1)
      });
}
origin: org.apache.jena/jena-core

/**
 * Check interface extensions which had an earlier bug with null handling
 */
public void testListWithPosits() {
  String NS = PrintUtil.egNS;
  Model data = ModelFactory.createDefaultModel();
  Resource c1 = data.createResource(NS + "C1");
  Resource c2 = data.createResource(NS + "C2");
  Resource c3 = data.createResource(NS + "C3");
  data.add(c2, RDFS.subClassOf, c3);
  Model premise = ModelFactory.createDefaultModel();
  premise.add(c1, RDFS.subClassOf, c2);
  InfModel im = ModelFactory.createInfModel(ReasonerRegistry.getRDFSReasoner(), data);
  TestUtil.assertIteratorValues(this, im.listStatements(c1, RDFS.subClassOf, null, premise),
      new Object[] {
        data.createStatement(c1, RDFS.subClassOf, c2),
        data.createStatement(c1, RDFS.subClassOf, c3),
        data.createStatement(c1, RDFS.subClassOf, c1)
      });
  
  OntModel om = ModelFactory.createOntologyModel(OntModelSpec.RDFS_MEM_RDFS_INF, data);
  TestUtil.assertIteratorValues(this, om.listStatements(c1, RDFS.subClassOf, null, premise),
      new Object[] {
        data.createStatement(c1, RDFS.subClassOf, c2),
        data.createStatement(c1, RDFS.subClassOf, c3),
        data.createStatement(c1, RDFS.subClassOf, c1)
      });
}
org.apache.jena.reasonerReasonerRegistrygetRDFSReasoner

Javadoc

Return a prebuilt standard configuration for the default RDFS reasoner

Popular methods of ReasonerRegistry

  • getOWLMicroReasoner
    Prebuilt standard configuration a micro-OWL reasoner. This just supports property axioms, and class
  • getOWLReasoner
    Prebuilt standard configuration for the default OWL reasoner. This configuration is hybrid forward/b
  • makeDirect
    Return a property Node which represents the direct version of a transitively closed property. See ma
  • <init>
    Constructor is hidden - go via theRegistry
  • getFactory
    Return the factory for the given reasoner.
  • getTransitiveReasoner
    Return a prebuilt standard configuration for the default subclass/subproperty transitive closure rea
  • register
    Register a Reasoner.
  • theRegistry
    Return the single global instance of the registry

Popular in Java

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • onCreateOptionsMenu (Activity)
  • getSharedPreferences (Context)
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top Sublime Text plugins
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