Search in sources :

Example 1 with ServiceProvider

use of net.opengis.ows.v_1_0_0.ServiceProvider in project ddf by codice.

the class TestCswEndpoint method verifyServiceProvider.

/**
     * Helper method to verify the ServiceProvider section matches the endpoint's definition
     *
     * @param ct The CapabilitiesType to verify
     */
private void verifyServiceProvider(CapabilitiesType ct) {
    ServiceProvider sp = ct.getServiceProvider();
    assertThat(sp.getProviderName(), is(CswEndpoint.PROVIDER_NAME));
}
Also used : ServiceProvider(net.opengis.ows.v_1_0_0.ServiceProvider)

Example 2 with ServiceProvider

use of net.opengis.ows.v_1_0_0.ServiceProvider in project ddf by codice.

the class CswEndpoint method buildServiceProvider.

/**
     * Creates the ServiceProvider portion of the GetCapabilities response TODO: Add more
     * DDF-specific information if desired
     *
     * @return The constructed ServiceProvider object
     */
private ServiceProvider buildServiceProvider() {
    ServiceProvider sp = new ServiceProvider();
    sp.setProviderName(PROVIDER_NAME);
    sp.setProviderSite(new OnlineResourceType());
    sp.setServiceContact(new ResponsiblePartySubsetType());
    return sp;
}
Also used : OnlineResourceType(net.opengis.ows.v_1_0_0.OnlineResourceType) ServiceProvider(net.opengis.ows.v_1_0_0.ServiceProvider) ResponsiblePartySubsetType(net.opengis.ows.v_1_0_0.ResponsiblePartySubsetType)

Example 3 with ServiceProvider

use of net.opengis.ows.v_1_0_0.ServiceProvider in project ddf by codice.

the class TestCswEndpoint method testGetCapabilitiesTypeServiceProvider.

@Test
public void testGetCapabilitiesTypeServiceProvider() {
    // Should only return the ServiceProvider section
    GetCapabilitiesType gct = createDefaultGetCapabilitiesType();
    SectionsType stv = new SectionsType();
    stv.setSection(Arrays.asList(CswEndpoint.SERVICE_PROVIDER));
    gct.setSections(stv);
    CapabilitiesType ct = null;
    try {
        ct = csw.getCapabilities(gct);
    } catch (CswException e) {
        fail("CswException caught during getCapabilities GET request: " + e.getMessage());
    }
    assertThat(ct, notNullValue());
    verifyServiceProvider(ct);
    verifyFilterCapabilities(ct);
    assertThat(ct.getServiceIdentification(), nullValue());
    assertThat(ct.getOperationsMetadata(), nullValue());
}
Also used : SectionsType(net.opengis.ows.v_1_0_0.SectionsType) CapabilitiesType(net.opengis.cat.csw.v_2_0_2.CapabilitiesType) GetCapabilitiesType(net.opengis.cat.csw.v_2_0_2.GetCapabilitiesType) GetCapabilitiesType(net.opengis.cat.csw.v_2_0_2.GetCapabilitiesType) CswException(org.codice.ddf.spatial.ogc.csw.catalog.common.CswException) Test(org.junit.Test)

Aggregations

ServiceProvider (net.opengis.ows.v_1_0_0.ServiceProvider)2 CapabilitiesType (net.opengis.cat.csw.v_2_0_2.CapabilitiesType)1 GetCapabilitiesType (net.opengis.cat.csw.v_2_0_2.GetCapabilitiesType)1 OnlineResourceType (net.opengis.ows.v_1_0_0.OnlineResourceType)1 ResponsiblePartySubsetType (net.opengis.ows.v_1_0_0.ResponsiblePartySubsetType)1 SectionsType (net.opengis.ows.v_1_0_0.SectionsType)1 CswException (org.codice.ddf.spatial.ogc.csw.catalog.common.CswException)1 Test (org.junit.Test)1