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 [CoverageFacet](type: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.FacetLocationFacet captures information about the geographic location characterising the resource it is associated with. This should not be confused withCoverageFacet: the LocationFacet describes where a resource is located (optionally using GeoJSON spatial geometry), insteadCoverageFacetprovides 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
Fields Modifier and Type Field Description static StringLOCATION_PROPERTYThe name of 'location' propertystatic StringNAMEThe name associated with this facetstatic StringSPATIAL_GEOMETRY_PROPERTYThe name of 'spatialGeometry' propertystatic StringVERSIONThe version associated with this facet-
Fields inherited from interface org.gcube.informationsystem.base.reference.Element
DATETIME_PATTERN, REDACTED, TYPE_PROPERTY, UNKNOWN_USER
-
Fields inherited from interface org.gcube.informationsystem.model.reference.ERElement
CONTEXTS_PROPERTY
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static LocationFacetgetDefaultInstance()Returns a default instance of LocationFacetStringgetLocation()A 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.ObjectNodegetSpatialGeometry()Returns 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 format-
Methods inherited from interface org.gcube.informationsystem.base.reference.entities.EntityElement
getID, getMetadata, setID, setMetadata
-
-
-
-
Field Detail
-
NAME
static final String NAME
The name associated with this facet- See Also:
- Constant Field Values
-
VERSION
static final String VERSION
The version associated with this facet- See Also:
- Constant Field Values
-
LOCATION_PROPERTY
static final String LOCATION_PROPERTY
The name of 'location' property- See Also:
- Constant Field Values
-
SPATIAL_GEOMETRY_PROPERTY
static final String SPATIAL_GEOMETRY_PROPERTY
The name of 'spatialGeometry' property- See Also:
- Constant Field Values
-
-
Method Detail
-
getDefaultInstance
static LocationFacet 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
void setLocation(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.- 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
-
-