Examples of ContactInfo


Examples of org.geoserver.config.ContactInfo

import org.geoserver.web.GeoServerWicketTestSupport;

public class ContactPageTest extends GeoServerWicketTestSupport {

    public void testValues() {
        ContactInfo info = getGeoServerApplication().getGeoServer().getGlobal().getContact();

        login();
        tester.startPage(ContactPage.class);
        tester.assertComponent("form:address", TextField.class);
        tester.assertModelValue("form:address", info.getAddress());
    }
View Full Code Here

Examples of org.geoserver.config.ContactInfo

        FormTester ft = tester.newFormTester("form");
        ft.setValue("address", "newAddress");
        ft.submit("submit");
        tester.assertRenderedPage(GeoServerHomePage.class);

        ContactInfo info = getGeoServerApplication().getGeoServer().getGlobal().getContact();
        assertEquals("newAddress", info.getAddress());
    }
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

            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

        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

            orAtts.addAttribute("", "xlink:href", "xlink:href", "",
                    buildURL(request.getBaseUrl(), "wms", null, URLType.SERVICE));
            element("OnlineResource", null, orAtts);

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

            element("Fees", serviceInfo.getFees());
            element("AccessConstraints", serviceInfo.getAccessConstraints());
            end("Service");
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

         */
        private void handleContact(WCSInfo config) {
            String tmp = "";

            GeoServerInfo geoServer = config.getGeoServer().getGlobal();
      ContactInfo contact = geoServer.getContact();
      String cp = contact.getContactPerson();
      String org = contact.getContactOrganization();
      if (((cp != null) && (cp != ""))
                    || ((org != null) && (org != ""))) {
                start("responsibleParty");

                tmp = cp;

                if ((tmp != null) && (tmp != "")) {
                    element("individualName", tmp);

                    tmp = org;

                    if ((tmp != null) && (tmp != "")) {
                        element("organisationName", tmp);
                    }
                } else {
                    tmp = org;

                    if ((tmp != null) && (tmp != "")) {
                        element("organisationName", tmp);
                    }
                }

                tmp = contact.getContactPosition();

                if ((tmp != null) && (tmp != "")) {
                    element("positionName", tmp);
                }

                start("contactInfo");

                start("phone");
                tmp = contact.getContactVoice();

                if ((tmp != null) && (tmp != "")) {
                    element("voice", tmp);
                }

                tmp = contact.getContactFacsimile();

                if ((tmp != null) && (tmp != "")) {
                    element("facsimile", tmp);
                }

                end("phone");

                start("address");
                tmp = contact.getAddressType();

                if ((tmp != null) && (tmp != "")) {
                    String addr = "";
                    addr = contact.getAddress();

                    if ((addr != null) && (addr != "")) {
                        element("deliveryPoint", tmp + " " + addr);
                    }
                } else {
                    tmp = contact.getAddress();

                    if ((tmp != null) && (tmp != "")) {
                        element("deliveryPoint", tmp);
                    }
                }

                tmp = contact.getAddressCity();

                if ((tmp != null) && (tmp != "")) {
                    element("city", tmp);
                }

                tmp = contact.getAddressState();

                if ((tmp != null) && (tmp != "")) {
                    element("administrativeArea", tmp);
                }

                tmp = contact.getAddressPostalCode();

                if ((tmp != null) && (tmp != "")) {
                    element("postalCode", tmp);
                }

                tmp = contact.getAddressCountry();

                if ((tmp != null) && (tmp != "")) {
                    element("country", tmp);
                }

                tmp = contact.getContactEmail();

                if ((tmp != null) && (tmp != "")) {
                    element("electronicMailAddress", tmp);
                }

View Full Code Here

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
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.