@Path(value="access") public class Access extends BaseRest
| Modifier and Type | Field and Description |
|---|---|
static String |
REFERENCE_TYPE_PATH_PARAMETER |
static String |
RELATION_TYPE_PATH_PARAMETER |
static String |
RESOURCE_TYPE_PATH_PARAMETER |
| Constructor and Description |
|---|
Access() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAllContexts() |
String |
getAllInstances(String type,
Boolean polymorphic) |
String |
getAllResourcesHavingFacet(String resourcetype,
String relationType,
String referenceType,
String reference,
Boolean polymorphic,
String direction,
javax.ws.rs.core.UriInfo uriInfo) |
String |
getContext(String uuid) |
String |
getInstance(String type,
String uuid) |
String |
getInstanceContexts(String type,
String instanceId) |
String |
getType(String type,
Boolean polymorphic) |
String |
graphQuery(String query,
Boolean raw)
It includeSubtypes to query Entities and Relations in the current Context.
It accepts idempotent query only.. |
javax.ws.rs.core.Response |
instanceExists(String type,
String uuid) |
String |
jsonQuery(String jsonQuery)
POST /access/query
Content Body example:
{
"@class": "EService",
"consistsOf": [
{
"@class": "ConsistsOf",
"propagationConstraint" : {
"add": "propagate"
},
"target": {
"@class": "StateFacet",
"value": "down"
}
},
{
"@class": "IsIdentifiedBy",
"target": {
"@class": "SoftwareFacet",
"name": "data-transfer-service",
"group": "DataTransfer"
}
},
{
"@class": "ConsistsOf",
"target": {
"@class": "AccessPointFacet",
"endpoint": "http://pc-frosini.isti.cnr.it:8080/data-transfer-service/gcube/service"
}
}
]
}
|
checkHierarchicalMode, checkIncludeInstancesContexts, isRequesterAllowedToPerformHierarchicalRequests, isRequesterAllowedToRequestInstancesContextspublic static final String RESOURCE_TYPE_PATH_PARAMETER
public static final String RELATION_TYPE_PATH_PARAMETER
public static final String REFERENCE_TYPE_PATH_PARAMETER
@GET @Path(value="contexts") @Produces(value="application/json;charset=UTF-8") public String getAllContexts() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException@GET
@Path(value="contexts/{UUID}")
@Produces(value="application/json;charset=UTF-8")
public String getContext(@PathParam(value="UUID")
String uuid)
throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException,
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException@GET
@Path(value="types/{TYPE_NAME}")
@Produces(value="application/json;charset=UTF-8")
public String getType(@PathParam(value="TYPE_NAME")
String type,
@QueryParam(value="polymorphic") @DefaultValue(value="false")
Boolean polymorphic)
throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException,
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException@GET
@Path(value="instances/{TYPE_NAME}")
@Produces(value="application/json;charset=UTF-8")
public String getAllInstances(@PathParam(value="TYPE_NAME")
String type,
@QueryParam(value="polymorphic") @DefaultValue(value="true")
Boolean polymorphic)
throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException,
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException@HEAD
@Path(value="instances/{TYPE_NAME}/{UUID}")
@Produces(value="application/json;charset=UTF-8")
public javax.ws.rs.core.Response instanceExists(@PathParam(value="TYPE_NAME")
String type,
@PathParam(value="UUID")
String uuid)
throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException,
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException@GET
@Path(value="instances/{TYPE_NAME}/{UUID}")
@Produces(value="application/json;charset=UTF-8")
public String getInstance(@PathParam(value="TYPE_NAME")
String type,
@PathParam(value="UUID")
String uuid)
throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException,
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException@GET
@Path(value="instances/{TYPE_NAME}/{UUID}/contexts")
@Produces(value="application/json;charset=UTF-8")
public String getInstanceContexts(@PathParam(value="TYPE_NAME")
String type,
@PathParam(value="UUID")
String instanceId)
throws org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException,
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException@GET @Path(value="query") @Produces(value="application/json;charset=UTF-8") public String graphQuery(@QueryParam(value="q") String query, @QueryParam(value="raw") @DefaultValue(value="false") Boolean raw) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException
query - Defines the query to send to the backend.raw - request a raw response (not a Element based response)org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException - if the query is invalid or not idempotent@POST @Path(value="query") public String jsonQuery(String jsonQuery) throws org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
jsonQuery - org.gcube.informationsystem.resourceregistry.api.exceptions.queries.InvalidQueryExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException@GET
@Path(value="query/{RESOURCE_TYPE_NAME}/{RELATION_TYPE_NAME}/{REFERENCE_TYPE_NAME}")
@Produces(value="application/json;charset=UTF-8")
public String getAllResourcesHavingFacet(@PathParam(value="RESOURCE_TYPE_NAME")
String resourcetype,
@PathParam(value="RELATION_TYPE_NAME")
String relationType,
@PathParam(value="REFERENCE_TYPE_NAME")
String referenceType,
@QueryParam(value="_reference")
String reference,
@QueryParam(value="_polymorphic") @DefaultValue(value="false")
Boolean polymorphic,
@QueryParam(value="_direction") @DefaultValue(value="out")
String direction,
@Context
javax.ws.rs.core.UriInfo uriInfo)
throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryExceptionCopyright © 2022. All Rights Reserved.