Class MCRSwordUtil.BuildLinkUtil

java.lang.Object
org.mycore.sword.MCRSwordUtil.BuildLinkUtil
Enclosing class:
MCRSwordUtil

public static class MCRSwordUtil.BuildLinkUtil extends Object
  • Field Details

  • Constructor Details

    • BuildLinkUtil

      public BuildLinkUtil()
  • Method Details

    • getEditHref

      public static String getEditHref(String collection, String id)
    • getEditMediaHrefOfDerivate

      public static String getEditMediaHrefOfDerivate(String collection, String id)
    • getEditMediaIRIStream

      public static Stream<org.apache.abdera.model.Link> getEditMediaIRIStream(String collection, String mcrObjId) throws org.swordapp.server.SwordError
      Creates a edit link for every derivate of a mcrobject.
      Parameters:
      mcrObjId - the mcrobject id as String
      Returns:
      returns a Stream which contains links to every derivate.
      Throws:
      org.swordapp.server.SwordError
    • buildCollectionPaginationLinkHref

      public static String buildCollectionPaginationLinkHref(String collection, Integer page)
    • addPaginationLinks

      public static void addPaginationLinks(org.apache.abdera.i18n.iri.IRI collectionIRI, String collection, org.apache.abdera.model.Feed feed, MCRSwordCollectionProvider collectionProvider) throws org.swordapp.server.SwordServerException
      Creates Pagination links
      Parameters:
      collectionIRI - IRI of the collection
      collection - name of the collection
      feed - the feed where the link will be inserted
      collectionProvider - MCRSwordCollectionProvider of the collection (needed to count how much objects)
      Throws:
      org.swordapp.server.SwordServerException - when the MCRSwordObjectIDSupplier throws a exception.