Examples of BlankNode


Examples of org.ontoware.rdf2go.model.node.BlankNode

    assertFalse(this.modelset.containsStatements(a, Variable.ANY, RDF.predicate, predicate));
    assertFalse(this.modelset.containsStatements(a, Variable.ANY, RDF.object, object));
    assertFalse(this.modelset.containsStatements(a, Variable.ANY, RDF.type, RDF.Statement));
   
    Statement stmt = this.modelset.createStatement(a, subject, predicate, object);
    BlankNode blankNode = this.modelset.addReificationOf(stmt);
    assertTrue(this.modelset.containsStatements(a, blankNode, RDF.subject, subject));
    assertTrue(this.modelset.containsStatements(a, blankNode, RDF.predicate, predicate));
    assertTrue(this.modelset.containsStatements(a, blankNode, RDF.object, object));
    assertTrue(this.modelset.containsStatements(a, blankNode, RDF.type, RDF.Statement));
   
View Full Code Here

Examples of org.ontoware.rdf2go.model.node.BlankNode

  }
 
  @Test
  public void testGetAllReificationsOf() {
    Statement s = this.modelset.createStatement(a, b, c);
    BlankNode reificationBlankNode = this.modelset.addReificationOf(s);
   
    Collection<Resource> reifications = this.modelset.getAllReificationsOf(s);
    assertTrue(reifications.contains(reificationBlankNode));
    assertEquals(1, reifications.size());
  }
View Full Code Here

Examples of org.ontoware.rdf2go.model.node.BlankNode

   
  }
 
  private static BlankNode transform(BlankNode source, Map<String,BlankNode> map, Model target) {
    String bnodeSourceId = source.getInternalID();
    BlankNode bnodeTarget = map.get(bnodeSourceId);
    if(bnodeTarget == null) {
      bnodeTarget = target.createBlankNode();
      map.put(bnodeSourceId, bnodeTarget);
    }
    return bnodeTarget;
View Full Code Here

Examples of org.ontoware.rdf2go.model.node.BlankNode

        }
      }

      try {
        if (eval == null) {
          BlankNode bnodeEval = model.createBlankNode();
          model.addStatement(null,bnodeEval, RDF.type, model.createURI(S3B_SSCF.Evaluation));
          model.addStatement(null,bnodeEval, model.createURI(SIOC.postedBy),person.getResource());
          model.addStatement(null,bnodeEval, model.createURI(S3B_SSCF.value),model.createDatatypeLiteral(value.toString(),XSD._string));
          model.addStatement(null,this.resource,model.createURI(S3B_SSCF.isEvaluatedWith),bnodeEval);
        } else {
View Full Code Here

Examples of org.wikier.trioo.jtrioo.models.BlankNode

  private static final String SERIALIZATION = "RDF/XML-ABBREV";
  private BlankNode bnode;
 
  @Before
  public void before() {
    this.bnode = new BlankNode();
    this.bnode.setName("Alice");
  }
View Full Code Here

Examples of puc.tecweb.trust.layer.rdf.types.BlankNode

  public AbstractNode getObject() {
    Object object = statement.getObject();

    if (object instanceof org.ontoware.rdf2go.model.node.BlankNode)
      return new BlankNode(object.toString());
    else if (object instanceof org.ontoware.rdf2go.model.node.URI||
        object instanceof URIImpl)
      return new URINode(object.toString());
    else if (object instanceof DatatypeLiteral)
    {
View Full Code Here

Examples of puc.tecweb.trust.layer.rdf.types.BlankNode

  public AbstractNode getSubject() {
    Object subject = statement.getSubject();

    if (subject instanceof org.ontoware.rdf2go.model.node.BlankNode)
      return new BlankNode(subject.toString());
    else if (subject instanceof org.ontoware.rdf2go.model.node.URI ||
        subject instanceof URIImpl)
      return new URINode(subject.toString());
    else
    {
View Full Code Here

Examples of puc.tecweb.trust.layer.rdf.types.BlankNode

      return null;
    }
  }

  public ResourceNode getContext() {
    return new BlankNode(context.toString());
  }
View Full Code Here

Examples of puc.tecweb.trust.layer.rdf.types.BlankNode

  public AbstractNode getObject() {
    Node object = statement.getObject().asNode();

    if (object.isBlank())
      return new BlankNode(object.getBlankNodeId().toString());
    else if (object.isURI())
      return new URINode(object.getURI());
    else if (object.isLiteral()) {
      return new LiteralNode(object.getLiteralValue());
    } else
View Full Code Here

Examples of puc.tecweb.trust.layer.rdf.types.BlankNode

  public AbstractNode getSubject() {
    Node subject = statement.getSubject().asNode();

    if (subject.isBlank())
      return new BlankNode(subject.getBlankNodeId().toString());
    else if (subject.isURI())
      return new URINode(subject.getURI());
    else
      return null;
  }
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.