Examples of create()


Examples of org.jzkit.search.provider.iface.SearchableFactory.create()

    app_context = new ClassPathXmlApplicationContext( "TestApplicationContext.xml" );
    SearchableFactory sf = (org.jzkit.search.provider.iface.SearchableFactory) app_context.getBean("SearchableFactory");

    IRServiceDescriptor descriptor = new IRServiceDescriptor("proto=SOLR,code=k-int-solr,baseURL=http://dev.k-int.com:8080/solr/select,shortname=SOLR,longname=k-int SOLR Test,defaultRecordSyntax=usmarc,defaultElementSetName=F,recordArchetypes(Default)=solr::F,QueryType=SOLR-STD,fieldList(F)='id,name,popularity',fieldList(B)='id,name',fieldList(Default)='id,name,popularity'");

    Searchable s = sf.create(descriptor);

    if ( s != null ) {
      org.jzkit.search.util.QueryModel.CQLString.CQLString qm = new org.jzkit.search.util.QueryModel.CQLString.CQLString("name=dell");

      // Create a query

Examples of org.keycloak.models.KeycloakSessionFactory.create()

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        HttpServletRequest request = (HttpServletRequest)servletRequest;

        KeycloakSessionFactory sessionFactory = (KeycloakSessionFactory) servletRequest.getServletContext().getAttribute(KeycloakSessionFactory.class.getName());
        KeycloakSession session = sessionFactory.create();
        ResteasyProviderFactory.pushContext(KeycloakSession.class, session);

        KeycloakTransaction tx = session.getTransaction();
        ResteasyProviderFactory.pushContext(KeycloakTransaction.class, tx);
        tx.begin();

Examples of org.kiji.schema.impl.HBaseAdminFactory.create()

    // TODO: Factor this in HBaseKiji
    conf.set(HConstants.ZOOKEEPER_QUORUM, Joiner.on(",").join(uri.getZookeeperQuorumOrdered()));
    conf.setInt(HConstants.ZOOKEEPER_CLIENT_PORT, uri.getZookeeperClientPort());

    final HBaseAdmin hbaseAdmin = adminFactory.create(conf);
    try {
      if (hbaseAdmin.tableExists(
          KijiManagedHBaseTableName.getSystemTableName(uri.getInstance()).toString())) {
        throw new KijiAlreadyExistsException(String.format(
            "Kiji instance '%s' already exists.", uri), uri);

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

      Configuration conf = dfs.getConf();
      String repoURI = "repo:" + conf.get("fs.defaultFS") + "/tmp/repo";

      // create a repository and dataset in HDFS
      hdfsRepo = DatasetRepositories.open(repoURI);
      hdfsRepo.create(DATASET_NAME, DESCRIPTOR);

      // update the config to use the HDFS repository
      config.put(DatasetSinkConstants.CONFIG_KITE_REPO_URI, repoURI);

      DatasetSink sink = sink(in, config);

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

    String testGenericEntity = AvroUtils.inputStreamToString(
        HBaseDatasetRepositoryTest.class.getResourceAsStream("/TestGenericEntity.avsc"));
    DatasetDescriptor descriptor = new DatasetDescriptor.Builder()
        .schemaLiteral(testGenericEntity)
        .build();
    dataset = repo.create("default", "testtable", descriptor);
    for (int i = 0; i < 10; i++) {
      dataset.put(HBaseDatasetRepositoryTest.createGenericEntity(i));
    }
  }

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

  @Test
  public void testBasic() {
    DatasetRepository repo = DatasetRepositories.repositoryFor(repositoryUri);
    repo.delete("default", "test");
    repo.create("default", "test", descriptor);

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

    Assert.assertNotNull("Should load dataset", ds);

Examples of org.kitesdk.data.spi.filesystem.TemporaryFileSystemDatasetRepository.create()

            target.getDataset().getNamespace(),
            UUID.randomUUID().toString());

    try {
      FileSystemDataset<Record> csvDataset =
          (FileSystemDataset) repo.create("default", "csv", csvDescriptor);

      Iterator<Path> iter = csvDataset.pathIterator().iterator();
      Preconditions.checkArgument(iter.hasNext(),
          "CSV path has no data files: " + source);
      Schema csvSchema = CSVUtil.inferSchema(

Examples of org.libvirt.Domain.create()

    }

    public int domainCreate(String domainName) throws LibvirtException {
        Domain domain = getDomain(domainName);
        try {
            domain.create();
            return SUCCESS;
        } finally {
            domain.free();
        }
    }

Examples of org.libvirt.StoragePool.create()

        try {
            Connect conn = LibvirtConnection.getConnection();
            storage = conn.storagePoolLookupByUUIDString(uuid);

            if (storage.getInfo().state != StoragePoolState.VIR_STORAGE_POOL_RUNNING) {
                storage.create(0);
            }
            LibvirtStoragePoolDef spd = getStoragePoolDef(conn, storage);
            StoragePoolType type = null;
            if (spd.getPoolType() == LibvirtStoragePoolDef.poolType.NETFS) {
                type = StoragePoolType.NetworkFilesystem;

Examples of org.lilyproject.repository.api.LTable.create()

            for (String tableName : new String[] {"record", "table1", "table2"}) {
                LTable table = repository.getTable(tableName);
                Record record = table.newRecord();
                record.setRecordType(typeName);
                record.setField(field1, "foobar");
                record = table.create(record);
                assertEquals("foo", record.getField(field2));
                assertEquals("foo", table.read(record.getId()).getField(field2));

                // Test we can get access to our test decorator: this is something that is occasionally useful
                // in test cases to check certain conditions, e.g. if the decorator would have async side effects.
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.