Package buri.ddmsence.ddms.resource

Examples of buri.ddmsence.ddms.resource.Person


  @Test
  public void testIndexLevelsStringLists() throws InvalidDDMSException {
    List<String> names = Util.getXsListAsList("Brian BU");
    List<String> phones = Util.getXsListAsList("703-885-1000");
    Person person = new Person(names, "Uri", phones, null, null, null);

    PropertyReader.setProperty("output.indexLevel", "0");
    assertEquals("entityType: person\nname: Brian\nname: BU\nphone: 703-885-1000\nsurname: Uri\n", person.toText());

    PropertyReader.setProperty("output.indexLevel", "1");
    assertEquals("entityType: person\nname[1]: Brian\nname[2]: BU\nphone: 703-885-1000\nsurname: Uri\n",
      person.toText());

    PropertyReader.setProperty("output.indexLevel", "2");
    assertEquals("entityType: person\nname[1]: Brian\nname[2]: BU\nphone[1]: 703-885-1000\nsurname: Uri\n",
      person.toText());
  }
View Full Code Here


        Element entityElement = element.getChildElements().get(0);
        String entityType = entityElement.getLocalName();
        if (Organization.getName(getDDMSVersion()).equals(entityType))
          _entity = new Organization(entityElement);
        if (Person.getName(getDDMSVersion()).equals(entityType))
          _entity = new Person(entityElement);
      }
      _securityAttributes = new SecurityAttributes(element);
      validate();
    }
    catch (InvalidDDMSException e) {
View Full Code Here

        String userID = readString("the person userID [testID]");
        String affiliation = readString("the person affiliation [testOrg]");

        // Skip optional extensible attributes.

        return (new Person(names, surname, phones, emails, userID, Util.getXsListAsList(affiliation)));
      }
    });
    CONSTRUCTOR_BUILDERS.put(Organization.class, new IConstructorBuilder() {
      public IDDMSComponent build() throws IOException, InvalidDDMSException {
        int numNames = readInt("the number of names this organization has [1]");
View Full Code Here

        Element entityElement = element.getChildElements().get(0);
        String entityType = entityElement.getLocalName();
        if (Organization.getName(getDDMSVersion()).equals(entityType))
          _entity = new Organization(entityElement);
        if (Person.getName(getDDMSVersion()).equals(entityType))
          _entity = new Person(entityElement);
        if (Service.getName(getDDMSVersion()).equals(entityType))
          _entity = new Service(entityElement);
        if (Unknown.getName(getDDMSVersion()).equals(entityType))
          _entity = new Unknown(entityElement);
      }
View Full Code Here

TOP

Related Classes of buri.ddmsence.ddms.resource.Person

Copyright © 2018 www.massapicom. 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.