Examples of ContactInfo


Examples of org.geoserver.config.ContactInfo

        service.getKeywords().add("test keyword 1");
        service.getKeywords().add("test keyword 2");
        service.setMaintainer("test maintainer");
        service.setOnlineResource("http://example.com/geoserver");
        GeoServerInfo global = getGeoServer().getGlobal();
        ContactInfo contact = global.getContact();
        contact.setAddress("__address");
        contact.setAddressCity("__city");
        contact.setAddressCountry("__country");
        contact.setAddressPostalCode("__ZIP");
        contact.setAddressState("__state");
        contact.setAddressType("__type");
        contact.setContactEmail("e@mail");
        contact.setContactOrganization("__org");
        contact.setContactFacsimile("__fax");
        contact.setContactPerson("__me");
        contact.setContactPosition("__position");
        contact.setContactVoice("__phone");
       
        getGeoServer().save(global);
        getGeoServer().save(service);

        Document doc = getAsDOM("wms?service=WMS&request=getCapabilities&version=1.3.0", true);
View Full Code Here

Examples of org.geoserver.config.ContactInfo

                 * </pre>
                 * </p>
                 *
                 */
            protected void serviceProvider(GeoServer gs) {
                ContactInfo contact = gs.getSettings().getContact();
                start("ows:ServiceProvider");

                element("ows:ProviderName", contact.getContactOrganization());
                start( "ows:ServiceContact");
                /*
                <sequence>
                <element ref="ows:IndividualName" minOccurs="0"/>
                <element ref="ows:OrganisationName" minOccurs="0"/>
                <element ref="ows:PositionName" minOccurs="0"/>
                <element ref="ows:ContactInfo" minOccurs="0"/>
                <element ref="ows:Role"/>
                </sequence>
                */
                element( "ows:IndividualName", contact.getContactPerson());
                element( "ows:PositionName", contact.getContactPosition() );

                start( "ows:ContactInfo" );
                /*
                  <sequence>
                        <element name="Phone" type="ows:TelephoneType" minOccurs="0">
                        <element name="Address" type="ows:AddressType" minOccurs="0">
                        <element name="OnlineResource" type="ows:OnlineResourceType" minOccurs="0">
                        <element name="HoursOfService" type="string" minOccurs="0">
                        <element name="ContactInstructions" type="string" minOccurs="0">
                 </sequence>
                 */
                start( "ows:Phone");
                element( "ows:Voice", contact.getContactVoice() );
                element( "ows:Facsimile", contact.getContactFacsimile() );
                end( "ows:Phone");
               
                start( "ows:Address");
                /*
                <element name="DeliveryPoint" type="string" minOccurs="0" maxOccurs="unbounded">
                <element name="City" type="string" minOccurs="0">
                <element name="AdministrativeArea" type="string" minOccurs="0">
                <element name="PostalCode" type="string" minOccurs="0">
                <element name="Country" type="string" minOccurs="0">
                <element name="ElectronicMailAddress" type="string" minOccurs="0" maxOccurs="unbounded">
                 */
                element( "ows:City", contact.getAddressCity() );
                element( "ows:AdministrativeArea", contact.getAddressState() );
                element( "ows:PostalCode", contact.getAddressPostalCode() );
                element( "ows:Country", contact.getAddressCountry() );
                end( "ows:Address" );
               
                end( "ows:ContactInfo" );
               
                end( "ows:ServiceContact");
View Full Code Here

Examples of org.geoserver.config.ContactInfo

            return true;
        if (obj == null)
            return false;
        if (!(obj instanceof ContactInfo))
            return false;
        final ContactInfo other = (ContactInfo) obj;
        if (address == null) {
            if (other.getAddress() != null)
                return false;
        } else if (!address.equals(other.getAddress()))
            return false;
        if (addressCity == null) {
            if (other.getAddressCity() != null)
                return false;
        } else if (!addressCity.equals(other.getAddressCity()))
            return false;
        if (addressCountry == null) {
            if (other.getAddressCountry() != null)
                return false;
        } else if (!addressCountry.equals(other.getAddressCountry()))
            return false;
        if (addressPostalCode == null) {
            if (other.getAddressPostalCode() != null)
                return false;
        } else if (!addressPostalCode.equals(other.getAddressPostalCode()))
            return false;
        if (addressState == null) {
            if (other.getAddressState() != null)
                return false;
        } else if (!addressState.equals(other.getAddressState()))
            return false;
        if (addressType == null) {
            if (other.getAddressType() != null)
                return false;
        } else if (!addressType.equals(other.getAddressType()))
            return false;
        if (contactEmail == null) {
            if (other.getContactEmail() != null)
                return false;
        } else if (!contactEmail.equals(other.getContactEmail()))
            return false;
        if (contactFacsimile == null) {
            if (other.getContactFacsimile() != null)
                return false;
        } else if (!contactFacsimile.equals(other.getContactFacsimile()))
            return false;
        if (contactOrganization == null) {
            if (other.getContactOrganization() != null)
                return false;
        } else if (!contactOrganization.equals(other.getContactOrganization()))
            return false;
        if (contactPerson == null) {
            if (other.getContactPerson() != null)
                return false;
        } else if (!contactPerson.equals(other.getContactPerson()))
            return false;
        if (contactPosition == null) {
            if (other.getContactPosition() != null)
                return false;
        } else if (!contactPosition.equals(other.getContactPosition()))
            return false;
        if (contactVoice == null) {
            if (other.getContactVoice()!= null)
                return false;
        } else if (!contactVoice.equals(other.getContactVoice()))
            return false;
        if (onlineResource == null) {
            if (other.getOnlineResource() != null)
                return false;
        } else if (!onlineResource.equals(other.getOnlineResource()))
            return false;
        return true;
    }
