Package org.dspace.app.suggestion
Class SuggestionUtils
java.lang.Object
org.dspace.app.suggestion.SuggestionUtils
This utility class provides convenient methods to deal with the
ExternalDataObject for the purpose of the Suggestion framework- Author:
- Andrea Bollini (andrea.bollini at 4science.it)
-
Method Summary
Modifier and TypeMethodDescriptiongetAllEntriesByMetadatum(ExternalDataObject record, String metadataFieldKey) This method receive an ExternalDataObject and a metadatum key.getAllEntriesByMetadatum(ExternalDataObject record, String schema, String element, String qualifier) This method receive an ExternalDataObject and a metadatum key.static StringgetFirstEntryByMetadatum(ExternalDataObject record, String metadataFieldKey) This method receive and ExternalDataObject and a metadatum key.static StringgetFirstEntryByMetadatum(ExternalDataObject record, String schema, String element, String qualifier) This method receive and ExternalDataObject and a metadatum key.
-
Method Details
-
getAllEntriesByMetadatum
public static List<String> getAllEntriesByMetadatum(ExternalDataObject record, String schema, String element, String qualifier) This method receive an ExternalDataObject and a metadatum key. It return only the values of the Metadata associated with the key.- Parameters:
record- the ExternalDataObject to extract metadata fromschema- schema of the searching recordelement- element of the searching recordqualifier- qualifier of the searching record- Returns:
- value of the first matching record
-
getAllEntriesByMetadatum
public static List<String> getAllEntriesByMetadatum(ExternalDataObject record, String metadataFieldKey) This method receive an ExternalDataObject and a metadatum key. It return only the values of the Metadata associated with the key.- Parameters:
record- the ExternalDataObject to extract metadata frommetadataFieldKey- the metadata field key (i.e. dc.title or dc.contributor.author), the jolly char is not supported- Returns:
- value of the first matching record
-
getFirstEntryByMetadatum
public static String getFirstEntryByMetadatum(ExternalDataObject record, String schema, String element, String qualifier) This method receive and ExternalDataObject and a metadatum key. It return only the value of the first Metadatum from the list associated with the key.- Parameters:
record- the ExternalDataObject to extract metadata fromschema- schema of the searching recordelement- element of the searching recordqualifier- qualifier of the searching record- Returns:
- value of the first matching record
-
getFirstEntryByMetadatum
This method receive and ExternalDataObject and a metadatum key. It return only the value of the first Metadatum from the list associated with the key.- Parameters:
record- the ExternalDataObject to extract metadata frommetadataFieldKey- the metadata field key (i.e. dc.title or dc.contributor.author), the jolly char is not supported- Returns:
- value of the first matching record
-