Class ProfiledDocuments


  • @Path("projects/{usecase_id}")
    public class ProfiledDocuments
    extends Object
    The Class ProfiledDocuments.
    Author:
    created by Fabio Sinibaldi, new manager/developer and mantainer - Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it Apr 18, 2023
    • Constructor Detail

      • ProfiledDocuments

        public ProfiledDocuments​(@PathParam("usecase_id")
                                 String profileID)
                          throws org.gcube.application.geoportal.common.model.rest.ConfigurationException
        Instantiates a new profiled documents.
        Parameters:
        profileID - the profile ID
        Throws:
        org.gcube.application.geoportal.common.model.rest.ConfigurationException - the configuration exception
    • Method Detail

      • getConfiguration

        @GET
        @Path("configuration")
        @Produces("application/json")
        public org.gcube.application.geoportal.common.model.configuration.Configuration getConfiguration​(@PathParam("usecase_id")
                                                                                                         String profileID)
        Gets the configuration.
        Parameters:
        profileID - the profile ID
        Returns:
        the configuration
      • createNew

        @POST
        @Consumes("application/json")
        @Produces("application/json")
        public org.gcube.application.geoportal.common.model.document.Project createNew​(org.bson.Document d)
        Creates the new.
        Parameters:
        d - the d
        Returns:
        the project
      • update

        @PUT
        @Path("{project_id}")
        @Consumes("application/json")
        @Produces("application/json")
        public org.gcube.application.geoportal.common.model.document.Project update​(@PathParam("project_id")
                                                                                    String documentId,
                                                                                    org.bson.Document d)
        Update.
        Parameters:
        documentId - the document id
        d - the d
        Returns:
        the project
      • patch

        @Path("{project_id}")
        @Consumes("application/json")
        @Produces("application/json")
        public org.gcube.application.geoportal.common.model.document.Project patch​(@PathParam("project_id")
                                                                                   String documentId,
                                                                                   org.bson.Document d)
        Patch.
        Parameters:
        documentId - the document id
        d - the d
        Returns:
        the project
      • delete

        @DELETE
        @Produces("application/json")
        @Path("{project_id}")
        public Boolean delete​(@PathParam("project_id")
                              String id,
                              @DefaultValue("false") @QueryParam("force")
                              Boolean force)
        Delete.
        Parameters:
        id - the id
        force - the force
        Returns:
        the boolean
      • registerFileSet

        @POST
        @Consumes("application/json")
        @Produces("application/json")
        @Path("/registerFiles/{project_id}")
        public org.gcube.application.geoportal.common.model.document.Project registerFileSet​(@PathParam("project_id")
                                                                                             String id,
                                                                                             org.gcube.application.geoportal.common.model.rest.RegisterFileSetRequest request)
        Register file set.
        Parameters:
        id - the id
        request - the request
        Returns:
        the project
      • deleteFileSet

        @POST
        @Consumes("application/json")
        @Produces("application/json")
        @Path("/deleteFiles/{project_id}")
        public org.gcube.application.geoportal.common.model.document.Project deleteFileSet​(@PathParam("project_id")
                                                                                           String id,
                                                                                           @DefaultValue("false") @QueryParam("force")
                                                                                           Boolean force,
                                                                                           @DefaultValue("false") @QueryParam("ignore_errors")
                                                                                           Boolean ignore_errors,
                                                                                           String path)
        Delete file set. the Authorization must be a VRE token
        Parameters:
        id - the id
        force - the force
        path - the path must be passed as text in the body
        Returns:
        the project
      • performStep

        @POST
        @Consumes("application/json")
        @Produces("application/json")
        @Path("/step/{project_id}")
        public org.gcube.application.geoportal.common.model.document.Project performStep​(@PathParam("project_id")
                                                                                         String id,
                                                                                         org.gcube.application.geoportal.common.model.rest.StepExecutionRequest request)
        Perform step.
        Parameters:
        id - the id
        request - the request
        Returns:
        the project
      • forceUnlock

        @PUT
        @Consumes("application/json")
        @Produces("application/json")
        @Path("/forceUnlock/{project_id}")
        public org.gcube.application.geoportal.common.model.document.Project forceUnlock​(@PathParam("project_id")
                                                                                         String id)
        Force unlock.
        Parameters:
        id - the id
        Returns:
        the project
      • setAccessPolicy

        @PUT
        @Consumes("application/json")
        @Produces("application/json")
        @Path("/setAccess/{project_id}")
        public org.gcube.application.geoportal.common.model.document.Project setAccessPolicy​(@PathParam("project_id")
                                                                                             String id,
                                                                                             org.gcube.application.geoportal.common.model.document.access.Access toSet)
        Sets the access policy.
        Parameters:
        id - the id
        toSet - the to set
        Returns:
        the project
      • list

        @GET
        @Produces("application/json")
        public Iterable<?> list()
        List.
        Returns:
        the iterable
      • getById

        @GET
        @Produces("application/json")
        @Path("{project_id}")
        public org.gcube.application.geoportal.common.model.document.Project getById​(@PathParam("project_id")
                                                                                     String id)
        Gets the by id.
        Parameters:
        id - the id
        Returns:
        the by id
      • search

        @POST
        @Consumes("application/json")
        @Produces("application/json")
        @Path("/search")
        public String search​(String filter)
        Search.
        Parameters:
        filter - the filter
        Returns:
        the string
      • query

        @POST
        @Consumes("application/json")
        @Produces("application/json")
        @Path("/query")
        public Iterable<?> query​(String queryString)
        Query.
        Parameters:
        queryString - the query string
        Returns:
        the iterable
      • getRelationshipChain

        @GET
        @Produces("application/json")
        @Path("{relationship}/{project_id}/{relationship_id}")
        public String getRelationshipChain​(@PathParam("project_id")
                                           String id,
                                           @PathParam("relationship_id")
                                           String relationshipId,
                                           @DefaultValue("false") @QueryParam("deep")
                                           Boolean deep)
        Gets the relationship chain.
        Parameters:
        id - the id
        relationshipId - the relationship id
        deep - the deep
        Returns:
        the relationship chain
      • setRelation

        @PUT
        @Produces("application/json")
        @Path("{relationship}/{project_id}/{relationship_id}")
        public org.gcube.application.geoportal.common.model.document.Project setRelation​(@PathParam("project_id")
                                                                                         String id,
                                                                                         @PathParam("relationship_id")
                                                                                         String relationshipId,
                                                                                         @QueryParam("target_id")
                                                                                         String targetId,
                                                                                         @QueryParam("target_ucd")
                                                                                         String targetUCD)
        Sets the relation.
        Parameters:
        id - the id
        relationshipId - the relationship id
        targetId - the target id
        targetUCD - the target UCD
        Returns:
        the project
      • deleteRelation

        @DELETE
        @Produces("application/json")
        @Path("{relationship}/{project_id}/{relationship_id}")
        public org.gcube.application.geoportal.common.model.document.Project deleteRelation​(@PathParam("project_id")
                                                                                            String id,
                                                                                            @PathParam("relationship_id")
                                                                                            String relationshipId,
                                                                                            @QueryParam("target_id")
                                                                                            String targetId,
                                                                                            @QueryParam("target_ucd")
                                                                                            String targetUCD)
        Delete relation.
        Parameters:
        id - the id
        relationshipId - the relationship id
        targetId - the target id
        targetUCD - the target UCD
        Returns:
        the project