Interface Fedora4Client

  • All Known Implementing Classes:
    StatelessFedora4Client

    public interface Fedora4Client
    An interface representing all of the high-level fedora 4 operations needed by the migration utility.
    Author:
    Mike Durbin
    • Method Detail

      • exists

        boolean exists​(String path)
        Determines if a resource exists.
        Parameters:
        path - the path to the resource
        Returns:
        true if it exists, false otherwise
      • createResource

        void createResource​(String path)
        Creates a new resource at the given path.
        Parameters:
        path - the path to the new resource
      • getRepositoryUrl

        String getRepositoryUrl()
        Gets the repository URL (to which paths can be appended to reference resources).
        Returns:
        the repository URL
      • createOrUpdateRedirectNonRDFResource

        void createOrUpdateRedirectNonRDFResource​(String path,
                                                  String url)
        Creates or updates a non-RDF resource that points to external content at the given URL.
        Parameters:
        path - the path of the resource to be created
        url - the URL at which the external content is hosted
      • createOrUpdateNonRDFResource

        void createOrUpdateNonRDFResource​(String path,
                                          InputStream content,
                                          String contentType)
        Creates or updates a non-RDF resource.
        Parameters:
        path - the path of the resource to be modified/created
        content - the non-RDF content
        contentType - the mime type of the content
      • createVersionSnapshot

        void createVersionSnapshot​(String path,
                                   String versionId)
        Creates a version snapshot for the resource (or graph) at the given path.
        Parameters:
        path - the path of the resource to be versioned
        versionId - a label for the version
      • updateResourceProperties

        void updateResourceProperties​(String path,
                                      String sparqlUpdate)
        Updates properties on a resource.
        Parameters:
        path - the resource whose properties are to be updated.
        sparqlUpdate - the sparql update statements to be applied
      • updateNonRDFResourceProperties

        void updateNonRDFResourceProperties​(String path,
                                            String sparqlUpdate)
        Updates properties on a non-RDF resource.
        Parameters:
        path - the resource whose properties are to be updated.
        sparqlUpdate - the sparql update statements to be applied
      • createPlaceholder

        String createPlaceholder​(String path)
        Creates a placeholder resource at the given path (or at a server-assigned path, if no path is given) if no resource exists at that path. If a resource already exists, this method returns the path to that resource which may or may not be a placeholder. If none exists, this method creates a new resource that should should be distinguishable from resources that have already been migrated as well as resources created using another process.
        Parameters:
        path - a path at which to create a placeholder resource (or null to create a placeholder resource at a server-assigned path).
        Returns:
        the path of the placeholder resource that was created
      • createNonRDFPlaceholder

        String createNonRDFPlaceholder​(String path)
        Creates a placeholder non-RDF resource at the given path (or at a server-assigned path, if no path is given) if no resource exists at that path. If a resource already exists, this method returns the path to that resource which may or may not be a placeholder. If none exists, this method creates a new resource that should should be distinguishable from resources that have already been migrated as well as resources created using another process.
        Parameters:
        path - a path at which to create a placeholder resource (or null to create a placeholder resource at a server-assigned path).
        Returns:
        the path of the placeholder resource that was created
      • isPlaceholder

        boolean isPlaceholder​(String path)
        Determines whether the resource at the given path is a placeholder or not.
        Parameters:
        path - a path of a resource (expected to exist)
        Returns:
        true if it's a placeholder, false otherwise