Examples of listInstances()


Examples of com.hp.hpl.jena.ontology.OntClass.listInstances()

    // add a new instance relation to a new individual
    Individual b = model.createIndividual( ns + "b", cls );

    // verify inference
    assertTrue( model.contains( b, RDF.type, cls ) );
    assertIteratorValues( cls.listInstances( false ), new Resource[] { a, b } );
    // check for direct types to make sure we don't get results from base
    // graph
    assertIteratorValues( cls.listInstances( true ), new Resource[] { a, b } );
  }
View Full Code Here

Examples of com.hp.hpl.jena.ontology.OntClass.listInstances()

    // verify inference
    assertTrue( model.contains( b, RDF.type, cls ) );
    assertIteratorValues( cls.listInstances( false ), new Resource[] { a, b } );
    // check for direct types to make sure we don't get results from base
    // graph
    assertIteratorValues( cls.listInstances( true ), new Resource[] { a, b } );
  }

  @Test
  public void testSimplePropertyAssertion() { 
    String ns = "urn:test:";
View Full Code Here

Examples of com.hp.hpl.jena.ontology.UnionClass.listInstances()

    UnionClass class4 = ontmodel.createUnionClass( null, list );

    assertIteratorValues( class3.listInstances(), new Resource[] { inds[2], inds[3] } );

    assertIteratorValues( class4.listInstances(), new Resource[] {
        inds[0], inds[1], inds[2], inds[3], inds[4], inds[5] } );

  }

  @Test
View Full Code Here

Examples of com.hp.hpl.jena.ontology.UnionClass.listInstances()

    ontmodel.prepare();

    assertIteratorValues( class3.listInstances(), new Resource[] {
        inds[2], inds[3], inds[4], inds[5] } );

    assertIteratorValues( class4.listInstances(), new Resource[] {
        inds[0], inds[1], inds[2], inds[3], inds[4], inds[5] } );

    assertEquals( 0, graph.getKB().timers.getTimer( "isIncConsistent" ).getCount() );

    Individual newind = ontmodel.createIndividual( nc + "Ind7", class4 );
View Full Code Here

Examples of com.hp.hpl.jena.ontology.UnionClass.listInstances()

    Individual newind = ontmodel.createIndividual( nc + "Ind7", class4 );

    ontmodel.prepare();

    assertIteratorValues( class4.listInstances(), new Resource[] {
        inds[0], inds[1], inds[2], inds[3], inds[4], inds[5], newind } );

  }

  @Test
View Full Code Here

Examples of com.hp.hpl.jena.ontology.UnionClass.listInstances()

    UnionClass class4 = ontmodel.createUnionClass( null, list );

    assertIteratorValues( class3.listInstances(), new Resource[] { inds[2], inds[3] } );

    assertIteratorValues( class4.listInstances(), new Resource[] {
        inds[0], inds[1], inds[2], inds[3], inds[4], inds[5] } );

  }

  @Test
View Full Code Here

Examples of org.apache.deltacloud.client.DeltaCloudClient.listInstances()

   */

  @Test
  public void listContainsTestInstance() throws DeltaCloudClientException {
    DeltaCloudClient client = testSetup.getClient();
    List<Instance> instances = client.listInstances();
    assertTrue(instances.size() > 0);
    Instance testInstance = testSetup.getTestInstance();
    assertNotNull(testSetup.getInstanceById(testInstance.getId(), client));
  }

View Full Code Here

Examples of org.apache.deltacloud.client.DeltaCloudClient.listInstances()

    Image image = testSetup.getFirstImage(testSetup.getClient());
    DeltaCloudClient client = testSetup.getClient();
    Instance instance = client.createInstance(image.getId());
    instance.stop(client);
    instance.destroy(client);
    client.listInstances(instance.getId());
  }

  @Test(expected = DeltaCloudClientException.class)
  public void destroyThrowsExceptionOnUnknowInstanceId() throws DeltaCloudClientException, IllegalArgumentException,
      InstantiationException, IllegalAccessException, InvocationTargetException, SecurityException,
View Full Code Here

Examples of org.apache.deltacloud.client.DeltaCloudClient.listInstances()

  @Test
  public void canShutdownInstance() throws DeltaCloudClientException {
    Instance testInstance = testSetup.getTestInstance();
    DeltaCloudClient client = testSetup.getClient();
    testInstance.stop(client);
    testInstance = client.listInstances(testInstance.getId()); // reload!
    assertEquals(State.STOPPED, testInstance.getState());
  }

  @Test
  public void canStartInstance() throws DeltaCloudClientException {
View Full Code Here

Examples of org.apache.deltacloud.client.DeltaCloudClient.listInstances()

    DeltaCloudClient client = testSetup.getClient();
    if (testInstance.getState() == State.RUNNING) {
      testInstance.stop(client);
    }
    testInstance.start(client);
    testInstance = client.listInstances(testInstance.getId()); // reload!
    assertEquals(State.RUNNING, testInstance.getState());
  }

  @Test
  public void canStartInstanceByAction() throws DeltaCloudClientException {
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.