Search in sources :

Example 1 with OperationsMetadata

use of org.geotoolkit.ows.xml.v110.OperationsMetadata in project ddf by codice.

the class TestCswEndpoint method verifyOperationsMetadata.

/**
     * Helper method to verify the OperationsMetadata section matches the endpoint's definition
     *
     * @param ct The CapabilitiesType to verify
     */
private void verifyOperationsMetadata(CapabilitiesType ct) {
    OperationsMetadata om = ct.getOperationsMetadata();
    List<Operation> opList = om.getOperation();
    ArrayList<String> opNames = new ArrayList<>();
    for (Operation op : opList) {
        opNames.add(op.getName());
        if (StringUtils.equals(CswConstants.TRANSACTION, op.getName()) || StringUtils.equals(CswConstants.GET_RECORDS, op.getName())) {
            for (DomainType parameter : op.getParameter()) {
                if (StringUtils.equals(CswConstants.CONSTRAINT_LANGUAGE_PARAMETER, parameter.getName())) {
                    assertThat(parameter.getValue(), contains(CswConstants.CONSTRAINT_LANGUAGE_FILTER, CswConstants.CONSTRAINT_LANGUAGE_CQL));
                } else if (StringUtils.equals(CswConstants.TYPE_NAMES_PARAMETER, parameter.getName())) {
                    // TODO : Remove conditional when GMD Metacard Transformer is merged (DDF-1976)
                    if (StringUtils.equals(op.getName(), CswConstants.TRANSACTION)) {
                        assertThat(parameter.getValue(), contains(CswConstants.CSW_RECORD));
                    } else {
                        assertThat(parameter.getValue(), hasItems(CswConstants.CSW_RECORD, GmdConstants.GMD_METACARD_TYPE_NAME));
                    }
                }
            }
        }
    }
    assertThat(opNames.contains(CswConstants.GET_CAPABILITIES), is(true));
    assertThat(opNames.contains(CswConstants.DESCRIBE_RECORD), is(true));
    assertThat(opNames.contains(CswConstants.GET_RECORDS), is(true));
    assertThat(opNames.contains(CswConstants.GET_RECORD_BY_ID), is(true));
    assertThat(opNames.contains(CswConstants.TRANSACTION), is(true));
}
Also used : OperationsMetadata(net.opengis.ows.v_1_0_0.OperationsMetadata) DomainType(net.opengis.ows.v_1_0_0.DomainType) ArrayList(java.util.ArrayList) Operation(net.opengis.ows.v_1_0_0.Operation)

Example 2 with OperationsMetadata

use of org.geotoolkit.ows.xml.v110.OperationsMetadata in project geotoolkit by Geomatys.

the class CapabilitiesType method applySections.

@Override
public CapabilitiesType applySections(Sections sections) {
    if (sections == null) {
        sections = new SectionsType("All");
    }
    ServiceIdentification si = null;
    ServiceProvider sp = null;
    OperationsMetadata om = null;
    ContentsType ct = null;
    // we add the static sections if the are included in the requested sections
    if (sections.containsSection("ServiceProvider") || sections.containsSection("All")) {
        sp = getServiceProvider();
    }
    if (sections.containsSection("ServiceIdentification") || sections.containsSection("All")) {
        si = getServiceIdentification();
    }
    if (sections.containsSection("OperationsMetadata") || sections.containsSection("All")) {
        om = getOperationsMetadata();
    }
    // if the user does not request the contents section we can return the result.
    if (sections.containsSection("Contents") || sections.containsSection("All")) {
        ct = contents;
    }
    return new CapabilitiesType(si, sp, om, "2.0.1", getUpdateSequence(), ct, getServiceMetadata());
}
Also used : OperationsMetadata(org.geotoolkit.ows.xml.v200.OperationsMetadata) SectionsType(org.geotoolkit.ows.xml.v200.SectionsType) ServiceProvider(org.geotoolkit.ows.xml.v200.ServiceProvider) ServiceIdentification(org.geotoolkit.ows.xml.v200.ServiceIdentification)

Example 3 with OperationsMetadata

use of org.geotoolkit.ows.xml.v110.OperationsMetadata in project geotoolkit by Geomatys.

the class Capabilities method applySections.

@Override
public AbstractCapabilitiesCore applySections(final Sections sections) {
    // we prepare the different parts response document
    ServiceIdentification si = null;
    ServiceProvider sp = null;
    OperationsMetadata om = null;
    FilterCapabilities fc = null;
    Contents cont = null;
    // we enter the information for service identification.
    if (sections.containsSection("ServiceIdentification") || sections.containsSection("All")) {
        si = getServiceIdentification();
    }
    // we enter the information for service provider.
    if (sections.containsSection("ServiceProvider") || sections.containsSection("All")) {
        sp = getServiceProvider();
    }
    // we enter the operation Metadata
    if (sections.containsSection("OperationsMetadata") || sections.containsSection("All")) {
        om = getOperationsMetadata();
    }
    // we enter the information filter capablities.
    if (sections.containsSection("Filter_Capabilities") || sections.containsSection("All")) {
        fc = filterCapabilities;
    }
    if (sections.containsSection("Contents") || sections.containsSection("All")) {
        cont = contents;
    }
    // we build and normalize the document
    return new Capabilities(si, sp, om, "1.0.0", getUpdateSequence(), fc, cont);
}
Also used : OperationsMetadata(org.geotoolkit.ows.xml.v110.OperationsMetadata) ServiceProvider(org.geotoolkit.ows.xml.v110.ServiceProvider) ServiceIdentification(org.geotoolkit.ows.xml.v110.ServiceIdentification)

