Interface LocationFacet
- All Superinterfaces:
org.gcube.informationsystem.base.reference.Element,org.gcube.informationsystem.model.reference.entities.Entity,org.gcube.informationsystem.base.reference.entities.EntityElement,org.gcube.informationsystem.model.reference.ERElement,org.gcube.informationsystem.model.reference.entities.Facet,org.gcube.informationsystem.base.reference.IdentifiableElement,org.gcube.informationsystem.model.reference.ModelElement,org.gcube.informationsystem.base.reference.SchemaMixedElement,Serializable
- All Known Implementing Classes:
LocationFacetImpl
@TypeMetadata(name="LocationFacet",
description="LocationFacet captures information about the geographic location characterizing the associated resource. It should not be confused with {@link CoverageFacet}. LocationFacet describes where a resource is located, optionally using GeoJSON spatial geometry. It is typically used to locate a data centre or to represent the geographic reference of a legal or organizational body acting as an actor within the infrastructure.",
version="1.1.0")
@Change(version="1.1.0",description="General revision of the facet to improve clarity and usability; removed \'latitude\' and \'longitude\' in favor of \'spatialGeometry\' for greater flexibility; removed \'country\' to avoid collisions with \'location\' when the intended location represents a country; \'location\' is no longer limited to a city name and can represent any human-readable location description.") @Change(version="1.0.0",description="First Version")
public interface LocationFacet
extends org.gcube.informationsystem.model.reference.entities.Facet
LocationFacet captures information about the geographic location
characterising the resource it
is associated with. This should not be confused with
CoverageFacet:
the LocationFacet
describes where a resource is located (optionally using GeoJSON spatial
geometry), instead
CoverageFacet provides a way to define the spatial or the temporal
extent the resource
represents.
It is mainly used to locate a data centre or to represent the geographic
reference of a
legal body playing the role of an actor in the infrastructure.- Author:
- Luca Frosini (ISTI - CNR), Francesco Mangiacrapa (ISTI - CNR)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of 'location' propertystatic final StringThe name associated with this facetstatic final StringThe name of 'spatialGeometry' propertystatic final StringThe version associated with this facetFields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, REDACTED, TYPE_PROPERTY, UNKNOWN_USERFields inherited from interface org.gcube.informationsystem.model.reference.ERElement
CONTEXTS_PROPERTYFields inherited from interface org.gcube.informationsystem.base.reference.IdentifiableElement
ID_PROPERTY, METADATA_PROPERTYFields inherited from interface org.gcube.informationsystem.model.reference.ModelElement
EXPECTED_TYPE_PROPERTY, SUPERTYPES_PROPERTY -
Method Summary
Modifier and TypeMethodDescriptionstatic LocationFacetReturns a default instance of LocationFacetA human English name for the location, e.g., a city name, a country name, a site name, a region name, etc.org.gcube.com.fasterxml.jackson.databind.node.ObjectNodeReturns the Spatial Geometry in GeoJSON format, which can represent the physical location of a resource.voidsetLocation(String location) Sets a human English name for the location, e.g., a city name, a country name, a site name, a region name, etc.voidsetSpatialGeometry(org.gcube.com.fasterxml.jackson.databind.node.ObjectNode spatialGeometry) Sets the Spatial Geometry in GeoJSON formatMethods inherited from interface org.gcube.informationsystem.base.reference.Element
getTypeNameMethods inherited from interface org.gcube.informationsystem.base.reference.entities.EntityElement
getID, getMetadata, setID, setMetadataMethods inherited from interface org.gcube.informationsystem.model.reference.ERElement
getContextsMethods inherited from interface org.gcube.informationsystem.model.reference.entities.Facet
getAdditionalProperties, getAdditionalProperty, setAdditionalProperties, setAdditionalPropertyMethods inherited from interface org.gcube.informationsystem.model.reference.ModelElement
getExpectedtype, getSupertypes
-
Field Details
-
NAME
The name associated with this facet- See Also:
-
VERSION
The version associated with this facet- See Also:
-
LOCATION_PROPERTY
The name of 'location' property- See Also:
-
SPATIAL_GEOMETRY_PROPERTY
The name of 'spatialGeometry' property- See Also:
-
-
Method Details
-
getDefaultInstance
Returns a default instance of LocationFacet- Returns:
- a default instance of LocationFacet
-
getLocation
@ISProperty(name="location", description="A human English name for the location, e.g., a city name, a country name, a site name, a region name, etc.") String getLocation()A human English name for the location, e.g., a city name, a country name, a site name, a region name, etc.- Returns:
- the location
-
setLocation
Sets a human English name for the location, e.g., a city name, a country name, a site name, a region name, etc.- Parameters:
location- the location
-
getSpatialGeometry
@ISProperty(name="spatialGeometry", description="The spatial geometry in GeoJSON format, which can represent the physical location of a resource.\nThe geometry is represented as a GeoJSON object, which can be a Point, LineString, Polygon, MultiPoint, MultiLineString, or MultiPolygon.\n\nFor example, a Point geometry can be represented as:\n{\n\t\"type\": \"Point\",\n\t\"coordinates\": [longitude, latitude]\n}\nA Polygon geometry can be represented as:\n{\n\t\"type\": \"Polygon\",\n\t\"coordinates\": [\n\t\t[[lon1, lat1], [lon2, lat2], [lon3, lat3], [lon1, lat1]]\n\t]\n}\nA LineString geometry can be represented as:\n{\n\t\"type\": \"LineString\",\n\t\"coordinates\": [\n\t\t[lon1, lat1], [lon2, lat2], [lon3, lat3]\n\t]\n}\nThe spatial geometry can be used to represent the physical location of a resource, such as the location of a data center, a server, a network node, etc.\n") org.gcube.com.fasterxml.jackson.databind.node.ObjectNode getSpatialGeometry()Returns the Spatial Geometry in GeoJSON format, which can represent the physical location of a resource. The geometry is represented as a GeoJSON object, which can be a Point, LineString, Polygon, MultiPoint, MultiLineString, or MultiPolygon. For example, a Point geometry can be represented as: { "type": "Point", "coordinates": [longitude, latitude] } A Polygon geometry can be represented as: { "type": "Polygon", "coordinates": [ [[lon1, lat1], [lon2, lat2], [lon3, lat3], [lon1, lat1]] ] } A LineString geometry can be represented as: { "type": "LineString", "coordinates": [ [lon1, lat1], [lon2, lat2], [lon3, lat3] ] } The spatial geometry can be used to represent the physical location of a resource, such as the location of a data center, a server, a network node, etc.- Returns:
- the spatial geometry
-
setSpatialGeometry
void setSpatialGeometry(org.gcube.com.fasterxml.jackson.databind.node.ObjectNode spatialGeometry) Sets the Spatial Geometry in GeoJSON format- Parameters:
spatialGeometry- the spatial geometry
-