Examples of DomainType


Examples of org.openiaml.model.model.domain.DomainType

  @Override
  public void checkInferredKnowledge(InternetApplication root)
      throws Exception {
   
    // generated
    DomainType schema = assertHasDomainType(root, "properties");
    assertGenerated(schema);

    assertEquals(4, schema.getEStructuralFeatures().size())// four attributes (one is a generated primary key)

    {
      DomainAttribute attribute = assertHasDomainAttribute(schema, "fruit");
      assertEquals(attribute.getName(), "fruit");
      assertEqualType(BuiltinDataTypes.getTypeString(), attribute.getEType());
View Full Code Here

Examples of org.openiaml.model.model.domain.DomainType

    return GeneratedPrimaryKey.class;
  }

  @Override
  public void checkNotInferredKnowledge(InternetApplication root) throws Exception {
    DomainType ds = assertHasDomainType(root, "domain object");
    assertEquals(0, ds.getEStructuralFeatures().size());

  }
View Full Code Here

Examples of org.openiaml.model.model.domain.DomainType

  }

  @Override
  public void checkInferredKnowledge(InternetApplication root) throws Exception {

    DomainType ds = assertHasDomainType(root, "domain object");
    assertEquals(1, ds.getEStructuralFeatures().size());
    DomainAttribute generated = (DomainAttribute) ds.getEStructuralFeatures().get(0);
    assertEquals("generated primary key", generated.getName());
    assertGenerated(generated);
    assertTrue(generated.isPrimaryKey());

  }
View Full Code Here

Examples of org.openiaml.model.model.domain.DomainType

   * @throws Exception
   */
  public void testInitial() throws Exception {
    root = loadDirectly(NewInstanceWithoutId.class);
   
    DomainType schema = assertHasDomainType(root, "domain object");
    assertNotGenerated(schema);
    DomainAttribute name = assertHasDomainAttribute(schema, "name");
    assertNotGenerated(name);
    assertFalse(name.isPrimaryKey());
   
View Full Code Here

Examples of org.openiaml.model.model.domain.DomainType

   * @throws Exception
   */
  public void testGeneratedPKIsInteger() throws Exception {
    root = loadAndInfer(NewInstanceWithoutId.class);
   
    DomainType schema = assertHasDomainType(root, "domain object");
   
    DomainAttribute pk = assertHasDomainAttribute(schema, "generated primary key");
    assertTrue(pk.isPrimaryKey());
    assertEquals(BuiltinDataTypes.getTypeInteger().getURI(),
        ((EXSDDataType) pk.getEType()).getDefinition().getURI());
View Full Code Here

Examples of org.openiaml.model.model.domain.DomainType

   * Check the types of the initial attributes, i.e. not generated.
   *
   * @throws Exception
   */
  public void testDatabaseTypes() throws Exception {
    DomainType obj = assertHasDomainType(root, "Container");

    DomainAttribute aString = assertHasDomainAttribute(obj, "string");
    DomainAttribute aInteger = assertHasDomainAttribute(obj, "integer");
    DomainAttribute aDate = assertHasDomainAttribute(obj, "date");
    DomainAttribute aEmail = assertHasDomainAttribute(obj, "email");
View Full Code Here

Examples of org.openiaml.model.model.domain.DomainType

   * the Attribute definition.
   *
   * @throws Exception
   */
  public void testAttributeInstancesHaveCorrectTypes() throws Exception {
    DomainType obj = assertHasDomainType(root, "Container");

    DomainAttribute aString = assertHasDomainAttribute(obj, "string");
    DomainAttribute aInteger = assertHasDomainAttribute(obj, "integer");
    DomainAttribute aDate = assertHasDomainAttribute(obj, "date");
    DomainAttribute aEmail = assertHasDomainAttribute(obj, "email");
View Full Code Here

Examples of org.openiaml.model.model.domain.DomainType

  public void checkNotInferredKnowledge(InternetApplication root)
      throws Exception {

    DomainSource ds = assertHasDomainSource(root, "domain source");
    assertNotGenerated(ds);
    DomainType user = assertHasDomainType(root, "User");
    assertNotGenerated(user);

    Frame page = assertHasFrame(root, "container");
    assertEquals("container", page.getName());
View Full Code Here

Examples of org.openiaml.model.model.domain.DomainType

  public void checkInferredKnowledge(InternetApplication root)
      throws Exception {
   
    DomainSource ds = assertHasDomainSource(root, "domain source");
    assertNotGenerated(ds);
    DomainType user = assertHasDomainType(root, "User");
    assertNotGenerated(user);

    Frame page = assertHasFrame(root, "container");
    assertEquals("container", page.getName());
View Full Code Here

Examples of org.openiaml.model.model.domain.DomainType

    DomainIterator editing = assertHasDomainIterator(add, "New Product");
    InputForm edit = assertHasInputForm(add, "Edit Form");
    Button save = assertHasButton(add, "save");

    DomainType product = assertHasDomainType(root, "Product");
    DomainAttribute id = assertHasDomainAttribute(product, "id");
    DomainAttribute name = assertHasDomainAttribute(product, "name");
    DomainAttribute price = assertHasDomainAttribute(product, "price");

    // none of these are generated
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.