Package buri.ddmsence.ddms

Examples of buri.ddmsence.ddms.IRoleEntity


        println("A minimal metacardInfo consist of an identifier, dates, and a publisher.");
        components.add((Identifier) inputLoop(Identifier.class));
        components.add((Dates) inputLoop(Dates.class));

        String entityType = readString("the publisher entity type [organization]");
        IRoleEntity entity = null;
        if (Person.getName(version).equals(entityType))
          entity = (Person) inputLoop(Person.class);
        else if (Organization.getName(version).equals(entityType))
          entity = (Organization) inputLoop(Organization.class);
        else if (Service.getName(version).equals(entityType))
          entity = (Service) inputLoop(Service.class);
        else if (Unknown.getName(version).equals(entityType))
          entity = (Unknown) inputLoop(Unknown.class);
        components.add(new Publisher(entity, null, buildSecurityAttributes("publisher")));

        // Skip all optional fields in the metacard (other producers, description, processingInfo,
        // revisionRecall, recordsManagementInfo, and noticeList.

        return (new MetacardInfo(components, buildSecurityAttributes("subject")));
      }
    });
    CONSTRUCTOR_BUILDERS.put(Identifier.class, new IConstructorBuilder() {
      public IDDMSComponent build() throws IOException, InvalidDDMSException {
        String qualifier = readString("the qualifier [testQualifier]");
        String value = readString("the value [testValue]");
        return (new Identifier(qualifier, value));
      }
    });
    CONSTRUCTOR_BUILDERS.put(Title.class, new IConstructorBuilder() {
      public IDDMSComponent build() throws IOException, InvalidDDMSException {
        String text = readString("the title text [testTitle]");
        return (new Title(text, buildSecurityAttributes("title")));
      }
    });
    CONSTRUCTOR_BUILDERS.put(Description.class, new IConstructorBuilder() {
      public IDDMSComponent build() throws IOException, InvalidDDMSException {
        String text = readString("the description text [testDescription]");
        SecurityAttributes attr = buildSecurityAttributes("description");
        return (new Description(text, attr));
      }
    });
    CONSTRUCTOR_BUILDERS.put(Dates.class, new IConstructorBuilder() {
      public IDDMSComponent build() throws IOException, InvalidDDMSException {
        String created = readString("the created date [2010]");
        String posted = readString("the posted date [2010]");
        String validTil = readString("the validTil date [2010]");
        String infoCutOff = readString("the infoCutOff date [2010]");
        String approvedOn = readString("the approvedOn date [2010]");
        String receivedOn = readString("the receivedOn date [2010]");
        return (new Dates(null, created, posted, validTil, infoCutOff, approvedOn, receivedOn));
      }
    });
    CONSTRUCTOR_BUILDERS.put(AbstractProducerRole.class, new IConstructorBuilder() {
      public IDDMSComponent build() throws IOException, InvalidDDMSException {
        DDMSVersion version = DDMSVersion.getCurrentVersion();
        String producerType = readString("the producer type [creator]");
        String entityType = readString("the entity type [organization]");
        String pocTypes = readString("the pocType [DoD-Dist-B]");
        SecurityAttributes attr = buildSecurityAttributes("producer");

        IRoleEntity entity = null;
        if (Person.getName(version).equals(entityType))
          entity = (Person) inputLoop(Person.class);
        else if (Organization.getName(version).equals(entityType))
          entity = (Organization) inputLoop(Organization.class);
        else if (Service.getName(version).equals(entityType))
View Full Code Here

TOP

Related Classes of buri.ddmsence.ddms.IRoleEntity

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.