Package net.opengis.cat.csw20

Examples of net.opengis.cat.csw20.GetCapabilitiesType


     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetAcknowledgement(AcknowledgementType newAcknowledgement, NotificationChain msgs) {
        AcknowledgementType oldAcknowledgement = acknowledgement;
        acknowledgement = newAcknowledgement;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Csw20Package.HARVEST_RESPONSE_TYPE__ACKNOWLEDGEMENT, oldAcknowledgement, newAcknowledgement);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here


        encoder.setIndenting(true);
    }

    @Test
    public void testParseBriefRecord() throws Exception {
        BriefRecordType br = (BriefRecordType) parser.parse(getClass().getResourceAsStream("BriefRecord.xml"));
        assertEquals("00180e67-b7cf-40a3-861d-b3a09337b195", br.getIdentifier().get(0).getValue());
        assertEquals("Image2000 Product 1 (at1) Multispectral", br.getTitle().get(0).getValue());
        assertEquals("Image2000 Product 1 (at1) Multispectral", br.getTitle().get(0).getValue());
        assertEquals("dataset", br.getType().getValue());
    }
View Full Code Here

        assertEquals("dataset", br.getType().getValue());
    }
   
    @Test
    public void testRoundTripBriefRecord() throws Exception {
        BriefRecordType br = (BriefRecordType) parser.parse(getClass().getResourceAsStream("BriefRecord.xml"));
        String encoded = encoder.encodeAsString(br, CSW.BriefRecord);
        BriefRecordType reparsed = (BriefRecordType) parser.parse(new StringReader(encoded));
        assertTrue(EMFUtils.emfEquals(br, reparsed));
    }
View Full Code Here

        assertEquals("OperationsMetadata", sections.get(0));
    }
   
    @Test
    public void testParseCapabilities() throws Exception {
        CapabilitiesType caps = (CapabilitiesType) parser.parse(getClass().getResourceAsStream("Capabilities.xml"));
        assertEquals("2.0.2", caps.getVersion());
       
        ServiceIdentificationType si = caps.getServiceIdentification();
        assertEquals("con terra GmbH Catalogue Server", si.getTitle());
        assertEquals("terraCatalog 2.1 - Web based Catalogue Service \n" +
            "        (CS-W 2.0.0/AP ISO19115/19 0.9.3 (DE-Profil 1.0.1)) for service, datasets and applications", si.getAbstract());
        KeywordsType keywords = (KeywordsType) si.getKeywords().get(0);
        assertEquals("CS-W", keywords.getKeyword().get(0));
        assertEquals("ISO19119", keywords.getKeyword().get(1));
        assertEquals("http://www.conterra.de", keywords.getType().getCodeSpace());
        assertEquals("theme", keywords.getType().getValue());
        assertEquals("CSW", si.getServiceType().getValue());
        // minor trouble here, this should be a list, not a string
        assertEquals("2.0.2", si.getServiceTypeVersion());
       
        ServiceProviderType sp = caps.getServiceProvider();
        assertEquals("con terra GmbH", sp.getProviderName());
        assertEquals("http://www.conterra.de", sp.getProviderSite().getHref());
        ResponsiblePartySubsetType rp = sp.getServiceContact();
        assertEquals("Markus Neteler", rp.getIndividualName());
        assertEquals("GRASS leader", rp.getPositionName());
        ContactType ci = rp.getContactInfo();
        assertEquals("+49-251-7474-400", ci.getPhone().getVoice());
        assertEquals("Marting-Luther-King-Weg 24", ci.getAddress().getDeliveryPoint());
        assertEquals("Muenster", ci.getAddress().getCity());
        assertEquals("mailto:conterra@conterra.de", ci.getOnlineResource().getHref());
       
        OperationsMetadataType opm = caps.getOperationsMetadata();
        assertEquals(6, opm.getOperation().size());
        OperationType gr = (OperationType) opm.getOperation().get(0);
        assertEquals("GetRecords", gr.getName());
        DCPType dcp = (DCPType) gr.getDCP().get(0);
        RequestMethodType rm = (RequestMethodType) dcp.getHTTP().getPost().get(0);
        assertEquals("http://tc22-test:9090/soapService/services/CSWDiscovery", rm.getHref());
        assertEquals(6, gr.getParameter().size());
        DomainType param = (DomainType) gr.getParameter().get(0);
        assertEquals("TypeName", param.getName());
        assertEquals("gmd:MD_Metadata", param.getValue().get(0));
        assertEquals("csw:Record", param.getValue().get(1));
        assertEquals(2, gr.getConstraint().size());
        DomainType ct = (DomainType) gr.getConstraint().get(0);
        assertEquals("SupportedISOQueryables", ct.getName());
        assertEquals(25, ct.getValue().size());
        assertEquals("RevisionDate", ct.getValue().get(0));
        assertEquals("OperatesOnWithOpName", ct.getValue().get(24));
       
        /** This fails, caps are not getting parsed **/
        FilterCapabilities filterCapabilities = caps.getFilterCapabilities();
        assertNotNull(filterCapabilities);
        SpatialCapabilities spatial = filterCapabilities.getSpatialCapabilities();
        Collection<GeometryOperand> geoms = spatial.getGeometryOperands();
        assertEquals(4, geoms.size());
        assertTrue(geoms.contains(GeometryOperand.Envelope));
View Full Code Here

        assertFalse(id.hasEID());
    }
   
    @Test
    public void testRoundTripCapabilities() throws Exception {
        CapabilitiesType caps = (CapabilitiesType) parser.parse(getClass().getResourceAsStream("Capabilities.xml"));

        Encoder encoder = new Encoder(new CSWConfiguration());
        encoder.setIndenting(true);
        encoder.setNamespaceAware(true);
        encoder.getNamespaces().declarePrefix("ows", OWS.NAMESPACE);
        encoder.getNamespaces().declarePrefix("ogc", OGC.NAMESPACE);
        encoder.getNamespaces().declarePrefix("gml", GML.NAMESPACE);
        String encoded = encoder.encodeAsString(caps, CSW.Capabilities);
        // System.out.println(encoded);
       
        CapabilitiesType reParsed = (CapabilitiesType) parser.parse(new StringReader(encoded));
        assertTrue(EMFUtils.emfEquals(caps, reParsed));
    }
