Package org.geotools.metadata.iso.citation

Examples of org.geotools.metadata.iso.citation.AddressImpl


      if (contactPerson == null) {
        contactPerson = new ResponsiblePartyImpl();
      }
     
      TelephoneImpl telephone = null;
      AddressImpl address = null;
      ContactImpl contact = new ContactImpl();
     
      for (int i = 0; i < value.length; i++) {
       
        contactPerson.setContactInfo(contact);
       
        if (sameName(elems[1], value[i])) {
          String positionName = (String) value[i].getValue();
          contactPerson.setPositionName(new SimpleInternationalString(positionName));
        }
       
        if (sameName(elems[2], value[i])) {
          address = (AddressImpl) value[i].getValue();
        }
       
        if (sameName(elems[3], value[i])) {
          Collection voices = Collections.singleton(value[i].getValue());
          if (telephone == null) {
            telephone = new TelephoneImpl();
          }
          telephone.setVoices(voices);
        }
       
        if (sameName(elems[4], value[i])) {
                    Collection fax = Collections.singleton(value[i].getValue());
          if (telephone == null) {
            telephone = new TelephoneImpl();
          }
          telephone.setFacsimiles(fax);
        }       
       
        contact.setPhone(telephone);
      }
     
      for (int i = 0; i < value.length; i++) {
        if (sameName(elems[5], value[i])) {
          String email = (String) value[i].getValue();
         
          if (address == null) {
            address = new AddressImpl();
          }
          address.setElectronicMailAddresses(Collections.singleton(email));
        }
      }
      contact.setAddress(address);
         
      return contactPerson;
View Full Code Here


     *      java.util.Map)
     */
    public Object getValue(Element element, ElementValue[] value,
        Attributes attrs, Map hints) throws SAXException,
        OperationNotSupportedException {
      AddressImpl address = new AddressImpl();
     
      for (int i = 0; i < value.length; i++) {
//        if (sameName(elems[0], value[i])) {
//          String addressType = (String) value[0].getValue();
//          //nothing to do with address Type - it does not fit into the GeoAPI citation model
//        }
       
        if (sameName(elems[1], value[i])) {
          String address1 = (String) value[i].getValue();
          address.setDeliveryPoints(Collections.singleton(address1));
        }
       
        if (sameName(elems[2], value[i])) {
          String city = (String) value[i].getValue();
          address.setCity(new SimpleInternationalString(city));
        }
       
        if (sameName(elems[3], value[i])) {
          String state = (String) value[i].getValue();
          address.setAdministrativeArea(new SimpleInternationalString(state));
        }
       
        if (sameName(elems[4], value[i])) {
          String postalCode = (String) value[i].getValue();
          address.setPostalCode(postalCode);
        }
       
        if (sameName(elems[5], value[i])) {
          String country = (String) value[i].getValue();
          address.setCountry(new SimpleInternationalString(country));
        }
      }
     
      return address;
    }
View Full Code Here

TOP

Related Classes of org.geotools.metadata.iso.citation.AddressImpl

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.