Search in sources :

Example 1 with FullInspireExtendedCapabilities

use of org.n52.shetland.inspire.dls.FullInspireExtendedCapabilities in project arctic-sea by 52North.

the class InspireEncoderTest method getFullInspireExtendedCapabilities.

private FullInspireExtendedCapabilities getFullInspireExtendedCapabilities() {
    InspireResourceLocator resourceLocator = new InspireResourceLocator("http://full.test.org/sos");
    resourceLocator.addMediaType(MediaTypes.APPLICATION_SOAP_XML);
    // -------------------
    InspireTemporalReference temporalReference = new InspireTemporalReference();
    temporalReference.setDateOfCreation(new InspireDateOfCreation(new DateTime()));
    temporalReference.setDateOfLastRevision(new InspireDateOfLastRevision(new DateTime()));
    temporalReference.addDateOfPublication(new InspireDateOfPublication(new DateTime()));
    temporalReference.addTemporalExtent(new TimeInstant(new DateTime()));
    temporalReference.addTemporalExtent(new TimePeriod(new DateTime(), new DateTime().plus(3456)));
    // -------------------
    InspireConformityCitation inspireConformityCitation = new InspireConformityCitation("Test", new InspireDateOfCreation(new DateTime()));
    InspireConformity conformity = new InspireConformity(inspireConformityCitation, InspireDegreeOfConformity.notEvaluated);
    // -------------------
    InspireMetadataPointOfContact inspireMetadataPointOfContact = new InspireMetadataPointOfContact("test", "test@test.te");
    // -------------------
    InspireOriginatingControlledVocabulary inspireOriginatingControlledVocabulary = new InspireOriginatingControlledVocabulary("Test", new InspireDateOfCreation(new DateTime()));
    InspireMandatoryKeyword inspireMandatoryKeyword = new InspireMandatoryKeyword(InspireMandatoryKeywordValue.humanServiceEditor, inspireOriginatingControlledVocabulary);
    // --------------------
    InspireSupportedLanguages inspireSupportedLanguages = new InspireSupportedLanguages(InspireLanguageISO6392B.ENG);
    // --------------------
    InspireLanguageISO6392B responseLanguage = InspireLanguageISO6392B.ENG;
    // --------------------
    InspireUniqueResourceIdentifier iuri = new InspireUniqueResourceIdentifier("test");
    iuri.setNamespace("http://test.org");
    // --------------------
    FullInspireExtendedCapabilities inspireExtendedCapabilities = new FullInspireExtendedCapabilities(resourceLocator, inspireSupportedLanguages, responseLanguage, iuri, new InspireSupportedCRS("4326"));
    inspireExtendedCapabilities.setResourceType(InspireServiceSpatialDataResourceType.service);
    inspireExtendedCapabilities.addKeyword(new InspireKeyword("test"));
    inspireExtendedCapabilities.addMandatoryKeyword(inspireMandatoryKeyword);
    // -------------------
    inspireExtendedCapabilities.setMetadataDate(new TimeInstant(new DateTime()));
    // -------------------
    inspireExtendedCapabilities.addMetadataPointOfContact(inspireMetadataPointOfContact);
    inspireExtendedCapabilities.addConformity(conformity);
    inspireExtendedCapabilities.addTemporalReference(temporalReference);
    return inspireExtendedCapabilities;
}
Also used : InspireOriginatingControlledVocabulary(org.n52.shetland.inspire.InspireOriginatingControlledVocabulary) InspireMetadataPointOfContact(org.n52.shetland.inspire.InspireMetadataPointOfContact) InspireUniqueResourceIdentifier(org.n52.shetland.inspire.InspireUniqueResourceIdentifier) TimePeriod(org.n52.shetland.ogc.gml.time.TimePeriod) InspireTemporalReference(org.n52.shetland.inspire.InspireTemporalReference) InspireLanguageISO6392B(org.n52.shetland.inspire.InspireLanguageISO6392B) InspireConformityCitation(org.n52.shetland.inspire.InspireConformityCitation) InspireKeyword(org.n52.shetland.inspire.InspireKeyword) InspireConformity(org.n52.shetland.inspire.InspireConformity) DateTime(org.joda.time.DateTime) InspireSupportedCRS(org.n52.shetland.inspire.InspireSupportedCRS) InspireDateOfLastRevision(org.n52.shetland.inspire.InspireDateOfLastRevision) InspireMandatoryKeyword(org.n52.shetland.inspire.InspireMandatoryKeyword) InspireResourceLocator(org.n52.shetland.inspire.InspireResourceLocator) InspireDateOfPublication(org.n52.shetland.inspire.InspireDateOfPublication) InspireDateOfCreation(org.n52.shetland.inspire.InspireDateOfCreation) InspireSupportedLanguages(org.n52.shetland.inspire.InspireSupportedLanguages) FullInspireExtendedCapabilities(org.n52.shetland.inspire.dls.FullInspireExtendedCapabilities) TimeInstant(org.n52.shetland.ogc.gml.time.TimeInstant)

Example 2 with FullInspireExtendedCapabilities

use of org.n52.shetland.inspire.dls.FullInspireExtendedCapabilities in project arctic-sea by 52North.

