java.lang.Object
io.jenetics.jpx.Metadata
- All Implemented Interfaces:
Serializable
Information about the GPX file, author, and copyright restrictions goes in
the metadata section. Providing rich, meaningful information about your GPX
files allows others to search for and use your GPS data.
Creating a GPX object with one track-segment and 3 track-points:
final Metadata gpx = Metadata.builder()
.author("Franz Wilhelmstötter")
.addLink(Link.of("http://jenetics.io"))
.build();- Since:
- 1.0
- Version:
- 3.0
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder class for creating immutableMetadataobjects. -
Method Summary
Modifier and TypeMethodDescriptionstatic Metadata.Builderbuilder()Return a newMetadatabuilder.booleanReturn the person or organization who created the GPX file.Return the minimum and maximum coordinates which describe the extent of the coordinates in the file.Return the copyright and license information governing use of the file.Return a description of the contents of the GPX file.Return the (cloned) extensions document.Return the keywords associated with the file.getLinks()Return the URLs associated with the location described in the file.getName()Return the name of the GPX file.getTime()Return the creation date of the file.inthashCode()booleanisEmpty()Returntrueif all metadata properties arenullor empty.booleannonEmpty()Returntrueif not all metadata properties arenullor empty.static Metadataof(String name, String description, Person author, Copyright copyright, List<Link> links, Instant time, String keywords, Bounds bounds) Create a newMetadataobject with the given parameters.static Metadataof(String name, String description, Person author, Copyright copyright, List<Link> links, Instant time, String keywords, Bounds bounds, Document extensions) Create a newMetadataobject with the given parameters.Convert the immutable metadata object into a mutable builder initialized with the current metadata values.
-
Method Details
-
getName
Return the name of the GPX file.- Returns:
- the name of the GPX file
-
getDescription
Return a description of the contents of the GPX file.- Returns:
- a description of the contents of the GPX file
-
getAuthor
Return the person or organization who created the GPX file.- Returns:
- the person or organization who created the GPX file
-
getCopyright
Return the copyright and license information governing use of the file.- Returns:
- the copyright and license information governing use of the file
-
getLinks
Return the URLs associated with the location described in the file. The returned list immutable.- Returns:
- the URLs associated with the location described in the file
-
getTime
Return the creation date of the file.- Returns:
- the creation date of the file
-
getKeywords
Return the keywords associated with the file. Search engines or databases can use this information to classify the data.- Returns:
- the keywords associated with the file
-
getBounds
Return the minimum and maximum coordinates which describe the extent of the coordinates in the file.- Returns:
- the minimum and maximum coordinates which describe the extent of the coordinates in the file
-
getExtensions
Return the (cloned) extensions document. The root element of the returned document has the nameextensions.<extensions> ... </extensions>- Returns:
- the extensions document
- Throws:
DOMException- if the document could not be cloned, because of an erroneous XML configuration- Since:
- 1.5
-
toBuilder
Convert the immutable metadata object into a mutable builder initialized with the current metadata values.- Returns:
- a new metadata builder initialized with the values of
thismetadata - Since:
- 1.1
-
isEmpty
Returntrueif all metadata properties arenullor empty.- Returns:
trueif all metadata properties arenullor empty
-
nonEmpty
Returntrueif not all metadata properties arenullor empty.- Returns:
trueif not all metadata properties arenullor empty- Since:
- 1.1
-
hashCode
-
equals
-
builder
Return a newMetadatabuilder.- Returns:
- a new
Metadatabuilder
-
of
public static Metadata of(String name, String description, Person author, Copyright copyright, List<Link> links, Instant time, String keywords, Bounds bounds, Document extensions) Create a newMetadataobject with the given parameters.- Parameters:
name- the name of the GPX filedescription- a description of the contents of the GPX fileauthor- the person or organization who created the GPX filecopyright- copyright and license information governing use of the filelinks- URLs associated with the location described in the filetime- the creation date of the filekeywords- keywords associated with the file. Search engines or databases can use this information to classify the data.bounds- minimum and maximum coordinates which describe the extent of the coordinates in the fileextensions- the extensions document- Returns:
- a new
Metadataobject with the given parameters - Throws:
NullPointerException- if the givenlinkssequence isnull- Since:
- 1.5
-
of
public static Metadata of(String name, String description, Person author, Copyright copyright, List<Link> links, Instant time, String keywords, Bounds bounds) Create a newMetadataobject with the given parameters.- Parameters:
name- the name of the GPX filedescription- a description of the contents of the GPX fileauthor- the person or organization who created the GPX filecopyright- copyright and license information governing use of the filelinks- URLs associated with the location described in the filetime- the creation date of the filekeywords- keywords associated with the file. Search engines or databases can use this information to classify the data.bounds- minimum and maximum coordinates which describe the extent of the coordinates in the file- Returns:
- a new
Metadataobject with the given parameters - Throws:
NullPointerException- if the givenlinkssequence isnull
-