Examples of ContactInfo


Examples of org.geoserver.config.ContactInfo

         */
        private void handleContact() {
            final GeoServer gs = wcs.getGeoServer();
            start("ows:ServiceContact");

            ContactInfo contact = gs.getGlobal().getContact();
            elementIfNotEmpty("ows:IndividualName", contact.getContactPerson());
            elementIfNotEmpty("ows:PositionName", contact.getContactPosition());

            start("ows:ContactInfo");
            start("ows:Phone");
            elementIfNotEmpty("ows:Voice", contact.getContactVoice());
            elementIfNotEmpty("ows:Facsimile", contact.getContactFacsimile());
            end("ows:Phone");
            start("ows:Address");
            elementIfNotEmpty("ows:DeliveryPoint", contact.getAddress());
            elementIfNotEmpty("ows:City", contact.getAddressCity());
            elementIfNotEmpty("ows:AdministrativeArea", contact.getAddressState());
            elementIfNotEmpty("ows:PostalCode", contact.getAddressPostalCode());
            elementIfNotEmpty("ows:Country", contact.getAddressCountry());
            elementIfNotEmpty("ows:ElectronicMailAddress", contact.getContactEmail());
            end("ows:Address");

            String or = gs.getGlobal().getOnlineResource();
            if ((or != null) && !"".equals(or.trim())) {
                AttributesImpl attributes = new AttributesImpl();
View Full Code Here

Examples of org.geoserver.config.ContactInfo

            AttributesImpl attributes = attributes("xlink:type", "simple", "xlink:href",
                    onlineResource);
            element("OnlineResource", null, attributes);

            GeoServer geoServer = wmsConfig.getGeoServer();
            ContactInfo contact = geoServer.getGlobal().getContact();
            handleContactInfo(contact);

            element("Fees", serviceInfo.getFees());
            element("AccessConstraints", serviceInfo.getAccessConstraints());
View Full Code Here

Examples of org.geoserver.config.ContactInfo

        GeoServerInfo g1 = factory.createGlobal();
        g1.setAdminPassword( "foo" );
        g1.setAdminUsername( "bar" );
        g1.setCharset( "ISO-8859-1" );
       
        ContactInfo contact = factory.createContact();
        g1.setContact( contact );
        contact.setAddress( "123" );
        contact.setAddressCity( "Victoria" );
        contact.setAddressCountry( "Canada" );
        contact.setAddressPostalCode( "V1T3T8");
        contact.setAddressState( "BC" );
        contact.setAddressType( "house" );
        contact.setContactEmail( "bob@acme.org" );
        contact.setContactFacsimile("+1 250 123 4567" );
        contact.setContactOrganization( "Acme" );
        contact.setContactPerson( "Bob" );
        contact.setContactPosition( "hacker" );
        contact.setContactVoice( "+1 250 765 4321" );
       
        g1.setNumDecimals( 2 );
        g1.setOnlineResource( "http://acme.org" );
        g1.setProxyBaseUrl( "http://proxy.acme.org" );
        g1.setSchemaBaseUrl( "http://schemas.acme.org");
View Full Code Here

Examples of org.geoserver.config.ContactInfo

        assertEquals( "logging", dom.getDocumentElement().getNodeName() );
       
    }
    public void testGobalContactDefault() throws Exception {
        GeoServerInfo g1 = factory.createGlobal();
        ContactInfo contact = factory.createContact();
        g1.setContact( contact );
       
        ByteArrayOutputStream out = out();
        persister.save(g1, out);
       
View Full Code Here

Examples of org.geoserver.config.ContactInfo

                 * </pre>
                 * </p>
                 *
                 */
            void serviceProvider(GeoServer gs) {
                ContactInfo contact = gs.getGlobal().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

        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.1.1", true);
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

            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

        wmsInfo.getKeywords().add("k2");
        // @REVISIT: this is not being respected, but the onlineresource is being set based on the
        // proxyBaseUrl... not sure if that's correct
        wmsInfo.setOnlineResource("http://onlineresource/fake");

        ContactInfo contactInfo = new ContactInfoImpl();
        geosInfo.setContact(contactInfo);
        contactInfo.setContactPerson("contactPerson");
        contactInfo.setContactOrganization("contactOrganization");
        contactInfo.setContactPosition("contactPosition");
        contactInfo.setAddress("address");
        contactInfo.setAddressType("addressType");
        contactInfo.setAddressCity("city");
        contactInfo.setAddressState("state");
        contactInfo.setAddressPostalCode("postCode");
        contactInfo.setAddressCountry("country");
        contactInfo.setContactVoice("voice");
        contactInfo.setContactEmail("email");
        contactInfo.setContactFacsimile("fax");

        wmsInfo.setFees("fees");
        wmsInfo.setAccessConstraints("accessConstraints");

        GetCapabilitiesTransformer tr;
View Full Code Here

Examples of org.geoserver.config.ContactInfo

*/
public class GeoServerHomePage extends GeoServerBasePage {

    public GeoServerHomePage() {
        GeoServer gs = getGeoServer();
        ContactInfo contact = gs.getGlobal().getContact();

        //add some contact info
        add(new ExternalLink("contactURL", contact.getOnlineResource())
            .add( new Label("contactName", contact.getContactOrganization())));
        {
            String version = String.valueOf(new ResourceModel("version").getObject());
            String contactEmail = contact.getContactEmail();
            HashMap<String, String>params = new HashMap<String, String>();
            params.put("version", version);
            params.put("contactEmail", contactEmail);
            Label label = new Label("footerMessage", new StringResourceModel("GeoServerHomePage.footer", this, new Model(params)));
            label.setEscapeModelStrings(false);
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.