Examples of Store


Examples of com.google.code.timetrail.backend.Store

   *
   * @param gameControl
   *            the game data
   */
  public StoreFrameBackend(Control gameControl) {
    this.store = new Store(gameControl);
    this.gameControl = gameControl;
    this.playerInv = this.gameControl.getInv();
    engineValid = true;
    fCapacitorValid = true;
    fuelCellsValid = true;
View Full Code Here

Examples of com.google.k2crypto.storage.Store

    // Quickly load it back
    Key loaded = storage.load(NATIVE_STORE.toURI());
    assert(original.buildData().build().equals(loaded.buildData().build()));
   
    // Use Store API for more elaborate operations
    Store store = null;
    try {
      // Open a SQLite database store
      store = storage.open(
          "sqlite:" + SQLITE_DATABASE.toURI().getRawPath() + "#samekey");
     
      // Save previously loaded key
      store.save(loaded);
     
      // Check store is not empty and load key back
      if (!store.isEmpty()) {
        Key sameKey = store.load();
        assert(loaded.buildData().build().equals(sameKey.buildData().build()));
      }
     
    } finally {
      // Close store
      if (store != null) {
        store.close();
      }
    }
  }
View Full Code Here

Examples of com.google.test.metric.method.op.stack.Store

     * }
     */
    Label lTry = new Label();
    Load l1 = load(1);
    Load l2 = load(2);
    Store store = new Store(-1, new Variable("a", JavaType.INT, false, false));
    Return ret = new Return(1, JavaType.INT);
    Label lTryEnd = new Label();
    Label lHandle = new Label();

    BlockDecomposer decomposer = new BlockDecomposer();
View Full Code Here

Examples of com.gwtext.client.data.Store


  protected void initComponent() {
    super.initComponent();
    if (!GWT.isScript()) {
      Store store = getStore();
      if (store == null && !(this instanceof PropertyGridPanel)) {
        error("A Store must be assigned to the GridPanel. See setStore(..)");
      }
    }
  }
View Full Code Here

Examples of com.hp.hpl.jena.gvs.Store

   *
   */
  private void initControl() {
    Model authenticationModel = createAuthenticationModel();
   
    Store store = new MemoryStoreImpl();
    Source authenticationSource = new SourceImpl("http://localhost/authentication-master#");
    store.assertGraph(authenticationSource, new FCAGraphImpl(authenticationModel));
   
    Model authorizationModel = createAuthorizationModel();
    Source authorizationSource = new SourceImpl("http://localhost/authorization-master#");
    store.assertGraph(authorizationSource, new FCAGraphImpl(authorizationModel));
   
    Set<Source> sources = new HashSet<Source>();
    sources.add(authenticationSource);
    sources.add(authorizationSource);
    GraphOverTime configGOT = store.getGraphOverTime(sources );
    //JenaUtil.getModelFromGraph(configGOT.getGraph(new Date())).write(System.out);
    Configuration.setConfiguration(new GVSConfiguration(configGOT,
        "gvs"));
    Policy.setPolicy(new DefaultPolicy(configGOT));
  }
View Full Code Here

Examples of com.hp.hpl.jena.gvs.Store

    assertEquals(orig, retrived);
  }

  public void testFromFiles14() throws Exception {
    ToyClock clock = new ToyClock();
    Store store = getStoreImpl(clock);
    Source source = new SourceImpl("http://example.org/graph-source");
    FCAGraph orig = getGraphFromResource("test14.rdf");
    clock.setTime(new Date());
    store.assertGraph(source, orig);
    FCAGraph retrived = store.getGraphOverTime(Collections.singleton(source))
        .getGraph(new Date());
    assertEquals(orig, retrived);
  }
View Full Code Here

Examples of com.hp.hpl.jena.gvs.Store

    }
  }

  protected void performTestsWithGraphs(FCAGraph[] graphs) {
    ToyClock clock = new ToyClock();
    Store store = getStoreImpl(clock);
    Source source = new SourceImpl("http://example.org/graph-source");
    TimedGraphSequence tgs = TimedGraphSequence
        .getSequenceWithRandomDates(graphs);
    for (int i = 0; i < tgs.getSize(); i++) {
      clock.setTime(tgs.getDate(i));
      store.updateGraph(source, tgs.getGraph(i));
    }
    assertTrue(compareAllVersions(store, source, tgs));
    assertTrue(compareVersionAtRandomDate(store, source, tgs));
  }
View Full Code Here

Examples of com.hp.hpl.jena.gvs.Store

  }

  public void testPreviousDates() throws Exception {
    DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS");
    ToyClock clock = new ToyClock();
    Store store = getStoreImpl(clock);
    String baseURLString = "http://localhost/";
    CannedDataReader.readCannedData(store, new File("testdata"),
        baseURLString);
    GraphOverTime got = store.getGraphOverTime(Collections
        .singleton((Source) new SourceImpl(baseURLString + "danbri")));
    // one milli after last modification
    Iterator<Date> previousChanges = got.previousChanges(dateFormat
        .parse("20060920123618662"));
    // should get last modification
View Full Code Here

Examples of com.hp.hpl.jena.gvs.Store

  // 20061006 changed as interface spec changed
  public void testPreviousDates2() throws Exception {
    DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS");
    ToyClock clock = new ToyClock();
    Store store = getStoreImpl(clock);
    String baseURLString = "http://localhost/";
    CannedDataReader.readCannedData(store, new File("testdata"),
        baseURLString);
    GraphOverTime got = store.getGraphOverTime(Collections
        .singleton((Source) new SourceImpl(baseURLString + "danbri")));
    Iterator<Date> previousChanges = got.previousChanges(dateFormat
        .parse("20060920123618661"));
    assertEquals(dateFormat.parse("20060920123618661"), previousChanges
        .next());
View Full Code Here

Examples of com.hp.hpl.jena.gvs.Store

  }

  public void testFollowingDates() throws Exception {
    DateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmssSSS");
    //ToyClock clock = new ToyClock();
    Store store = getStoreImpl(null);
    String baseURLString = "http://localhost/";
    CannedDataReader.readCannedData(store, new File("testdata"),
        baseURLString);
    GraphOverTime got = store.getGraphOverTime(Collections
        .singleton((Source) new SourceImpl(baseURLString + "danbri")));
    // one milli after last modification
    Iterator<Date> followingChanges = got.followingChanges(dateFormat
        .parse("19980920123559999"));
    // should get last modification
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.