public class InspireXmlStreamWriter extends XmlStreamWriter<InspireObject> implements InspireConstants
Modifier and Type | Field and Description |
---|---|
private InspireObject |
inspireObject |
indent, out, XML_FRAGMENT, XML_VERSION
EN_CODE, EN_CONFORMITY, EN_CRS, EN_DATE_OF_CREATION, EN_DATE_OF_LAST_REVISION, EN_DATE_OF_PUBLICATION, EN_DEFAULT_CRS, EN_DEFAULT_LANGUAGE, EN_DEGREE, EN_EMAIL_ADDRESS, EN_END_DATE, EN_EXTENDED_CAPABILITIES, EN_INDIVIDUAL_DATE, EN_INTERVAL_OF_DATES, EN_KEYWORD, EN_KEYWORD_VALUE, EN_LANGUAGE, EN_MANDATORY_KEYWORD, EN_MEDIA_TYPE, EN_METADATA_DATE, EN_METADATA_POINT_OF_CONTACT, EN_METADATA_URL, EN_NAMESPACE, EN_ORGANISATION_NAME, EN_ORIGINATING_CONTROLLED_VOCABULARY, EN_OTHER_CRS, EN_RESOURCE_LOCATOR, EN_RESOURCE_TYPE, EN_RESPONSE_LANGUAGE, EN_SPATIAL_DATA_SERVICE_TYPE, EN_SPATIAL_DATASET_IDENTIFIER, EN_SPECIFICATION, EN_STARTING_DATE, EN_SUPPORTED_CRS, EN_SUPPORTED_LANGUAGE, EN_SUPPORTED_LANGUAGES, EN_TEMPORAL_EXTENT, EN_TEMPORAL_REFERENCE, EN_TITLE, EN_URI, EN_URL, INSPIRE, INSPIRE_COMMON_10_SCHEMA_LOCATION, INSPIRE_DLS_10_SCHEMA_LOCATION, NS_INSPIRE_COMMON, NS_INSPIRE_COMMON_PREFIX, NS_INSPIRE_DLS, NS_INSPIRE_DLS_PREFIX, QN_CODE, QN_CONFORMITY, QN_CRS, QN_DATE_OF_CREATION, QN_DATE_OF_LAST_REVISION, QN_DATE_OF_PUBLICATION, QN_DEFAULT_CRS, QN_DEFAULT_LANGUAGE, QN_DEGREE, QN_EMAIL_ADDRESS, QN_END_DATE, QN_EXTENDED_CAPABILITIES, QN_INDIVIDUAL_DATE, QN_INTERVAL_OF_DATES, QN_KEYWORD, QN_KEYWORD_VALUE, QN_LANGUAGE, QN_MANDATORY_KEYWORD, QN_MEDIA_TYPE, QN_METADATA_DATE, QN_METADATA_POINT_OF_CONTACT, QN_METADATA_URL, QN_NAMESPACE, QN_ORGANISATION_NAME, QN_ORIGINATING_CONTROLLED_VOCABULARY, QN_OTHER_CRS, QN_RESOURCE_LOCATOR, QN_RESOURCE_TYPE, QN_RESPONSE_LANGUAGE, QN_SPATIAL_DATA_SERVICE_TYPE, QN_SPATIAL_DATASET_IDENTIFIER, QN_SPECIFICATION, QN_STARTING_DATE, QN_SUPPORTED_CRS, QN_SUPPORTED_LANGUAGE, QN_SUPPORTED_LANGUAGES, QN_TEMPORAL_EXTENT, QN_TEMPORAL_REFERENCE, QN_TITLE, QN_URI, QN_URL, SCHEMA_LOCATION_URL_INSPIRE_COMMON, SCHEMA_LOCATION_URL_INSPIRE_DLS
Constructor and Description |
---|
InspireXmlStreamWriter(InspireObject inspireObject)
constructor
|
Modifier and Type | Method and Description |
---|---|
private InspireObject |
getInspireObject()
Get the INSPIRE DLS ExtendedCapabilities to write
|
private void |
setInspireObject(InspireObject inspireObject)
Get the INSPIRE object to write
|
void |
write(InspireObject elementToStream,
OutputStream out)
Encode and write the elementToStream to the
OutputStream |
void |
write(InspireObject elementToStream,
OutputStream out,
EncodingValues encodingValues)
Encode and write the elementToStream to the
OutputStream |
void |
write(OutputStream out)
Encode and write element to the
OutputStream |
void |
write(OutputStream out,
EncodingValues encodingValues)
Encode and write element to the
OutputStream |
private void |
writeCitationContent(InspireCitation citation)
Write
InspireCitation to stream |
private void |
writeCode(String code)
Write code element to stream
|
private void |
writeConformity(InspireConformity conformity)
Write
InspireConformity to stream |
private void |
writeCRS(String crs)
Write CRS string to stream
|
private void |
writeDateOf(InspireDateOf dateOf)
Write
InspireDateOf to stream |
private void |
writeDateOfCreation(InspireDateOfCreation dateOf)
Write
InspireDateOfCreation to stream |
private void |
writeDateOfLastRevision(InspireDateOfLastRevision dateOf)
Write
InspireDateOfLastRevision to stream |
private void |
writeDateOfPublication(InspireDateOfPublication dateOf)
Write
InspireDateOfPublication to stream |
private void |
writeDefaultCRS(String crs)
Write default CRS string as default CRS element to stream
|
private void |
writeDefaultLanguage(InspireLanguageISO6392B defaultLanguage)
Write
InspireLanguageISO6392B as default language element to
stream |
private void |
writeDegree(InspireConformity.InspireDegreeOfConformity inspireDegreeOfConformity)
Write
InspireConformity.InspireDegreeOfConformity to stream |
private void |
writeEmailAddress(String emailAddress)
Write email address element to stream
|
private void |
writeEndDate(TimePosition time)
Write
TimePosition as end date element to stream |
private void |
writeFullInspireExtendedCapabilities(FullInspireExtendedCapabilities fullInspireExtendedCapabilities)
Write full INSPIRE DLS ExtendedCapabilities
|
private void |
writeIndividualDate(TimeInstant time)
Write
TimeInstant as individual date element to stream |
private void |
writeInspireCommonNamespaces(boolean root)
Write namespaces to stream
|
private void |
writeInspireDLSNamespaces()
Write namespaces to stream
|
private void |
writeIntervalOfTime(TimePeriod time)
Write
TimePeriod as interval of dates element to stream |
private void |
writeKeyword(InspireKeyword keyword)
Write
InspireKeyword to stream |
private void |
writeKeywordValue(InspireMandatoryKeywordValue keywordValue)
Write
InspireMandatoryKeywordValue to stream |
private void |
writeKeywordValue(String keywordValue)
Write keyword value element to stream
|
private void |
writeLanguage(InspireLanguageISO6392B language)
Write
InspireLanguageISO6392B to stream |
private void |
writeMandatoryKeyword(InspireMandatoryKeyword mandatoryKeyword)
Write
InspireMandatoryKeyword to stream |
private void |
writeMediaType(MediaType mediaType)
Write
MediaType to stream |
private void |
writeMetadataDate(TimeInstant metadataDate)
Write
TimeInstant as metadata date element to stream |
private void |
writeMetadataPointOfContact(InspireMetadataPointOfContact metadataPointOfContact)
Write
InspireMetadataPointOfContact to stream |
private void |
writeMetadataUrl(InspireResourceLocator metadataUrl)
Write
InspireResourceLocator as metadata URL element to stream |
private void |
writeMinimlaInspireExtendedCapabilities(MinimalInspireExtendedCapabilities minimalInspireExtendedCapabilities)
Write minimal INSPIRE DLS ExtendedCapabilities
|
private void |
writeNamespace(String namespace)
Write namespace element to stream
|
private void |
writeOrganisationName(String organisationName)
Write organisation name element to stream
|
private void |
writeOriginatingControlledVocabulary(InspireOriginatingControlledVocabulary originatingControlledVocabulary)
Write
InspireOriginatingControlledVocabulary to stream |
private void |
writeOtherCRS(String crs)
Write CRS string as other CRS element to stream
|
private void |
writeResourceLocator(InspireResourceLocator resourceLocator)
Write
InspireResourceLocator to stream |
private void |
writeResourceLocatorContent(InspireResourceLocator resourceLocator)
Write
InspireResourceLocator to stream |
private void |
writeResourceType(InspireCapabilities.InspireServiceSpatialDataResourceType resourceType)
Write
InspireCapabilities.InspireServiceSpatialDataResourceType as resource type
element to stream |
private void |
writeResponseLanguage(InspireLanguageISO6392B responseLanguage)
Write
InspireLanguageISO6392B as response language element to
stream |
private void |
writeSpatialDataServiceType(InspireCapabilities.InspireSpatialDataServiceType spatialDataServiceType)
Write
InspireCapabilities.InspireSpatialDataServiceType to stream |
private void |
writeSpatialDataSetIdentifier(InspireUniqueResourceIdentifier inspireUniqueResourceIdentifier)
Write
InspireUniqueResourceIdentifier as spatial dataset
identifier element to stream |
private void |
writeSpecification(InspireConformityCitation inspireSpecification)
Write
InspireConformityCitation as specification element to
stream |
private void |
writeStartingDate(TimePosition time)
Write
TimePosition as starting date element to stream |
private void |
writeSupportedCRS(InspireSupportedCRS supportedCRSes,
boolean root)
Write
InspireSupportedCRS to stream |
private void |
writeSupportedLanguage(InspireLanguageISO6392B supportedLanguage)
Write
InspireLanguageISO6392B as supported language element to
stream |
private void |
writeSupportedLanguages(InspireSupportedLanguages supportedLanguages,
boolean root)
Write
InspireSupportedLanguages to stream |
private void |
writeTemporalExtent(Time temporalExtent)
Write
Time as temporal extent element to stream |
private void |
writeTemporalReference(InspireTemporalReference temporalReference)
Write
InspireTemporalReference to stream |
private void |
writeTemporalReference(List<InspireTemporalReference> temporalReferences)
Write
InspireTemporalReference to stream |
private void |
writeTitle(String title)
Write title element to stream
|
private void |
writeUniqueResourceIdentifierContent(InspireUniqueResourceIdentifier uniqueResourceIdentifier)
Write
InspireUniqueResourceIdentifier to stream |
private void |
writeURI(String url)
Write URI element to stream
|
private void |
writeUrl(String url)
Write URL element to stream
|
attr, attr, attr, chars, chars, empty, end, end, endInline, finish, flush, getXmlWriter, init, namespace, start, start
addXlinkHrefAttr, addXlinkTitleAttr, getOutputStream, getReplacement, getXmlOutputFactory, init, init, init, rawText, schemaLocation, time, time, writeIndent, writeNewLine, writeXmlObject
private InspireObject inspireObject
public InspireXmlStreamWriter(InspireObject inspireObject)
inspireObject
- SOS internal representation of the INSPIRE object to encodepublic void write(OutputStream out) throws XMLStreamException, DateTimeFormatException
XmlWriter
OutputStream
write
in class XmlWriter<XMLStreamWriter,InspireObject>
out
- OutputStream to write the encoded elementXMLStreamException
- If an error occurs when writing to OutputStream
DateTimeFormatException
public void write(OutputStream out, EncodingValues encodingValues) throws XMLStreamException, OwsExceptionReport
XmlWriter
OutputStream
write
in class XmlWriter<XMLStreamWriter,InspireObject>
out
- OutputStream to write the encoded elementencodingValues
- EncodingValues
with additional informationXMLStreamException
- If an error occurs when writing to OutputStream
OwsExceptionReport
- If an encoding error occurspublic void write(InspireObject elementToStream, OutputStream out) throws XMLStreamException, OwsExceptionReport
XmlWriter
OutputStream
write
in class XmlWriter<XMLStreamWriter,InspireObject>
elementToStream
- Element to encode and write to streamout
- OutputStream to write the encoded elementXMLStreamException
- If an error occurs when writing to OutputStream
OwsExceptionReport
- If an encoding error occurspublic void write(InspireObject elementToStream, OutputStream out, EncodingValues encodingValues) throws XMLStreamException, OwsExceptionReport
XmlWriter
OutputStream
write
in class XmlWriter<XMLStreamWriter,InspireObject>
elementToStream
- Element to encode and write to streamout
- OutputStream to write the encoded elementencodingValues
- EncodingValues
with additional informationXMLStreamException
- If an error occurs when writing to OutputStream
OwsExceptionReport
- If an encoding error occursprivate InspireObject getInspireObject()
private void setInspireObject(InspireObject inspireObject)
inspireObject
- the INSPIRE object to setprivate void writeMinimlaInspireExtendedCapabilities(MinimalInspireExtendedCapabilities minimalInspireExtendedCapabilities) throws XMLStreamException
minimalInspireExtendedCapabilities
- INSPIRE DLS ExtendedCapabilities to writeXMLStreamException
- If an error occurs when writing the INSPIRE DLS
ExtendedCapabilities to streamprivate void writeFullInspireExtendedCapabilities(FullInspireExtendedCapabilities fullInspireExtendedCapabilities) throws XMLStreamException
fullInspireExtendedCapabilities
- INSPIRE DLS ExtendedCapabilities to writeXMLStreamException
- If an error occurs when writing the INSPIRE DLS
ExtendedCapabilities to streamprivate void writeCitationContent(InspireCitation citation) throws XMLStreamException
InspireCitation
to streamcitation
- InspireCitation
to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeCode(String code) throws XMLStreamException
code
- element valueXMLStreamException
- If an error occurs when writing the object to streamprivate void writeConformity(InspireConformity conformity) throws XMLStreamException
InspireConformity
to streamconformity
- InspireConformity
to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeDefaultLanguage(InspireLanguageISO6392B defaultLanguage) throws XMLStreamException
InspireLanguageISO6392B
as default language element to
streamdefaultLanguage
- InspireLanguageISO6392B
to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeDegree(InspireConformity.InspireDegreeOfConformity inspireDegreeOfConformity) throws XMLStreamException
InspireConformity.InspireDegreeOfConformity
to streaminspireDegreeOfConformity
- InspireConformity.InspireDegreeOfConformity
to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeDateOf(InspireDateOf dateOf) throws XMLStreamException
InspireDateOf
to streamdateOf
- InspireDateOf
to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeDateOfPublication(InspireDateOfPublication dateOf) throws XMLStreamException
InspireDateOfPublication
to streamdateOf
- InspireDateOfPublication
to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeDateOfCreation(InspireDateOfCreation dateOf) throws XMLStreamException
InspireDateOfCreation
to streamdateOf
- InspireDateOfCreation
to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeDateOfLastRevision(InspireDateOfLastRevision dateOf) throws XMLStreamException
InspireDateOfLastRevision
to streamdateOf
- InspireDateOfLastRevision
to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeEmailAddress(String emailAddress) throws XMLStreamException
emailAddress
- email adress element to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeEndDate(TimePosition time) throws XMLStreamException
TimePosition
as end date element to streamtime
- TimePosition
to write as end date element to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeIndividualDate(TimeInstant time) throws XMLStreamException
TimeInstant
as individual date element to streamtime
- TimeInstant
to write as individual date element to
streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeInspireDLSNamespaces() throws XMLStreamException
root
- indicator if this is a root element and namespaces should be
addedXMLStreamException
- If an error occurs when writing the object to streamprivate void writeInspireCommonNamespaces(boolean root) throws XMLStreamException
root
- indicator if this is a root element and namespaces should be
addedXMLStreamException
- If an error occurs when writing the object to streamprivate void writeIntervalOfTime(TimePeriod time) throws XMLStreamException
TimePeriod
as interval of dates element to streamtime
- TimePeriod
to write as interval of dates element to
streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeKeyword(InspireKeyword keyword) throws XMLStreamException
InspireKeyword
to streamkeyword
- InspireKeyword
to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeKeywordValue(String keywordValue) throws XMLStreamException
keywordValue
- keyword value element to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeKeywordValue(InspireMandatoryKeywordValue keywordValue) throws XMLStreamException
InspireMandatoryKeywordValue
to streamkeywordValue
- InspireMandatoryKeywordValue
to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeLanguage(InspireLanguageISO6392B language) throws XMLStreamException
InspireLanguageISO6392B
to streamlanguage
- InspireLanguageISO6392B
to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeMandatoryKeyword(InspireMandatoryKeyword mandatoryKeyword) throws XMLStreamException
InspireMandatoryKeyword
to streammandatoryKeyword
- InspireMandatoryKeyword
to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeMediaType(MediaType mediaType) throws XMLStreamException
MediaType
to streammediaType
- MediaType
to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeMetadataDate(TimeInstant metadataDate) throws XMLStreamException
TimeInstant
as metadata date element to streammetadataDate
- TimeInstant
to write as metadata date element to
streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeMetadataPointOfContact(InspireMetadataPointOfContact metadataPointOfContact) throws XMLStreamException
InspireMetadataPointOfContact
to streammetadataPointOfContact
- InspireMetadataPointOfContact
to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeMetadataUrl(InspireResourceLocator metadataUrl) throws XMLStreamException
InspireResourceLocator
as metadata URL element to streammetadataUrl
- InspireResourceLocator
to write as metadata URL
element to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeNamespace(String namespace) throws XMLStreamException
namespace
- namespace element value to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeOriginatingControlledVocabulary(InspireOriginatingControlledVocabulary originatingControlledVocabulary) throws XMLStreamException
InspireOriginatingControlledVocabulary
to streamoriginatingControlledVocabulary
- InspireOriginatingControlledVocabulary
to write to
streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeOrganisationName(String organisationName) throws XMLStreamException
organisationName
- organisation name element value to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeResponseLanguage(InspireLanguageISO6392B responseLanguage) throws XMLStreamException
InspireLanguageISO6392B
as response language element to
streamresponseLanguage
- InspireLanguageISO6392B
to write as response language
element to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeResourceLocatorContent(InspireResourceLocator resourceLocator) throws XMLStreamException
InspireResourceLocator
to streamresourceLocator
- InspireResourceLocator
to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeResourceLocator(InspireResourceLocator resourceLocator) throws XMLStreamException
InspireResourceLocator
to streamresourceLocator
- InspireResourceLocator
to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeResourceType(InspireCapabilities.InspireServiceSpatialDataResourceType resourceType) throws XMLStreamException
InspireCapabilities.InspireServiceSpatialDataResourceType
as resource type
element to streamresourceType
- InspireCapabilities.InspireServiceSpatialDataResourceType
to write as
resource type element to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeSupportedLanguages(InspireSupportedLanguages supportedLanguages, boolean root) throws XMLStreamException
InspireSupportedLanguages
to streamsupportedLanguages
- InspireSupportedLanguages
to write to streamroot
- indicator if this is a root element and namespaces should be
addedXMLStreamException
- If an error occurs when writing the object to streamprivate void writeSpatialDataServiceType(InspireCapabilities.InspireSpatialDataServiceType spatialDataServiceType) throws XMLStreamException
InspireCapabilities.InspireSpatialDataServiceType
to streamspatialDataServiceType
- InspireCapabilities.InspireSpatialDataServiceType
to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeSpatialDataSetIdentifier(InspireUniqueResourceIdentifier inspireUniqueResourceIdentifier) throws XMLStreamException
InspireUniqueResourceIdentifier
as spatial dataset
identifier element to streaminspireUniqueResourceIdentifier
- InspireUniqueResourceIdentifier
to write as spatial
dataset identifier element to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeSpecification(InspireConformityCitation inspireSpecification) throws XMLStreamException
InspireConformityCitation
as specification element to
streaminspireSpecification
- InspireConformityCitation
to write as specification
element to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeStartingDate(TimePosition time) throws XMLStreamException
TimePosition
as starting date element to streamtime
- TimePosition
to write as starting date element to
streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeSupportedLanguage(InspireLanguageISO6392B supportedLanguage) throws XMLStreamException
InspireLanguageISO6392B
as supported language element to
streamsupportedLanguage
- InspireLanguageISO6392B
to write as supported language
element to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeTemporalExtent(Time temporalExtent) throws XMLStreamException
Time
as temporal extent element to streamtemporalExtent
- Time
to write as temporal extent element to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeTemporalReference(InspireTemporalReference temporalReference) throws XMLStreamException
InspireTemporalReference
to streamtemporalReference
- InspireTemporalReference
to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeTemporalReference(List<InspireTemporalReference> temporalReferences) throws XMLStreamException
InspireTemporalReference
to streamtemporalReferences
- InspireTemporalReference
to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeTitle(String title) throws XMLStreamException
title
- title element value to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeUniqueResourceIdentifierContent(InspireUniqueResourceIdentifier uniqueResourceIdentifier) throws XMLStreamException
InspireUniqueResourceIdentifier
to streamuniqueResourceIdentifier
- InspireUniqueResourceIdentifier
to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeURI(String url) throws XMLStreamException
url
- URI element value to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeUrl(String url) throws XMLStreamException
url
- URL element value to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeSupportedCRS(InspireSupportedCRS supportedCRSes, boolean root) throws XMLStreamException
InspireSupportedCRS
to streamsupportedCRSs
- InspireSupportedCRS
to write to streamroot
- indicator if this is a root element and namespaces should be
addedXMLStreamException
- If an error occurs when writing the object to streamprivate void writeDefaultCRS(String crs) throws XMLStreamException
defaultCRS
- default CRS string to write to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeOtherCRS(String crs) throws XMLStreamException
crs
- CRS string to write as other CRS element to streamXMLStreamException
- If an error occurs when writing the object to streamprivate void writeCRS(String crs) throws XMLStreamException
CRS
- CRS string to write to streamXMLStreamException
- If an error occurs when writing the object to streamCopyright © 2012-2015 52north.org. All Rights Reserved.