Class Link
java.lang.Object
org.apache.sis.internal.storage.gpx.Link
- All Implemented Interfaces:
org.opengis.metadata.citation.OnlineResource
A link to an external resource (Web page, digital photo, video clip, etc) with additional information.
This element provides 3 properties:
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:
- 0.8
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) final void
afterUnmarshal
(Unmarshaller um, Object parent) Invoked by JAXB after unmarshalling.static Link
castOrCopy
(org.opengis.metadata.citation.OnlineResource r, Locale locale) Returns the given ISO 19115 metadata as aLink
instance.boolean
Compares thisLink
with the given object for equality.ISO 19115 metadata property not specified by GPX.org.opengis.util.InternationalString
ISO 19115 metadata property not specified by GPX.org.opengis.metadata.citation.OnLineFunction
ISO 19115 metadata property not specified by GPX.ISO 19115 metadata property determined by theuri
field.getName()
ISO 19115 metadata property determined by thetext
field.ISO 19115 metadata property not specified by GPX.int
hashCode()
Returns a hash code value for thisLink
.toString()
(package private) static Link
Creates a new instance initialized to the given URI.
-
Field Details
-
uri
URL of hyper-link.- See Also:
-
text
Text of hyper-link.- See Also:
-
type
MIME type of content (for example "image/jpeg").
-
-
Constructor Details
-
Link
public Link()Creates an initially empty instance. Callers should set at least theuri
field after construction. -
Link
Creates a new instance initialized to the given URI.- Parameters:
uri
- the URI.
-
Link
Copies properties from the given ISO 19115 metadata.
-
-
Method Details
-
valueOf
Creates a new instance initialized to the given URI.- Parameters:
uri
- the URI, ornull
.- Returns:
- the link, or
null
if the given URI was null.
-
afterUnmarshal
Invoked by JAXB after unmarshalling. If the uri is not set but thetext
looks like a URI, uses that text. The intent is to handle link that should have been defined like below: but instead has erroneously been defined like below: If we fail to convert the text to a URI, we will leave the object state as-is. -
castOrCopy
Returns the given ISO 19115 metadata as aLink
instance. This method copies the data only if needed.- Parameters:
r
- the ISO 19115 metadata, ornull
.locale
- the locale to use for localized strings.- Returns:
- the GPX metadata, or
null
.
-
getLinkage
ISO 19115 metadata property determined by theuri
field.- Specified by:
getLinkage
in interfaceorg.opengis.metadata.citation.OnlineResource
- Returns:
- location for on-line access using a URL address or similar scheme.
-
getProtocol
ISO 19115 metadata property not specified by GPX.- Specified by:
getProtocol
in interfaceorg.opengis.metadata.citation.OnlineResource
- Returns:
- connection protocol to be used.
-
getApplicationProfile
ISO 19115 metadata property not specified by GPX.- Specified by:
getApplicationProfile
in interfaceorg.opengis.metadata.citation.OnlineResource
- Returns:
- application profile that can be used with the online resource.
-
getName
ISO 19115 metadata property determined by thetext
field.- Specified by:
getName
in interfaceorg.opengis.metadata.citation.OnlineResource
- Returns:
- name of the online resource.
-
getDescription
public org.opengis.util.InternationalString getDescription()ISO 19115 metadata property not specified by GPX.- Specified by:
getDescription
in interfaceorg.opengis.metadata.citation.OnlineResource
- Returns:
- text description of what the online resource is/does.
-
getFunction
public org.opengis.metadata.citation.OnLineFunction getFunction()ISO 19115 metadata property not specified by GPX.- Specified by:
getFunction
in interfaceorg.opengis.metadata.citation.OnlineResource
- Returns:
- function performed by the online resource.
-
equals
Compares thisLink
with the given object for equality. -
hashCode
public int hashCode()Returns a hash code value for thisLink
. -
toString
-