Package org.mycore.sword
Class MCRSwordUtil.BuildLinkUtil
java.lang.Object
org.mycore.sword.MCRSwordUtil.BuildLinkUtil
- Enclosing class:
- MCRSwordUtil
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addPaginationLinks
(org.apache.abdera.i18n.iri.IRI collectionIRI, String collection, org.apache.abdera.model.Feed feed, MCRSwordCollectionProvider collectionProvider) Creates Pagination linksstatic String
buildCollectionPaginationLinkHref
(String collection, Integer page) static String
getEditHref
(String collection, String id) static String
getEditMediaHrefOfDerivate
(String collection, String id) static Stream<org.apache.abdera.model.Link>
getEditMediaIRIStream
(String collection, String mcrObjId) Creates a edit link for every derivate of a mcrobject.
-
Field Details
-
DEFAULT_URL_ENCODING
- See Also:
-
-
Constructor Details
-
BuildLinkUtil
public BuildLinkUtil()
-
-
Method Details
-
getEditHref
-
getEditMediaHrefOfDerivate
-
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
-
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 collectioncollection
- name of the collectionfeed
- the feed where the link will be insertedcollectionProvider
-MCRSwordCollectionProvider
of the collection (needed to count how much objects)- Throws:
org.swordapp.server.SwordServerException
- when theMCRSwordObjectIDSupplier
throws a exception.
-