Package org.wikier.trioo.jtrioo.rdf

Examples of org.wikier.trioo.jtrioo.rdf.URIRef


  }
 
  public void visit(CURIE rdftype) {
    RDFTerm subject;
    if (this.uri != null) {
      subject = new URIRef(this.uri);
    } else {
      subject = this.x;
    }
    this.query.addTriplePattern(new TriplePattern(subject, new AbbrevRdfType(), rdftype));
  }
View Full Code Here


 
  public void visit(Arc arc) {
    //FIXME: single/multi literal/object
    RDFTerm subject;
    if (this.uri != null) {
      subject = new URIRef(this.uri);
    } else {
      subject = this.x;
    }
    TriplePattern pattern = new TriplePattern(subject, arc.getProperty(), new Variable(arc.getTarget()));
    pattern.setOptional(arc.isOptional());
View Full Code Here

  }
 
  public void visit(CURIE rdftype) {
    RDFTerm subject;
    if (this.uri != null) {
      subject = new URIRef(this.uri);
    } else {
      subject = this.s;
    }
    this.query.addTriplePattern(new TriplePattern(subject, new AbbrevRdfType(), rdftype));
  }
View Full Code Here

  }

  private void generateTriple(Arc arc, Object obj) {
    RDFTerm subject;
    if (this.uri != null) {
      subject = new URIRef(this.uri);
    } else {
      subject = this.s;
    }
    String uri = this.rm.getURI(obj);
    if (uri != null) {
      this.query.addTriplePattern(new TriplePattern(subject, arc.getProperty(), new URIRef(uri)));
      //FIXME: cascade
    } else {
      if (obj.toString().startsWith("http://") || obj.toString().startsWith("mailto:")) {
        this.query.addTriplePattern(new TriplePattern(subject, arc.getProperty(), new URIRef(obj.toString())));
      } else {
        this.query.addTriplePattern(new TriplePattern(subject, arc.getProperty(), new Literal(obj, arc.getLang(), arc.getDatatype())));
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.wikier.trioo.jtrioo.rdf.URIRef

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.