Package org.openrdf.model.impl

Examples of org.openrdf.model.impl.ValueFactoryImpl


      throw new StoreConfigException("No type specified for repository implementation");
    }
  }

  public Resource export(Model model) {
    ValueFactoryImpl vf = ValueFactoryImpl.getInstance();

    BNode implNode = vf.createBNode();

    if (type != null) {
      model.add(implNode, REPOSITORYTYPE, vf.createLiteral(type));
    }

    return implNode;
  }
View Full Code Here


  private List<TransactionOperation> txn;

  private List<Value> parsedValues = new ArrayList<Value>();

  public TransactionSAXParser() {
    this(new ValueFactoryImpl());
  }
View Full Code Here

  /**
   * Creates a new parser base that, by default, will use an instance of
   * {@link ValueFactoryImpl} to create Value objects.
   */
  public TupleQueryResultParserBase() {
    this(new ValueFactoryImpl());
  }
View Full Code Here

public class DurationTest extends TestCase {

  public void testYearMonth()
    throws Exception
  {
    ValueFactory vf = new ValueFactoryImpl();
    Literal lit = vf.createLiteral("P1Y", DURATION_YEARMONTH);
    Duration duration = lit.durationValue();
    assertEquals(lit, vf.createLiteral(duration));
  }
View Full Code Here

  }

  public void testDayTime()
    throws Exception
  {
    ValueFactory vf = new ValueFactoryImpl();
    Literal lit = vf.createLiteral("P1D", DURATION_DAYTIME);
    Duration duration = lit.durationValue();
    assertEquals(lit, vf.createLiteral(duration));
  }
View Full Code Here

  }

  public void testFullDuration()
    throws Exception
  {
    ValueFactory vf = new ValueFactoryImpl();
    Literal lit = vf.createLiteral("P1Y1M1D", DURATION);
    Duration duration = lit.durationValue();
    assertEquals(lit, vf.createLiteral(duration));
  }
View Full Code Here

      throw new StoreConfigException("No type specified for sail implementation");
    }
  }

  public Resource export(Model model) {
    ValueFactoryImpl vf = ValueFactoryImpl.getInstance();

    BNode implNode = vf.createBNode();

    if (type != null) {
      model.add(implNode, SAILTYPE, vf.createLiteral(type));
    }

    return implNode;
  }
View Full Code Here

  }

  @Override
  public Resource export(Model model) {
    Resource implNode = super.export(model);
    ValueFactoryImpl vf = ValueFactoryImpl.getInstance();

    if (url != null) {
      model.add(implNode, REPOSITORYURL, vf.createURI(url));
    }
    if (readOnly) {
      model.add(implNode, READ_ONLY, vf.createLiteral(readOnly));
    }
    for (String space : subjectSpace) {
      model.add(implNode, SUBJECTSPACE, vf.createURI(space));
    }
    // if (username != null) {
    // graph.add(implNode, USERNAME,
    // graph.getValueFactory().createLiteral(username));
    // }
View Full Code Here

  /*--------------*
   * Constructors *
   *--------------*/

  public HTTPRepository(String serverURL, String repositoryID) {
    ValueFactory vf = new ValueFactoryImpl(new BNodeFactoryImpl(), uf, lf);
    pool = new HTTPConnectionPool(serverURL, vf);
    client = new SesameClient(pool).repositories().slash(repositoryID);
    cache = new RepositoryCache(client);
  }
View Full Code Here

    client = new SesameClient(pool).repositories().slash(repositoryID);
    cache = new RepositoryCache(client);
  }

  public HTTPRepository(String repositoryURL) {
    ValueFactory vf = new ValueFactoryImpl(new BNodeFactoryImpl(), uf, lf);
    String serverURL = Protocol.getServerLocation(repositoryURL);
    if (serverURL != null) {
      pool = new HTTPConnectionPool(serverURL, vf).location(repositoryURL);
    }
    else {
View Full Code Here

TOP

Related Classes of org.openrdf.model.impl.ValueFactoryImpl

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.