View Full Code Here

Examples of org.geoserver.config.ContactInfo

    }

    @Override
    public void encode(Object input, OutputStream os) throws IOException {

        ContactInfo contact = geoServer.getSettings().getContact();
        GpxEncoder encoder = new GpxEncoder(true);
        encoder.setCreator(contact.getContactOrganization());
        encoder.setLink(contact.getOnlineResource());

        try {
            SimpleFeatureCollection fc = (SimpleFeatureCollection) input;
            CoordinateReferenceSystem crs = fc.getSchema().getCoordinateReferenceSystem();
            // gpx is defined only in wgs84
View Full Code Here

Examples of org.geoserver.config.ContactInfo

    @Override
    protected void setUpInternal() throws Exception {
        GeoServer gs = getGeoServer();
        GeoServerInfo global = gs.getGlobal();
        SettingsInfo settings = global.getSettings();
        ContactInfo contact = settings.getContact();
        contact.setContactOrganization("GeoServer");
        contact.setOnlineResource("http://www.geoserver.org");
        gs.save(global);

        ppio = new KMLPPIO(gs);
    }
View Full Code Here

Examples of org.geoserver.config.ContactInfo

        info.setOnlineResource( get( global, "onlineResource", String.class ) );
        info.setProxyBaseUrl( get( global, "ProxyBaseUrl", String.class ) );
       
        //contact
        Map<String,Object> contact = reader.contact();
        ContactInfo contactInfo = factory.createContact();
      
        contactInfo.setContactPerson( (String) contact.get( "ContactPerson") );
        contactInfo.setContactOrganization( (String) contact.get( "ContactOrganization") );
        contactInfo.setContactVoice( (String) contact.get( "ContactVoiceTelephone" ) );
        contactInfo.setContactFacsimile( (String) contact.get( "ContactFacsimileTelephone" ) );
        contactInfo.setContactPosition( (String) contact.get( "ContactPosition" ) );
        contactInfo.setContactEmail( (String) contact.get( "ContactElectronicMailAddress" ) );
       
        contactInfo.setAddress( (String) contact.get( "Address") );
        contactInfo.setAddressType( (String) contact.get( "AddressType") );
        contactInfo.setAddressCity( (String) contact.get( "City") );
        contactInfo.setAddressCountry( (String) contact.get( "Country") );
        contactInfo.setAddressState( (String) contact.get( "StateOrProvince") );
        contactInfo.setAddressPostalCode( (String) contact.get( "PostCode") );
        info.setContact( contactInfo );
       
        //jai
        JAIInfo jai = new JAIInfoImpl();
        jai.setMemoryCapacity( (Double) value( global.get( "JaiMemoryCapacity"),JAIInfoImpl.DEFAULT_MemoryCapacity ) );
View Full Code Here

Examples of org.geoserver.config.ContactInfo

        // ServiceProvider
        if (sections == null || requestedSection("ServiceProvider", sections)) {
            ServiceProviderType sp = owsf.createServiceProviderType();
            caps.setServiceProvider(sp);

            final ContactInfo contact = csw.getGeoServer().getGlobal().getSettings().getContact();

            sp.setProviderName((contact.getContactOrganization() != null ? contact.getContactOrganization() : ""));

            OnlineResourceType providerSite = owsf.createOnlineResourceType();
            sp.setProviderSite(providerSite);
            providerSite.setHref((csw.getOnlineResource() != null ? csw.getOnlineResource() : ""));

            ResponsiblePartySubsetType serviceContact = owsf.createResponsiblePartySubsetType();
            sp.setServiceContact(serviceContact);
            serviceContact.setIndividualName(contact.getContactPerson());
            serviceContact.setPositionName(contact.getContactPosition());

            ContactType contactInfo = owsf.createContactType();
            serviceContact.setContactInfo(contactInfo);
            AddressType address = owsf.createAddressType();
            contactInfo.setAddress(address);
            address.setAdministrativeArea(contact.getAddressState());
            address.setCity(contact.getAddressCity());
            address.setCountry(contact.getAddressCountry());
            address.setDeliveryPoint(null);
            address.setElectronicMailAddress(contact.getContactEmail());
            address.setPostalCode(contact.getAddressPostalCode());

            contactInfo.setContactInstructions(null);
            contactInfo.setHoursOfService(null);

            OnlineResourceType onlineResource = owsf.createOnlineResourceType();
            contactInfo.setOnlineResource(onlineResource);
            onlineResource.setHref(contact.getOnlineResource());

            TelephoneType telephone = owsf.createTelephoneType();
            contactInfo.setPhone(telephone);
            telephone.setFacsimile(contact.getContactFacsimile());
            telephone.setVoice(contact.getContactVoice());

            serviceContact.setRole(null);
        }

        // Operations Metadata
View Full Code Here

Examples of org.geoserver.config.ContactInfo

        final WorkspaceInfo workspace = info.getWorkspace();
        if (workspace != null) {
            info.setWorkspace(CatalogUtils.localizeWorkspace(workspace, geoServer.getCatalog()));
        }

        final ContactInfo contact = info.getContact();
        if (contact != null) {
            info.setContact(localizeContactInfo(geoServer, contact));
        }

        return info;
View Full Code Here

Examples of org.ogce.gfac.utils.ContactInfo

public class GridFtp {
  public void makeDir(URI destURI, GSSCredential gssCred) throws GfacException {
    GridFTPClient destClient = null;
    try {
      ContactInfo destHost = new ContactInfo(destURI.getHost(), destURI.getPort());
      String destPath = destURI.getPath();
      System.out.println(("Creating Directory = " + destHost + "=" + destPath));

      destClient = new GridFTPClient(destHost.hostName, destHost.port);
View Full Code Here

Examples of org.ogce.gfac.utils.ContactInfo

  public String readRemoteFile(URI destURI, GSSCredential gsCredential, File localFile) throws GfacException {
    GridFTPClient ftpClient = null;

    try {
      ContactInfo contactInfo = new ContactInfo(destURI.getHost(), destURI.getPort());
      String remoteFile = destURI.getPath();

      ftpClient = new GridFTPClient(contactInfo.hostName, contactInfo.port);
      ftpClient.setAuthorization(new HostAuthorization("host"));
      ftpClient.authenticate(gsCredential);
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.