Package org.openrdf.model

Examples of org.openrdf.model.Statement


     * Test method for
     * {@link org.semanticweb.owlapi.rio.utils.RioUtils#tripleAsStatement(org.semanticweb.owlapi.io.RDFTriple)}
     */
    @Test
    public void testTripleAllIRI() {
        Statement tripleAsStatement = RioUtils
                .tripleAsStatement(testOwlApiTripleAllIRI);
        assertEquals(testSesameTripleAllIRI, tripleAsStatement);
    }
View Full Code Here


        assertEquals(testSesameTripleAllIRI, tripleAsStatement);
    }

    @Test
    public void testTripleBNodeComparisonObject() {
        Statement tripleAsStatement = RioUtils
                .tripleAsStatement(testOwlApiTripleObjectBNode);
        assertEquals(testSesameTripleObjectBNode, tripleAsStatement);
    }
View Full Code Here

        assertEquals(testSesameTripleObjectBNode, tripleAsStatement);
    }

    @Test
    public void testTripleBNodeComparisonSubject() {
        Statement tripleAsStatement = RioUtils
                .tripleAsStatement(testOwlApiTripleSubjectBNode);
        assertEquals(testSesameTripleSubjectBNode, tripleAsStatement);
    }
View Full Code Here

        assertEquals(testSesameTripleSubjectBNode, tripleAsStatement);
    }

    @Test
    public void testTripleBNodeComparisonSubjectAndObject() {
        Statement tripleAsStatement = RioUtils
                .tripleAsStatement(testOwlApiTripleSubjectObjectBNode);
        assertEquals(testSesameTripleSubjectObjectBNode, tripleAsStatement);
    }
View Full Code Here

     * Test method for
     * {@link org.semanticweb.owlapi.rio.utils.RioUtils#tripleAsStatement(org.semanticweb.owlapi.io.RDFTriple)}
     */
    @Test
    public void testTripleLangLiteral() {
        Statement tripleAsStatement = RioUtils
                .tripleAsStatement(testOwlApiTripleLangLiteral);
        assertEquals(testSesameTripleLangLiteral, tripleAsStatement);
    }
View Full Code Here

     * Test method for
     * {@link org.semanticweb.owlapi.rio.utils.RioUtils#tripleAsStatement(org.semanticweb.owlapi.io.RDFTriple)}
     */
    @Test
    public void testTriplePlainLiteral() {
        Statement tripleAsStatement = RioUtils
                .tripleAsStatement(testOwlApiTriplePlainLiteral);
        assertEquals(testSesameTriplePlainLiteral, tripleAsStatement);
    }
View Full Code Here

     * Test method for
     * {@link org.semanticweb.owlapi.rio.utils.RioUtils#tripleAsStatement(org.semanticweb.owlapi.io.RDFTriple)}
     */
    @Test
    public void testTripleTypedLiteral() {
        Statement tripleAsStatement = RioUtils
                .tripleAsStatement(testOwlApiTripleTypedLiteral);
        assertEquals(testSesameTripleTypedLiteral, tripleAsStatement);
    }
View Full Code Here

        if (wasNew) {
          // The triple was not yet present in the triple store
          sailChangedEvent.setStatementsAdded(true);

          if (hasConnectionListeners()) {
            Statement st;

            if (context != null) {
              st = valueStore.createStatement(subj, pred, obj, context);
            }
            else {
View Full Code Here

    int nofInferred = 0;

    Iterator<Statement> ntIter = this.newThisIteration.match(null, null, null);

    while (ntIter.hasNext()) {
      Statement nt = ntIter.next();

      Resource xxx = nt.getSubject();
      URI aaa = nt.getPredicate();

      CloseableIteration<? extends Statement, SailException> t1Iter;
      t1Iter = getWrappedConnection().getStatements(aaa, RDFS.DOMAIN, null, true);

      while (t1Iter.hasNext()) {
        Statement t1 = t1Iter.next();

        Value zzz = t1.getObject();
        if (zzz instanceof Resource) {
          boolean added = addInferredStatement(xxx, RDF.TYPE, zzz);
          if (added) {
            nofInferred++;
          }
View Full Code Here

    int nofInferred = 0;

    Iterator<Statement> ntIter = this.newThisIteration.match(null, RDFS.DOMAIN, null);

    while (ntIter.hasNext()) {
      Statement nt = ntIter.next();

      Resource aaa = nt.getSubject();
      Value zzz = nt.getObject();

      if (aaa instanceof URI && zzz instanceof Resource) {
        CloseableIteration<? extends Statement, SailException> t1Iter;
        t1Iter = getWrappedConnection().getStatements(null, (URI)aaa, null, true);

        while (t1Iter.hasNext()) {
          Statement t1 = t1Iter.next();

          Resource xxx = t1.getSubject();
          boolean added = addInferredStatement(xxx, RDF.TYPE, zzz);
          if (added) {
            nofInferred++;
          }
        }
View Full Code Here

TOP

Related Classes of org.openrdf.model.Statement

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.