Package org.ontoware.rdf2go.model

Examples of org.ontoware.rdf2go.model.TriplePattern


      System.out.println(foundTaggedJava.next().getSubject());
    }
    foundTaggedJava.close();
   
    // finding statements 'tagged with "Python"' with a triple pattern
    TriplePattern taggedAsPythonPattern = model.createTriplePattern(Variable.ANY, hasTag, tagPython);
    ClosableIterator<? extends Statement> foundTaggedPython;
    foundTaggedPython = model.findStatements(taggedAsPythonPattern);
    System.out.println("Everything tagged 'Python':");
    while (foundTaggedPython.hasNext()) {
      System.out.println(foundTaggedPython.next().getSubject());
View Full Code Here


   * @see org.ontoware.rdf2go.core.common.CommonModelWriter#addStatement(S)
   */
  @Override
  public void addStatement(Statement statement) throws ModelRuntimeException {
    for(ModelChangedListener listener : this.modelChangeListener.keySet()) {
      TriplePattern pattern = this.modelChangeListener.get(listener);
      if(pattern == null || pattern.matches(statement)) {
        listener.addedStatement(statement);
      }
    }
    getDelegatedModel().addStatement(statement);
  }
View Full Code Here

   * @see org.ontoware.rdf2go.core.common.CommonModelWriter#removeStatement(S)
   */
  @Override
  public void removeStatement(Statement statement) throws ModelRuntimeException {
    for(ModelChangedListener listener : this.modelChangeListener.keySet()) {
      TriplePattern pattern = this.modelChangeListener.get(listener);
      if(pattern == null || pattern.matches(statement)) {
        listener.removedStatement(statement);
      }
    }
    getDelegatedModel().removeStatement(statement);
  }
View Full Code Here

TOP

Related Classes of org.ontoware.rdf2go.model.TriplePattern

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.