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

How to use
remove
method
in
com.hp.hpl.jena.rdf.model.InfModel

Best Java code snippets using com.hp.hpl.jena.rdf.model.InfModel.remove (Showing top 1 results out of 315)

origin: stackoverflow.com

 final Property p = ResourceFactory.createProperty("urn:eg:p");

final Model rawData = ModelFactory.createDefaultModel();
final Resource a = rawData.createResource("urn:a");
final Resource b = rawData.createResource("urn:b");
final Resource c = rawData.createResource("urn:c");
a.addProperty(p, b);
b.addProperty(p, c);
a.addProperty(p, c);

final String rules = "[rule1: (?a urn:eg:p ?b) (?b urn:eg:p ?c) -> (?a urn:eg:p ?c)]";
final Reasoner reasoner = new GenericRuleReasoner(Rule.parseRules(rules));
reasoner.setDerivationLogging(true);
final InfModel inf = ModelFactory.createInfModel(reasoner, rawData);

assertTrue(inf.contains(a,p,c));
final Iterator<Derivation> d0 = inf.getDerivation(inf.asStatement(Triple.create(a.asNode(), p.asNode(), c.asNode())));
assertFalse(d0.hasNext());

inf.remove(a,p,c);

assertTrue(inf.contains(a,p,c));
final Iterator<Derivation> d1 = inf.getDerivation(inf.asStatement(Triple.create(a.asNode(), p.asNode(), c.asNode())));
assertTrue(d1.hasNext());
com.hp.hpl.jena.rdf.modelInfModelremove

Popular methods of InfModel

  • prepare
    Perform any initial processing and caching. This call is optional. Most engines either have negligab
  • listStatements
    Find all the statements matching a pattern.Return an iterator over all the statements in a model tha
  • validate
    Test the consistency of the underlying data. This normally tests the validity of the bound instance
  • getDeductionsModel
    Returns a derivations model. The rule reasoners typically create a graph containing those triples ad
  • write
  • asStatement
  • contains
  • getDerivation
    Return the derivation of the given statement (which should be the result of some previous list opera
  • getGraph
  • getResource
  • setNsPrefixes
  • setNsPrefixes

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (Timer)
  • startActivity (Activity)
  • putExtra (Intent)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • JLabel (javax.swing)
  • JTable (javax.swing)
  • Top PhpStorm 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