Package org.mycore.datamodel.common
Interface MCRLinkTableInterface
- All Known Implementing Classes:
MCRHIBLinkTableStore
public interface MCRLinkTableInterface
This interface is designed to choose the persistence for the link tables.
- Version:
- $Revision$ $Date$
- Author:
- Jens Kupferschmidt
-
Method Summary
Modifier and TypeMethodDescriptionint
The method count the number of references with '%from%' and 'to' and optional 'type' and optional 'restriction%' values of the table.void
The method create a new item in the datastore.void
The method remove a item for the from ID from the datastore.getCountedMapOfMCRTO
(String mcrtoPrefix) The method returns a Map of all counted distinct referencesgetDestinationsOf
(String from, String type) Returns a List of all link destination offrom
and a specialtype
getSourcesOf
(String to, String type) Returns a List of all link sources ofto
and a specialtype
-
Method Details
-
create
The method create a new item in the datastore.- Parameters:
from
- a string with the link ID MCRFROMto
- a string with the link ID MCRTOtype
- a string with the link ID MCRTYPEattr
- a string with the link ID MCRATTR
-
delete
The method remove a item for the from ID from the datastore.- Parameters:
from
- a string with the link ID MCRFROMto
- an array of strings with the link ID MCRTOtype
- an array of strings with the link ID MCRTYPE
-
countTo
The method count the number of references with '%from%' and 'to' and optional 'type' and optional 'restriction%' values of the table.- Parameters:
fromtype
- a substing in the from ID as String, it can be nullto
- the object ID as String, which is referencedtype
- the refernce type, it can be nullrestriction
- a first part of the to ID as String, it can be null- Returns:
- the number of references
-
getCountedMapOfMCRTO
The method returns a Map of all counted distinct references- Returns:
- the result-map of (key,value)-pairs can be visualized as
select count(mcrfrom) as value, mcrto as key from mcrlinkclass|mcrlinkhref where mcrto like mcrtoPrefix + '%' group by mcrto;
-
getSourcesOf
Returns a List of all link sources ofto
and a specialtype
- Parameters:
to
- Destination-IDtype
- Link reference type, this can be null. Current types are classid, child, parent, reference and derivate.- Returns:
- List of Strings (Source-IDs)
-
getDestinationsOf
Returns a List of all link destination offrom
and a specialtype
- Parameters:
from
- Source-IDtype
- Link reference type, this can be null. Current types are classid, child, parent, reference and derivate.- Returns:
- List of Strings (Destination-IDs)
-