Examples of addStatement()


Examples of org.ontoware.rdf2go.impl.jena26.ModelImplJena26.addStatement()

     * example
     */
    // _:blankNodeWerner
    // <http://xmlns.com/foaf/0.1/homepage>
    // <http://www.blue-agents.com> .
    model.addStatement(werner, foafHomepage, model.createURI("http://www.blue-agents.com"));
    // _:blankNodeWerner
    // <http://xmlns.com/foaf/0.1/title>
    // "Mr" .
    model.addStatement(werner, foafTitle, "Mr");
    // _:blankNodeWerner
View Full Code Here

Examples of org.ontoware.rdf2go.model.Diff.addStatement()

  /* reifications live in the context where the statement is */
  @Override
    public Resource addReificationOf(Statement statement, Resource resource) {
    Diff diff = new DiffImpl();
    diff.addStatement(createStatement(statement.getContext(), resource,
        RDF.type, RDF.Statement));
    diff.addStatement(createStatement(statement.getContext(), resource,
        RDF.subject, statement.getSubject()));
    diff.addStatement(createStatement(statement.getContext(), resource,
        RDF.predicate, statement.getPredicate()));
View Full Code Here

Examples of org.ontoware.rdf2go.model.Model.addStatement()

        .getUnderlyingModelImplementation();
    RepositoryConnection connection = repository.getConnection();
    ValueFactory factory = repository.getValueFactory();

    // add a statement
    model.addStatement(subject, predicate, object);

    // convert the statement parts to OpenRDF data types
    Resource openRdfSubject = ConversionUtil.toOpenRDF(subject, factory);
    org.openrdf.model.URI openRdfPredicate = ConversionUtil.toOpenRDF(
        predicate, factory);
View Full Code Here

Examples of org.ontoware.rdf2go.model.ModelSet.addStatement()

    BookmarksHelper bh = new BookmarksHelper(dirUri);
    String uri = bh.createResource(dirUri, dirLabel, dirComment, person,true);
   
    try
    {
      innerModel.addStatement(null,innerModel.createURI(uri), innerModel.createURI(S3B_SSCF.isIn), innerModel.createURI(ownerMbox));
    }
    catch (Exception e)
    {
      //if the inserting is failed, removed just created resource
      XfoafSscfResource xfsr = XfoafSscfResource.getXfoafSscfResource(uri,innerModel);
View Full Code Here

Examples of org.ontoware.rdf2go.model.impl.DiffImpl.addStatement()

            assertFalse(diff.getRemoved().iterator().hasNext());
          }
        });
    this.notifyingModel.open();
    Diff diff = new DiffImpl();
    diff.addStatement(subject, predicate, object);
    this.notifyingModel.update(diff);
    this.notifyingModel.close();
  }

  public void testNotificationOnSubject() {
View Full Code Here

Examples of org.openquark.cal.internal.javamodel.JavaConstructor.addStatement()

                    constructor = new JavaConstructor (Modifier.PRIVATE, argNames, argTypes, constructorName);
                } else {
                    constructor = new JavaConstructor (Modifier.PUBLIC, argNames, argTypes, constructorName);
                }
               
                constructor.addStatement(constructorBody);
               
                return constructor;
            }
           
View Full Code Here

Examples of org.openquark.cal.internal.javamodel.JavaMethod.addStatement()

                        new MethodInvocation.Instance(
                                null,
                                GET_DC_ORDINAL_METHOD_NAME,
                                JavaTypeName.INT,
                                MethodInvocation.InvocationType.VIRTUAL);
                    hashCode.addStatement(new ReturnStatement (call_getOrdinal));
                   
                    javaClassRep.addMethod(hashCode);
                }
            }
           
View Full Code Here

Examples of org.openquark.cal.internal.javamodel.JavaStatement.Block.addStatement()

        }
       
        Block newBlock = new Block(newExceptionHandlers);
       
        for (int i = 0, n = block.getNBlockStatements(); i < n; ++i) {
            newBlock.addStatement(
                    (JavaStatement)block.getNthBlockStatement(i).accept(this, arg));
        }
       
        return newBlock;
    }
View Full Code Here

Examples of org.openrdf.sail.NotifyingSailConnection.addStatement()

                sc.commit();
                sc.begin();

                // Add a listener and add statements
                sc.addConnectionListener(listener1);
                sc.addStatement(uriA, uriB, uriC, uriA);
                sc.addStatement(uriB, uriC, uriA, uriA);
                sc.commit();
                sc.begin();

                // Add another listener and remove a statement
View Full Code Here

Examples of org.openrdf.sail.SailConnection.addStatement()

    URIFactory factory = store.getURIFactory();
    URI foo = factory.createURI("http://www.foo.example/foo");
    URI bar = factory.createURI("http://www.foo.example/bar");

    SailConnection con = store.getConnection();
    con.addStatement(foo, RDF.TYPE, bar);

    TupleQueryModel query = QueryParserUtil.parseTupleQuery(QueryLanguage.SERQL,
        "SELECT X, P, Y FROM {X} P {Y}", null);

    Cursor<? extends BindingSet> iter = con.evaluate(query,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.