Examples of Instance


Examples of org.fnlp.ml.types.Instance

    this.index = 0;
  }

  public Instance next ()
  {
    return new Instance (data[index++], null);
  }
View Full Code Here

Examples of org.glassfish.jersey.process.internal.RequestScope.Instance

public class RequestScopeTest {
    @Test
    public void testScopeWithCreatedInstance() {
        final RequestScope requestScope = new RequestScope();
        assertNull(requestScope.suspendCurrent());
        final Instance instance = requestScope.createInstance();
        final TestProvider inhab = new TestProvider("a");
        instance.put(inhab, "1");
        requestScope.runInScope(instance, new Runnable() {

            @Override
            public void run() {
                assertEquals("1", instance.get(inhab));
                instance.release();
                assertEquals("1", instance.get(inhab));
            }
        });
        assertNull(instance.get(inhab));
    }
View Full Code Here

Examples of org.integratedmodelling.riskwiz.learning.data.Instance

            initTokenizer();

            readHeader(1000);
            initBuffers();
     
            Instance inst;

            while ((inst = readInstance(m_Data)) != null) {
                m_Data.add(inst);
            }
            ;
View Full Code Here

Examples of org.jboss.arquillian.core.api.Instance

    private SearchContextTestEnricher pageFragmentEnricher;

    @Before
    public void prepareServiceLoader() throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
        grapheneEnricher = new GrapheneEnricher();
        Instance<GrapheneConfiguration> configuration = new Instance() {
            @Override
            public Object get() {
                return new GrapheneConfiguration();
            }
View Full Code Here

Examples of org.jclouds.googlecomputeengine.domain.Instance

   }

   @Test(groups = "live", dependsOnMethods = "testInsertInstance")
   public void testGetInstance() {

      Instance instance = api().get(INSTANCE_NAME);
      assertNotNull(instance);
      assertInstanceEquals(instance, this.instance);
   }
View Full Code Here

Examples of org.jclouds.ibm.smartcloud.domain.Instance

      } catch (IllegalStateException e) {
         // must have been found
         connection.updatePublicKey(GROUP, keyPair.get("public"));
         key = connection.getKey(GROUP);
         for (String instanceId : key.getInstanceIds()) {
            Instance instance = connection.getInstance(instanceId);
            if (instance.getStatus() == Instance.Status.FAILED || instance.getStatus() == Instance.Status.ACTIVE) {
               killInstance(instance.getId());
            }
         }
      }
      assertEquals(key.getName(), GROUP);
      assert keyPair.get("public").indexOf(key.getKeyMaterial()) > 0;
View Full Code Here

Examples of org.jclouds.openstack.trove.v1.domain.Instance

      super.setup();
      TroveUtils utils= new TroveUtils(api);
      for (String zone : api.getConfiguredZones()) {
         // create instances
         List<Instance> instanceList = Lists.newArrayList();
         Instance first = utils.getWorkingInstance(zone, "first_user_trove_live_testing_" + zone, "1", 1);
         Instance second = utils.getWorkingInstance(zone, "second_user_trove_live_testing_" + zone, "1", 1);
         instanceList.add(first);
         instanceList.add(second);
         instancesToDelete.put(zone, instanceList);
         // create users
         User user1 = User.builder()
               .name("user1")
               .password(UUID.randomUUID().toString())
               .databases(ImmutableSet.of(
                     "u1db1",
                     "u1db2")).build();
         User user2 = User.builder()
               .name("user2")
               .password(UUID.randomUUID().toString())
               .databases(ImmutableSet.of(
                     "u2db1",
                     "u2db2")).build();
         User user3 = User.builder()
               .name("user3")
               .password(UUID.randomUUID().toString())
               .host("173.203.44.122")
               .databases(ImmutableSet.of(
                     "u3db1",
                     "u3db2")).build();
         UserApi userApiFirst = api.getUserApiForInstanceInZone(first.getId(), zone);
         UserApi userApiSecond = api.getUserApiForInstanceInZone(second.getId(), zone);
         userApiFirst.create(ImmutableSet.of(user1, user2));
         userApiSecond.create(ImmutableSet.of(user3));
      }
   }
View Full Code Here

Examples of org.jclouds.rds.domain.Instance

   protected final DateService dateService = new SimpleDateFormatDateService();

   public void test() {
      InputStream is = getClass().getResourceAsStream("/get_instance.xml");

      Instance expected = expected();

      InstanceHandler handler = injector.getInstance(InstanceHandler.class);
      Instance result = factory.create(handler).parse(is);

      assertEquals(result.toString(), expected.toString());
  }
View Full Code Here

Examples of org.jvnet.glassfish.comms.clb.admin.Instance

            // should we throw this exception XXX ???
            // or fill in with default values
        }

        if ((iRdrs != null) && (iRdrs.length > 0)) {
            Instance ins = null;

            for (int i = 0; i < iRdrs.length; i++) {
                ins = new Instance();
                iRdrs[i].accept(new InstanceVisitor(ins));
                _c.addInstance(ins);
            }
        }
View Full Code Here

Examples of org.metaworks.Instance

              public void windowGainedFocus(WindowEvent e) {
               
                try {

                  final Type deployOrNot = new Type("Select forms to deploy");
                  final Instance deployInstance = deployOrNot.createInstance();

                  new ForLoop(){

                    public void logic(Object target) {
                      OpenedForm openedForm = (OpenedForm) target;
                     
                      File file = new File(openedForm.localFilePath);
                      if(openedForm.lastModified != file.lastModified()){
                        deployOrNot.addFieldDescriptor(new FieldDescriptor(openedForm.formName, Boolean.class, null, null));
                        deployInstance.setFieldValue(openedForm.formName, true);
                        openedForm.lastModified = file.lastModified();
                      }
                    }
                   
                  }.run(openedForms);
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.