Package org.ontoware.rdf2go.model.node.impl

Examples of org.ontoware.rdf2go.model.node.impl.URIImpl


   *
   * [Generated from RDFReactor template rule #c7]
   */
  public OWL_Protege_NRL_Restriction(Model model, String uriString,
      boolean write) throws ModelRuntimeException {
    super(model, RDFS_CLASS, new URIImpl(uriString, false), write);
  }
View Full Code Here


 
  private static Logger log = LoggerFactory.getLogger(TypeUtils.class);

  public static Resource toResource(URL url) throws ModelRuntimeException {
    try {
      return new URIImpl(url.toURI().toString());
    } catch (URISyntaxException e) {
      throw new ModelRuntimeException(e);
    }
  }
View Full Code Here

   * @param model RDF2GO Model implementation, see http://rdf2go.ontoware.org
   * @param uriString a URI given as a String
   * @param write if true, the statement (this, rdf:type, TYPE) is written to the model
   */
  public DeprecatedProperty ( Model model, String uriString, boolean write) {
    super(model, RDFS_CLASS, new URIImpl(uriString,false), write);
  }
View Full Code Here

   * @throws ModelRuntimeException if URI syntax is wrong
   *
   * [Generated from RDFReactor template rule #c7]
   */
  public C ( Model model, String uriString, boolean write) throws ModelRuntimeException {
    super(model, RDFS_CLASS, new URIImpl(uriString,false), write);
  }
View Full Code Here

   * @throws ModelRuntimeException if URI syntax is wrong
   *
   * [Generated from RDFReactor template rule #c7]
   */
  public A ( Model model, String uriString, boolean write) throws ModelRuntimeException {
    super(model, RDFS_CLASS, new URIImpl(uriString,false), write);
  }
View Full Code Here

   * @throws ModelRuntimeException if URI syntax is wrong
   *
   * [Generated from RDFReactor template rule #c7]
   */
  public Thing ( Model model, String uriString, boolean write) throws ModelRuntimeException {
    super(model, RDFS_CLASS, new URIImpl(uriString,false), write);
  }
View Full Code Here

   * @throws ModelRuntimeException if URI syntax is wrong
   *
   * [Generated from RDFReactor template rule #c7]
   */
  public B ( Model model, String uriString, boolean write) throws ModelRuntimeException {
    super(model, RDFS_CLASS, new URIImpl(uriString,false), write);
  }
View Full Code Here

  private static Logger log = LoggerFactory.getLogger(TransformerTest.class);

  @Test
  public void testToSparqlConstruct() {
    Map<String, URI> nsMap = new HashMap<String, URI>();
    nsMap.put("skos", new URIImpl("http://www.w3.org/2004/02/skos/core#"));
    nsMap.put("", new URIImpl("http://purl.org/net/schemarama#"));
    String construct = "[] a :Error;  :message 'Resource [1] has more than one preferred lexical label [2][3] in a given language.';  :implicated ( ?x ?l ?m );  .";
    String where = "?x skos:prefLabel ?l; skos:prefLabel ?m.  FILTER ( str(?l) != str(?m) && lang(?l) = lang(?m) )";
    String query = Transformer.toSparqlConstruct(nsMap, construct, where);
    log.debug("query = " + query);
  }
View Full Code Here

  @Test
  public void testApplyRule() {
    Model m = RDF2Go.getModelFactory().createModel();
    m.open();
    Map<String, URI> nsMap = new HashMap<String, URI>();
    nsMap.put("rdf", new URIImpl(
        "http://www.w3.org/1999/02/22-rdf-syntax-ns#"));
    String LOCAL = "http://example.com#";
    nsMap.put("", new URIImpl(LOCAL));
    URI a = new URIImpl(LOCAL + "a");
    URI b = new URIImpl(LOCAL + "b");
    URI c = new URIImpl(LOCAL + "c");

    m.addStatement(a, b, c);
    m.addStatement(a, RDF.type, c);
    log.debug("Before");
    m.dump();

    String constructRemove = "?x a " + c.toSPARQL();
    String constructAdd = "?x a " + b.toSPARQL();
    String where = constructRemove;

    SearchRemoveAddRule.searchAndReplace(m, nsMap, where, constructRemove,
        constructAdd);
View Full Code Here

  @Test
  public void testUriRename() {
    Model m = RDF2Go.getModelFactory().createModel();
    m.open();

    URI a = new URIImpl("urn:test:a");
    URI b = new URIImpl("urn:test:b");
    URI c = new URIImpl("urn:test:c");

    URI superRel = new URIImpl(
        "http://www.semanticdesktop.org/ontologies/2007/09/cds/hasSuperRelation");
    m.addStatement(superRel, b, c);
    m.addStatement(a, superRel, c);
    m.addStatement(a, b, superRel);
    Map<String, URI> nsMap = new HashMap<String, URI>();
View Full Code Here

TOP

Related Classes of org.ontoware.rdf2go.model.node.impl.URIImpl

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.