Class Metadata
java.lang.Object
org.apache.sis.internal.simple.SimpleMetadata
org.apache.sis.internal.storage.gpx.Metadata
- All Implemented Interfaces:
org.opengis.metadata.citation.Citation
,org.opengis.metadata.identification.DataIdentification
,org.opengis.metadata.identification.Identification
,org.opengis.metadata.Metadata
Information about the GPX file, author, and copyright restrictions.
This is the root of the
<metadata>
element in a GPX file.
At most one such element may appear in the document.
The XML content is like below:
Those properties can be read or modified directly. All methods defined in this class are bridges to
the ISO 19115 metadata model and can be ignored if the user only wants to manipulate the GPX model.- Since:
- 0.8
- Version:
- 1.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe person or organization who created the GPX file.Minimum and maximum coordinates which describe the extent of the coordinates in the file.Copyright and license information governing use of the file.The creator of the GPX file.A description of the contents of the GPX file.private org.opengis.metadata.distribution.Format
The format returned bygetResourceFormats()
, created when first needed.Keywords associated with the file, ornull
if unspecified.URLs associated with the location described in the file, ornull
if none.The name of the GPX file.(package private) Store
The data store that created this metadata, ornull
if none.The creation date of the file. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static <T> List
<T> addIfNonNull
(List<T> list, T element) Adds the given element to the given list if non null, or do nothing otherwise.private static void
append
(TableAppender table, String label, Object value) Appends a row to the given table if the given value is non-null.private static void
append
(TableAppender table, String label, List<?> values, String separator) Appends a multi-values to the given table if the given list is non-null.static Metadata
castOrCopy
(org.opengis.metadata.Metadata md, Locale locale) Returns the given ISO 19115 metadata as aMetadata
instance.boolean
Compares thisMetadata
with the given object for equality.org.opengis.util.InternationalString
ISO 19115 metadata property determined by thedescription
field.Collection
<org.opengis.metadata.content.ContentInformation> Names of features types available for the GPX format, or an empty list if none.Collection
<org.opengis.metadata.citation.CitationDate> getDates()
ISO 19115 metadata property determined by thetime
field.Collection
<org.opengis.metadata.identification.Keywords> ISO 19115 metadata property determined by thekeywords
field.Collection
<org.opengis.metadata.extent.Extent> ISO 19115 metadata property determined by thebounds
field.Collection
<org.opengis.metadata.citation.ResponsibleParty> ISO 19115 metadata property determined by theauthor
field.Collection
<org.opengis.referencing.ReferenceSystem> Description of the spatial and temporal reference systems used in the dataset.Collection
<org.opengis.metadata.constraint.Constraints> ISO 19115 metadata property determined by thecopyright
field.Collection
<org.opengis.metadata.distribution.Format> Description of the format of the resource(s).org.opengis.util.InternationalString
getTitle()
ISO 19115 metadata property determined by thename
field.int
hashCode()
Returns a hash code value for thisMetadata
.toString()
Returns a string representation of this metadata object.Methods inherited from class org.apache.sis.internal.simple.SimpleMetadata
getAcquisitionInformation, getAggregationInfo, getAlternateTitles, getApplicationSchemaInfo, getCharacterSet, getCharacterSets, getCitation, getCitedResponsibleParties, getCollectiveTitle, getContacts, getCredits, getDataQualityInfo, getDataSetUri, getDateStamp, getDistributionInfo, getEdition, getEditionDate, getEnvironmentDescription, getFileIdentifier, getGraphicOverviews, getHierarchyLevelNames, getHierarchyLevels, getIdentificationInfo, getIdentifiers, getISBN, getISSN, getLanguage, getLanguages, getLocales, getMetadataConstraints, getMetadataExtensionInfo, getMetadataMaintenance, getMetadataStandardName, getMetadataStandardVersion, getOtherCitationDetails, getParentIdentifier, getPortrayalCatalogueInfo, getPresentationForms, getPurpose, getResourceMaintenances, getResourceSpecificUsages, getSeries, getSpatialRepresentationInfo, getSpatialRepresentationTypes, getSpatialResolutions, getStatus, getSupplementalInformation, getTopicCategories
-
Field Details
-
store
Store storeThe data store that created this metadata, ornull
if none. This information is used for fetching information that are constants for all GPX files, for example the feature types and the format description.This field needs to be set after construction. It cannot be set at construction time because JAXB needs to invoke a no-argument constructor.
-
creator
The creator of the GPX file. The creator is a property of the GPX node; it is not part of the content marshalled in a GPX<metadata>
element. -
name
The name of the GPX file.- See Also:
-
description
A description of the contents of the GPX file.- See Also:
-
author
The person or organization who created the GPX file.- See Also:
-
copyright
Copyright and license information governing use of the file.- See Also:
-
links
URLs associated with the location described in the file, ornull
if none. -
time
The creation date of the file.- See Also:
-
keywords
Keywords associated with the file, ornull
if unspecified. Search engines or databases can use this information to classify the data.- See Also:
-
bounds
Minimum and maximum coordinates which describe the extent of the coordinates in the file. The GPX 1.1 specification restricts the coordinate reference system to WGS84.- See Also:
-
format
private org.opengis.metadata.distribution.Format formatThe format returned bygetResourceFormats()
, created when first needed.- See Also:
-
-
Constructor Details
-
Metadata
public Metadata()Creates an initially empty metadata object. -
Metadata
Metadata(org.opengis.metadata.Metadata md, Locale locale) Copies properties from the given ISO 19115 metadata. If a property has more than one value, only the first one will be retained (except for links and keywords where multi-values are allowed).
-
-
Method Details
-
castOrCopy
Returns the given ISO 19115 metadata as aMetadata
instance. This method copies the data only if needed.- Parameters:
md
- the ISO 19115 metadata, ornull
.locale
- the locale to use for localized strings.- Returns:
- the GPX metadata, or
null
.
-
getTitle
public org.opengis.util.InternationalString getTitle()ISO 19115 metadata property determined by thename
field. This is part of the information returned bySimpleMetadata.getCitation()
.- Specified by:
getTitle
in interfaceorg.opengis.metadata.citation.Citation
- Overrides:
getTitle
in classSimpleMetadata
- Returns:
- the cited resource name.
-
getAbstract
public org.opengis.util.InternationalString getAbstract()ISO 19115 metadata property determined by thedescription
field. This is part of the information returned bySimpleMetadata.getIdentificationInfo()
.- Specified by:
getAbstract
in interfaceorg.opengis.metadata.identification.Identification
- Overrides:
getAbstract
in classSimpleMetadata
- Returns:
- brief narrative summary of the resource.
-
getDescriptiveKeywords
ISO 19115 metadata property determined by thekeywords
field. This is part of the information returned bySimpleMetadata.getIdentificationInfo()
.- Specified by:
getDescriptiveKeywords
in interfaceorg.opengis.metadata.identification.Identification
- Overrides:
getDescriptiveKeywords
in classSimpleMetadata
- Returns:
- category keywords, their type, and reference source.
-
getPointOfContacts
ISO 19115 metadata property determined by theauthor
field. This is part of the information returned bySimpleMetadata.getIdentificationInfo()
.- Specified by:
getPointOfContacts
in interfaceorg.opengis.metadata.identification.Identification
- Overrides:
getPointOfContacts
in classSimpleMetadata
- Returns:
- means of communication with person(s) and organisations(s) associated with the resource.
-
getResourceConstraints
ISO 19115 metadata property determined by thecopyright
field. This is part of the information returned bySimpleMetadata.getIdentificationInfo()
.- Specified by:
getResourceConstraints
in interfaceorg.opengis.metadata.identification.Identification
- Overrides:
getResourceConstraints
in classSimpleMetadata
- Returns:
- constraints which apply to the resource(s).
-
getExtents
ISO 19115 metadata property determined by thebounds
field. This is part of the information returned bySimpleMetadata.getIdentificationInfo()
.- Specified by:
getExtents
in interfaceorg.opengis.metadata.identification.DataIdentification
- Overrides:
getExtents
in classSimpleMetadata
- Returns:
- spatial and temporal extent of the resource.
-
getReferenceSystemInfo
Description of the spatial and temporal reference systems used in the dataset. This is fixed to WGS 84 in GPX files. We use (latitude, longitude) axis order.- Specified by:
getReferenceSystemInfo
in interfaceorg.opengis.metadata.Metadata
- Overrides:
getReferenceSystemInfo
in classSimpleMetadata
- Returns:
- WGS 84 (EPSG:4326).
-
getDates
ISO 19115 metadata property determined by thetime
field. This is part of the information returned bySimpleMetadata.getCitation()
.- Specified by:
getDates
in interfaceorg.opengis.metadata.citation.Citation
- Overrides:
getDates
in classSimpleMetadata
- Returns:
- reference dates for the cited resource.
-
getContentInfo
Names of features types available for the GPX format, or an empty list if none. This property is not part of metadata described in GPX file; it is rather a hard-coded value shared by all GPX files. Users could however filter the list of features, for example with only routes and no tracks.- Specified by:
getContentInfo
in interfaceorg.opengis.metadata.Metadata
- Overrides:
getContentInfo
in classSimpleMetadata
- Returns:
- information about the feature characteristics.
-
getResourceFormats
Description of the format of the resource(s). This is part of the information returned bySimpleMetadata.getIdentificationInfo()
.- Specified by:
getResourceFormats
in interfaceorg.opengis.metadata.identification.Identification
- Overrides:
getResourceFormats
in classSimpleMetadata
- Returns:
- description of the format of the resource(s).
-
equals
Compares thisMetadata
with the given object for equality. -
hashCode
public int hashCode()Returns a hash code value for thisMetadata
. -
toString
Returns a string representation of this metadata object. -
append
Appends a row to the given table if the given value is non-null.- Parameters:
table
- the table where to append a row.label
- the label.value
- the value, ornull
if none.
-
append
Appends a multi-values to the given table if the given list is non-null.- Parameters:
table
- the table where to append a row.label
- the label.values
- the values, ornull
if none.separator
- the separator to insert between each value.
-
addIfNonNull
Adds the given element to the given list if non null, or do nothing otherwise. This is a convenience method for storing<link>
elements in way points, routes or tracks among others.- Parameters:
list
- the list where to add the element, ornull
if not yet created.element
- the element to add, ornull
if none.- Returns:
- the list where the element has been added.
-