Package org.openrdf.model.impl

Examples of org.openrdf.model.impl.URIImpl


            final SailConnection c = this.rawGraph.getConnection();
            try {
                c.begin();
                RDFHandler h = null == baseGraph
                        ? new SailAdder(c)
                        : new SailAdder(c, new URIImpl(baseGraph));
                if (rdfHandlers != null) {
                    RDFHandler[] handlers = new RDFHandler[rdfHandlers.length + 1];
                    handlers[0] = h;
                    System.arraycopy(rdfHandlers, 0, handlers, 1, rdfHandlers.length);
                    h = new RDFHandlerWrapper(handlers);
View Full Code Here


    }

    @Test
    public void testIsolatedVerticesAutomaticallyDeleted() throws Exception {
        String ex = "http://example.org/ns#";
        URI ref = new URIImpl(ex + "Ref");

        clear();
        int edgesBefore, verticesBefore;

        SailConnection sc = sail.getConnection();
View Full Code Here

    }

    @Test
    public void testBlankNodesUnique() throws Exception {
        String ex = "http://example.org/ns#";
        URI class1 = new URIImpl(ex + "Class1");

        clear();
        int edgesBefore, verticesBefore;

        SailConnection sc = sail.getConnection();
View Full Code Here

    @Test
    public void testAddVertex() throws Exception {
        GraphSail gSail = (GraphSail) sail;

        Value toAdd = new URIImpl("http://example.org/thelarch");
        assertNull(gSail.getVertex(toAdd));
        int count = countVertices();

        Vertex added = gSail.addVertex(toAdd);
        assertNotNull(added);
View Full Code Here

                    value = value.substring( value.lastIndexOf( ':' ) + 1, value.length() );
                    String name = field.getName();
                    input.addField( name, value );
                } else if( statement.getObject() instanceof BNode )
                {
                    Iterator<Statement> seq = graph.match( (Resource) statement.getObject(), new URIImpl( "http://www.w3.org/1999/02/22-rdf-syntax-ns#li" ), null, (Resource) null );
                    while( seq.hasNext() )
                    {
                        Statement seqStatement = seq.next();
                        String value = seqStatement.getObject().stringValue();
                        value = value.substring( value.lastIndexOf( ':' ) + 1, value.length() );
View Full Code Here

      for (ASTDatasetClause dc : datasetClauses) {
        ASTIRI astIri = dc.jjtGetChild(ASTIRI.class);

        try {
          URI uri = new URIImpl(astIri.getValue());
          if (dc.isNamed()) {
            dataset.addNamedGraph(uri);
          }
          else {
            dataset.addDefaultGraph(uri);
View Full Code Here

    List<NameValuePair> params = new ArrayList<NameValuePair>(5);
    for (String encodedContext : Protocol.encodeContexts(contexts)) {
      params.add(new NameValuePair(Protocol.CONTEXT_PARAM_NAME, encodedContext));
    }
    if (baseURI != null && baseURI.trim().length() != 0) {
      String encodedBaseURI = Protocol.encodeValue(new URIImpl(baseURI));
      params.add(new NameValuePair(Protocol.BASEURI_PARAM_NAME, encodedBaseURI));
    }
    method.setQueryString(params.toArray(new NameValuePair[params.size()]));

    // Set payload
View Full Code Here

  }

  public void testValueRoundTrip1()
    throws Exception
  {
    URI subj = new URIImpl(EXAMPLE_NS + PICASSO);
    URI pred = new URIImpl(EXAMPLE_NS + PAINTS);
    URI obj = new URIImpl(EXAMPLE_NS + GUERNICA);

    testValueRoundTrip(subj, pred, obj);
  }
View Full Code Here

  public void testValueRoundTrip2()
    throws Exception
  {
    BNode subj = new BNodeImpl("foo");
    URI pred = new URIImpl(EXAMPLE_NS + PAINTS);
    URI obj = new URIImpl(EXAMPLE_NS + GUERNICA);

    testValueRoundTrip(subj, pred, obj);
  }
View Full Code Here

  }

  public void testValueRoundTrip3()
    throws Exception
  {
    URI subj = new URIImpl(EXAMPLE_NS + PICASSO);
    URI pred = new URIImpl(EXAMPLE_NS + PAINTS);
    Literal obj = new LiteralImpl("guernica");

    testValueRoundTrip(subj, pred, obj);
  }
View Full Code Here

TOP

Related Classes of org.openrdf.model.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.