Package io.goobi.viewer.model.metadata
Class MetadataTools
java.lang.Object
io.goobi.viewer.model.metadata.MetadataTools
MetadataTools class.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
applyReplaceRules
(String value, List<MetadataReplaceRule> replaceRules, String pi) applyReplaceRules.static String
convertLanguageToIso2
(String language) Converts given language name or ISO-3 code to ISO-2, if possible.static String
findMetadataGroupType
(String type) findMetadataGroupType.static String
generateDublinCoreMetaTags
(StructElement structElement) generateDublinCoreMetaTags.static String
generateHighwirePressMetaTags
(StructElement structElement, List<PhysicalElement> pages) generateHighwirePressMetaTags.static String
generateRIS.static String
static de.intranda.digiverso.normdataimporter.model.Record
Retrieves authority data record from the given URL, using proxy configuration, if configured.static org.apache.solr.common.SolrDocumentList
getGroupedMetadata
(String ownerIddoc, String subQuery, List<StringPair> sortFields)
-
Method Details
-
generateDublinCoreMetaTags
generateDublinCoreMetaTags.
- Parameters:
structElement
- aStructElement
object.- Returns:
- String containing meta tags
-
generateHighwirePressMetaTags
public static String generateHighwirePressMetaTags(StructElement structElement, List<PhysicalElement> pages) throws IndexUnreachableException, ViewerConfigurationException, PresentationException generateHighwirePressMetaTags.
- Parameters:
structElement
- aStructElement
object.pages
- aList
object.- Returns:
- String containing meta tags
- Throws:
IndexUnreachableException
- if any.ViewerConfigurationException
- if any.PresentationException
- if any.
-
generateRIS
generateRIS.
- Parameters:
se
- aStructElement
object.- Returns:
- a
String
object.
-
generateRIS
- Parameters:
docstructType
-metadataFields
-- Returns:
- Generated RIS string; null of no docstructType given
-
convertLanguageToIso2
Converts given language name or ISO-3 code to ISO-2, if possible.- Parameters:
language
- aString
object.- Returns:
- ISO-2 representation; original string if none found
-
applyReplaceRules
public static String applyReplaceRules(String value, List<MetadataReplaceRule> replaceRules, String pi) throws IndexUnreachableException, PresentationException applyReplaceRules.
- Parameters:
value
- Metadata value to modifyreplaceRules
- List ofMetadataReplaceRule
objectspi
- Record identifier to whose context the value belongs; used for checking conditions- Returns:
- a
String
object. - Throws:
PresentationException
IndexUnreachableException
-
findMetadataGroupType
findMetadataGroupType.
- Parameters:
type
- aString
object.- Returns:
- MetadataGroupType value corresponding to the given gndspec type
-
getGroupedMetadata
public static org.apache.solr.common.SolrDocumentList getGroupedMetadata(String ownerIddoc, String subQuery, List<StringPair> sortFields) throws PresentationException, IndexUnreachableException - Parameters:
ownerIddoc
- owner IDDOCsubQuery
- Optional additional subQuery for filteringsortFields
- Optional field/order pairs for sorting- Returns:
- SolrDocumentList
- Throws:
IndexUnreachableException
PresentationException
-
getAuthorityDataRecord
public static de.intranda.digiverso.normdataimporter.model.Record getAuthorityDataRecord(String url) Retrieves authority data record from the given URL, using proxy configuration, if configured.- Parameters:
url
- Authority data record URL- Returns:
Record
if found; null otherwise
-