Examples of load()


Examples of org.jostraca.util.PropertySetManager.load()

  }


  public void testLoad() throws Exception {
    PropertySetManager psm01 = new PropertySetManager();
    PropertySet ps01 = psm01.load( "test01", Tools.findRelativeSystemPath("src/org/jostraca/util/test/test.conf") );
    assertEquals( "0", ps01.get("a") );
    assertEquals( "1", ps01.get("b") );

    try {
      psm01.load( "test02", new File("notest.conf") );
View Full Code Here

Examples of org.jpublish.StaticResourceManager.load()

                    // execute parameter actions
                    if (executeParameterActions(request, response, context, path, allowRedirect))
                        return;

                    // load and return the static resource
                    staticResourceManager.load(path, outputStream);
                    outputStream.flush();
                    return;
                } else {
                    throw new GeneralException("Cannot load static resource with a null OutputStream");
                }
View Full Code Here

Examples of org.jresearch.gossip.configuration.Configurator.load()

                .getBundle("org/jresearch/gossip/resources/emoticon"));
        //Load configuration parameters
        Configurator conf = Configurator.getInstance();
        conf.setDataSource(ds);
        try {
            conf.load(app);
        } catch (SQLException e) {
            if (log.isErrorEnabled()) {
                log.error("jGossip Configurator is not loaded");
            }
            throw new ServletException(e);
View Full Code Here

Examples of org.jruby.ast.executable.Script.load()

           
            // if it's a compiled JRuby script, instantiate and run it
            if (Script.class.isAssignableFrom(clazz)) {
                Script script = (Script)clazz.newInstance();
                script.setFilename(resource.getName());
                script.load(runtime.getCurrentContext(), runtime.getTopSelf(), IRubyObject.NULL_ARRAY, Block.NULL_BLOCK);
            }
        } catch (IOException e) {
            throw runtime.newIOErrorFromException(e);
        } catch (InstantiationException ie) {
            if (runtime.getDebug().isTrue()) {
View Full Code Here

Examples of org.jruby.runtime.load.Library.load()

                classLoader = runtime.getInstanceConfig().getLoader();
            }
           
            Library library = (Library) classLoader.loadClass(className).newInstance();
           
            library.load(runtime, wrap);
        } catch (RaiseException re) {
            throw re;
        } catch (Throwable e) {
            e.printStackTrace();
            throw runtime.newLoadError("library `" + libraryName + "' could not be loaded: " + e);
View Full Code Here

Examples of org.kiji.schema.tools.synth.DictionaryLoader.load()

   * @throws IOException If there is an error.
   */
  private List<String> loadNameDictionary(String filename)
      throws IOException {
    DictionaryLoader loader = new DictionaryLoader();
    return loader.load(getClass().getClassLoader().getResourceAsStream(filename));
  }

  /** {@inheritDoc} */
  @Override
  protected void validateFlags() throws Exception {
View Full Code Here

Examples of org.kitesdk.data.DatasetRepository.load()

      sink.process();
      sink.stop();

      Assert.assertEquals(
          Sets.newHashSet(expected),
          read(hdfsRepo.<GenericData.Record>load(DATASET_NAME)));
      Assert.assertEquals("Should have committed", 0, remaining(in));

    } finally {
      if (hdfsRepo != null && hdfsRepo.exists(DATASET_NAME)) {
        hdfsRepo.delete(DATASET_NAME);
View Full Code Here

Examples of org.kitesdk.data.hbase.HBaseDatasetRepository.load()

    repo.create("default", tableName + ".SubEntity2", new DatasetDescriptor.Builder()
        .schema(SubEntity2.SCHEMA$)
        .build());

    // create composite dataset
    RandomAccessDataset<Map<String, SpecificRecord>> ds = repo.load(
        "default", tableName + ".SubEntity1.SubEntity2");

    // Construct entities
    SubEntity1 subEntity1 = SubEntity1.newBuilder().setPart1("1").setPart2("1")
        .setField1("field1_1").setField2("field1_2").build();
View Full Code Here

Examples of org.kitesdk.data.spi.DatasetRepository.load()

  .<Object, RandomAccessDataset<Object>>load(URI.create("dataset:hbase:" + zk + "/test"), Object.class);

    Assert.assertNotNull("Should load dataset", ds);
    Assert.assertTrue(ds instanceof DaoDataset);
    Assert.assertEquals("Descriptors should match",
        repo.load("default", "test").getDescriptor(), ds.getDescriptor());

    repo.delete("default", "test");
  }

  @Test
View Full Code Here

Examples of org.leskes.elasticfacets.fields.HashedStringFieldType.load()

        .add(DocumentBuilder.field("svalue", "aaa")).build());

    IndexReader reader = IndexReader.open(indexWriter, true);

      HashedStringFieldType type = new HashedStringFieldType(new HashedStringFieldData.HashedStringTypeLoader(0,0, null, null));
    SingleValueHashedStringFieldData sFieldData = (SingleValueHashedStringFieldData) type.load(reader, "svalue");

    assert (sFieldData.fieldName().equals("svalue"));
    assert (!sFieldData.multiValued());
    assertThat(sFieldData.collisions(),equalTo(0));
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.