Example 4 with OperationsMetadata

use of org.geotoolkit.ows.xml.v110.OperationsMetadata in project geotoolkit by Geomatys.

the class CapabilitiesType method applySections.

@Override
public AbstractCapabilitiesCore applySections(final Sections sections) {
    // we prepare the different parts response document
    ServiceIdentification si = null;
    ServiceProvider sp = null;
    OperationsMetadata om = null;
    FilterCapabilities fc = null;
    ContentsType cont = null;
    // we enter the information for service identification.
    if (sections.containsSection("ServiceIdentification") || sections.containsSection("All")) {
        si = getServiceIdentification();
    }
    // we enter the information for service provider.
    if (sections.containsSection("ServiceProvider") || sections.containsSection("All")) {
        sp = getServiceProvider();
    }
    // we enter the operation Metadata
    if (sections.containsSection("OperationsMetadata") || sections.containsSection("All")) {
        om = getOperationsMetadata();
    }
    // we enter the information filter capablities.
    if (sections.containsSection("Filter_Capabilities") || sections.containsSection("All")) {
        fc = filterCapabilities;
    }
    if (sections.containsSection("Contents") || sections.containsSection("All")) {
        if (contents != null) {
            cont = contents.contents;
        }
    }
    // we build and normalize the document
    return new CapabilitiesType(si, sp, om, "2.0.0", getUpdateSequence(), fc, cont, extension);
}
Also used : OperationsMetadata(org.geotoolkit.ows.xml.v110.OperationsMetadata) ServiceProvider(org.geotoolkit.ows.xml.v110.ServiceProvider) ServiceIdentification(org.geotoolkit.ows.xml.v110.ServiceIdentification)

Example 5 with OperationsMetadata

use of org.geotoolkit.ows.xml.v110.OperationsMetadata in project geotoolkit by Geomatys.

the class CapabilitiesType method applySections.

@Override
public CapabilitiesType applySections(final Sections sections) {
    ServiceIdentification si = null;
    ServiceProvider sp = null;
    OperationsMetadata om = null;
    // we enter the information for service identification.
    if (sections.containsSection("ServiceIdentification") || sections.containsSection("All")) {
        si = getServiceIdentification();
    }
    // we enter the information for service provider.
    if (sections.containsSection("ServiceProvider") || sections.containsSection("All")) {
        sp = getServiceProvider();
    }
    // we enter the operation Metadata
    if (sections.containsSection("OperationsMetadata") || sections.containsSection("All")) {
        om = getOperationsMetadata();
    }
    return new CapabilitiesType(si, sp, om, "2.0.2", getUpdateSequence());
}
Also used : OperationsMetadata(org.geotoolkit.ows.xml.v100.OperationsMetadata) ServiceProvider(org.geotoolkit.ows.xml.v100.ServiceProvider) ServiceIdentification(org.geotoolkit.ows.xml.v100.ServiceIdentification)

Aggregations

Operation (net.opengis.ows.v_1_0_0.Operation)6 OperationsMetadata (net.opengis.ows.v_1_0_0.OperationsMetadata)6 ArrayList (java.util.ArrayList)5 DomainType (net.opengis.ows.v_1_0_0.DomainType)5 OperationsMetadata (org.geotoolkit.ows.xml.v100.OperationsMetadata)5 OperationsMetadata (org.geotoolkit.ows.xml.v110.OperationsMetadata)5 ServiceIdentification (org.geotoolkit.ows.xml.v110.ServiceIdentification)5 ServiceProvider (org.geotoolkit.ows.xml.v110.ServiceProvider)5 ServiceIdentification (org.geotoolkit.ows.xml.v100.ServiceIdentification)3 ServiceProvider (org.geotoolkit.ows.xml.v100.ServiceProvider)3 Capabilities (org.geotoolkit.csw.xml.v202.Capabilities)2 DocumentType (org.geotoolkit.inspire.xml.DocumentType)2 InspireCapabilitiesType (org.geotoolkit.inspire.xml.InspireCapabilitiesType)2 LanguagesType (org.geotoolkit.inspire.xml.LanguagesType)2 MultiLingualCapabilities (org.geotoolkit.inspire.xml.MultiLingualCapabilities)2 TranslatedCapabilitiesType (org.geotoolkit.inspire.xml.TranslatedCapabilitiesType)2 OperationsMetadata (org.geotoolkit.ows.xml.v200.OperationsMetadata)2 ServiceIdentification (org.geotoolkit.ows.xml.v200.ServiceIdentification)2 Test (org.junit.Test)2 Metacard (ddf.catalog.data.Metacard)1