Package org.ontoware.rdf2go.model.impl

Examples of org.ontoware.rdf2go.model.impl.TriplePatternImpl


        assertEquals(predicate, next.getPredicate());
        assertFalse(statements.hasNext());
      }
    };
    this.notifyingModel.addModelChangedListener(listener,
        new TriplePatternImpl(subject, Variable.ANY, Variable.ANY));

    this.notifyingModel.addStatement(subject, predicate, "Test1");
    this.notifyingModel.addStatement(predicate, object, "Test2");
    this.notifyingModel.addStatement(predicate, subject, "Test3");
    this.notifyingModel.removeModelChangedListener(listener);
View Full Code Here


        assertEquals(new PlainLiteralImpl("Sebastian"), statement
            .getObject());
      }
    };
    this.notifyingModel.addModelChangedListener(listener,
        new TriplePatternImpl(Variable.ANY, Variable.ANY,
            new PlainLiteralImpl("Sebastian")));
    this.notifyingModel.addStatement(subject, predicate, "Sebastian Gerke");
    this.notifyingModel.addStatement(predicate, object, "Sebastian");
    this.notifyingModel.close();
  }
View Full Code Here

            .getObject());
        assertEquals(predicate, statement.getPredicate());
      }
    };
    this.notifyingModel.addModelChangedListener(listener,
        new TriplePatternImpl(Variable.ANY, predicate,
            new PlainLiteralImpl("Sebastian")));
    this.notifyingModel.addStatement(subject, predicate, "Sebastian Gerke");
    this.notifyingModel.addStatement(subject, predicate, "Sebastian");
    this.notifyingModel.addStatement(predicate, object, "Sebastian");
    this.notifyingModel.close();
View Full Code Here

    if(returnType == null)
      throw new IllegalArgumentException("returnType may not be null");
    assertOpen(model);
    Resource rdfResource = RDFReactorRuntime.genericResource2RDF2Goresource(model,
            resourceSubject);
    return new ReactorResult<T>(model, new TriplePatternImpl(rdfResource, propertyURI,
            Variable.ANY, TriplePatternImpl.SPO.OBJECT), returnType);
  }
View Full Code Here

      throw new IllegalArgumentException("propertyURI may not be null");
    if(returnType == null)
      throw new IllegalArgumentException("returnType may not be null");
    assertOpen(model);
    Node node = RDFReactorRuntime.java2node(model, value);
    return new ReactorResult<T>(model, new TriplePatternImpl(Variable.ANY, propertyURI, node,
            TriplePatternImpl.SPO.SUBJECT), returnType);
  }
View Full Code Here

    if(classURI == null)
      throw new IllegalArgumentException("classURI may not be null");
    if(returnType == null)
      throw new IllegalArgumentException("returnType may not be null");
    assertOpen(model);
    return new ReactorResult<T>(model, new TriplePatternImpl(Variable.ANY, RDF.type, classURI,
            TriplePatternImpl.SPO.SUBJECT), returnType);
   
  }
View Full Code Here

  public void testAddRemoveStatementObjectURIString() throws Exception {
    BlankNode blankNode = this.model.createBlankNode();
   
    this.model.addStatement(blankNode, predicate, "Test");
    ClosableIterator<? extends Statement> sit = this.model
            .findStatements(new TriplePatternImpl(blankNode, predicate, "Test"));
    assertTrue(sit.hasNext());
    while(sit.hasNext()) {
      // should be just one
      Statement s = sit.next();
      assertEquals("blank node equality", blankNode, s.getSubject());
      assertEquals(predicate, s.getPredicate());
      assertEquals(s.getObject(), "Test");
    }
    sit.close();
    this.model.removeStatement(blankNode, predicate, "Test");
    ClosableIterator<? extends Statement> it = this.model.findStatements(new TriplePatternImpl(
            blankNode, predicate, "Test"));
    assertFalse(it.hasNext());
    it.close();
  }
View Full Code Here

TOP

Related Classes of org.ontoware.rdf2go.model.impl.TriplePatternImpl

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.