the class InspireXmlStreamWriter method writeFullInspireExtendedCapabilities.

/**
 * Write full INSPIRE DLS ExtendedCapabilities
 *
 * @param fullInspireExtendedCapabilities
 *            INSPIRE DLS ExtendedCapabilities to write
 * @throws XMLStreamException
 *             If an error occurs when writing the INSPIRE DLS
 *             ExtendedCapabilities to stream
 */
private void writeFullInspireExtendedCapabilities(FullInspireExtendedCapabilities fullInspireExtendedCapabilities) throws XMLStreamException {
    start(QN_EXTENDED_CAPABILITIES);
    writeInspireCommonNamespaces(true);
    writeInspireDLSNamespaces();
    for (InspireResourceLocator resourceLocator : fullInspireExtendedCapabilities.getResourceLocator()) {
        writeResourceLocator(resourceLocator);
    }
    writeResourceType(fullInspireExtendedCapabilities.getResourceType());
    writeTemporalReference(fullInspireExtendedCapabilities.getTemporalReferences());
    for (InspireConformity conformity : fullInspireExtendedCapabilities.getConformity()) {
        writeConformity(conformity);
    }
    for (InspireMetadataPointOfContact metadataPointOfContact : fullInspireExtendedCapabilities.getMetadataPointOfContacts()) {
        writeMetadataPointOfContact(metadataPointOfContact);
    }
    writeMetadataDate(fullInspireExtendedCapabilities.getMetadataDate());
    writeSpatialDataServiceType(fullInspireExtendedCapabilities.getSpatialDataServiceType());
    for (InspireMandatoryKeyword mandatoryKeyword : fullInspireExtendedCapabilities.getMandatoryKeywords()) {
        writeMandatoryKeyword(mandatoryKeyword);
    }
    if (fullInspireExtendedCapabilities.isSetKeywords()) {
        for (InspireKeyword keyword : fullInspireExtendedCapabilities.getKeywords()) {
            writeKeyword(keyword);
        }
    }
    writeSupportedLanguages(fullInspireExtendedCapabilities.getSupportedLanguages(), false);
    writeResponseLanguage(fullInspireExtendedCapabilities.getResponseLanguage());
    if (fullInspireExtendedCapabilities.isSetMetadataUrl()) {
        writeMetadataUrl(fullInspireExtendedCapabilities.getMetadataUrl());
    }
    for (InspireUniqueResourceIdentifier inspireUniqueResourceIdentifier : fullInspireExtendedCapabilities.getSpatialDataSetIdentifier()) {
        writeSpatialDataSetIdentifier(inspireUniqueResourceIdentifier);
    }
    writeSupportedCRS(fullInspireExtendedCapabilities.getSupportedCRS(), false);
    end(QN_EXTENDED_CAPABILITIES);
}
Also used : InspireMetadataPointOfContact(org.n52.shetland.inspire.InspireMetadataPointOfContact) InspireMandatoryKeyword(org.n52.shetland.inspire.InspireMandatoryKeyword) InspireUniqueResourceIdentifier(org.n52.shetland.inspire.InspireUniqueResourceIdentifier) InspireResourceLocator(org.n52.shetland.inspire.InspireResourceLocator) InspireKeyword(org.n52.shetland.inspire.InspireKeyword) InspireConformity(org.n52.shetland.inspire.InspireConformity)

Aggregations

InspireConformity (org.n52.shetland.inspire.InspireConformity)2 InspireKeyword (org.n52.shetland.inspire.InspireKeyword)2 InspireMandatoryKeyword (org.n52.shetland.inspire.InspireMandatoryKeyword)2 InspireMetadataPointOfContact (org.n52.shetland.inspire.InspireMetadataPointOfContact)2 InspireResourceLocator (org.n52.shetland.inspire.InspireResourceLocator)2 InspireUniqueResourceIdentifier (org.n52.shetland.inspire.InspireUniqueResourceIdentifier)2 DateTime (org.joda.time.DateTime)1 InspireConformityCitation (org.n52.shetland.inspire.InspireConformityCitation)1 InspireDateOfCreation (org.n52.shetland.inspire.InspireDateOfCreation)1 InspireDateOfLastRevision (org.n52.shetland.inspire.InspireDateOfLastRevision)1 InspireDateOfPublication (org.n52.shetland.inspire.InspireDateOfPublication)1 InspireLanguageISO6392B (org.n52.shetland.inspire.InspireLanguageISO6392B)1 InspireOriginatingControlledVocabulary (org.n52.shetland.inspire.InspireOriginatingControlledVocabulary)1 InspireSupportedCRS (org.n52.shetland.inspire.InspireSupportedCRS)1 InspireSupportedLanguages (org.n52.shetland.inspire.InspireSupportedLanguages)1 InspireTemporalReference (org.n52.shetland.inspire.InspireTemporalReference)1 FullInspireExtendedCapabilities (org.n52.shetland.inspire.dls.FullInspireExtendedCapabilities)1 TimeInstant (org.n52.shetland.ogc.gml.time.TimeInstant)1 TimePeriod (org.n52.shetland.ogc.gml.time.TimePeriod)1