View Full Code Here

    @Test
    @SuppressWarnings("unchecked")
    public void testExtendedCapabilities() throws Exception {
        Csw20Factory cswf = Csw20Factory.eINSTANCE;
        Ows10Factory owsf = Ows10Factory.eINSTANCE;
        CapabilitiesType caps = cswf.createCapabilitiesType();
        OperationsMetadataType om = owsf.createOperationsMetadataType();
        caps.setOperationsMetadata(om);
        final String rimNamespace = "urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0";
        om.setExtendedCapabilities(new EncoderDelegate() {
           
            @Override
            public void encode(ContentHandler output) throws Exception {
View Full Code Here

    }

    @Override
    public CapabilitiesType getCapabilities(GetCapabilitiesType request) throws ServiceException {
        checkStore();
        CapabilitiesType caps = new GetCapabilities(this.csw, this.store, context).run(request);
       
        // check for decorator extensions
        for(CapabilitiesDecorator decorator : GeoServerExtensions.extensions(CapabilitiesDecorator.class))
        {
            caps = decorator.decorate(caps, this.store);
View Full Code Here

     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public NotificationChain basicSetConceptualScheme(ConceptualSchemeType newConceptualScheme, NotificationChain msgs) {
        ConceptualSchemeType oldConceptualScheme = conceptualScheme;
        conceptualScheme = newConceptualScheme;
        if (eNotificationRequired()) {
            ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Csw20Package.DOMAIN_VALUES_TYPE__CONCEPTUAL_SCHEME, oldConceptualScheme, newConceptualScheme);
            if (msgs == null) msgs = notification; else msgs.add(notification);
        }
View Full Code Here

     * <!-- end-user-doc -->
     * @generated
     */
    public static Csw20Factory init() {
        try {
            Csw20Factory theCsw20Factory = (Csw20Factory)EPackage.Registry.INSTANCE.getEFactory("http:///net/opengis/cat/csw20.ecore");
            if (theCsw20Factory != null) {
                return theCsw20Factory;
            }
        }
        catch (Exception exception) {
View Full Code Here

    }
   
    @Test
    @SuppressWarnings("unchecked")
    public void testExtendedCapabilities() throws Exception {
        Csw20Factory cswf = Csw20Factory.eINSTANCE;
        Ows10Factory owsf = Ows10Factory.eINSTANCE;
        CapabilitiesType caps = cswf.createCapabilitiesType();
        OperationsMetadataType om = owsf.createOperationsMetadataType();
        caps.setOperationsMetadata(om);
        final String rimNamespace = "urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0";
        om.setExtendedCapabilities(new EncoderDelegate() {
           
View Full Code Here

TOP

Related Classes of net.opengis.cat.csw20.GetCapabilitiesType

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.