Package io.goobi.viewer.model.metadata
Class MetadataTools
java.lang.Object
io.goobi.viewer.model.metadata.MetadataTools
MetadataTools class.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringapplyReplaceRules(String value, List<MetadataReplaceRule> replaceRules, String pi) applyReplaceRules.static StringconvertLanguageToIso2(String language) Converts given language name or ISO-3 code to ISO-2, if possible.static StringfindMetadataGroupType(String type) findMetadataGroupType.static StringgenerateDublinCoreMetaTags(StructElement structElement) generateDublinCoreMetaTags.static StringgenerateHighwirePressMetaTags(StructElement structElement, List<PhysicalElement> pages) generateHighwirePressMetaTags.static StringgenerateRIS.static Stringstatic de.intranda.digiverso.normdataimporter.model.RecordRetrieves authority data record from the given URL, using proxy configuration, if configured.static org.apache.solr.common.SolrDocumentListgetGroupedMetadata(String ownerIddoc, String subQuery, List<StringPair> sortFields)
-
Method Details
-
generateDublinCoreMetaTags
generateDublinCoreMetaTags.
- Parameters:
structElement- aStructElementobject.- Returns:
- String containing meta tags
-
generateHighwirePressMetaTags
public static String generateHighwirePressMetaTags(StructElement structElement, List<PhysicalElement> pages) throws IndexUnreachableException, ViewerConfigurationException, PresentationException generateHighwirePressMetaTags.
- Parameters:
structElement- aStructElementobject.pages- aListobject.- Returns:
- String containing meta tags
- Throws:
IndexUnreachableException- if any.ViewerConfigurationException- if any.PresentationException- if any.
-
generateRIS
generateRIS.
- Parameters:
se- aStructElementobject.- Returns:
- a
Stringobject.
-
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- aStringobject.- 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 ofMetadataReplaceRuleobjectspi- Record identifier to whose context the value belongs; used for checking conditions- Returns:
- a
Stringobject. - Throws:
PresentationExceptionIndexUnreachableException
-
findMetadataGroupType
findMetadataGroupType.
- Parameters:
type- aStringobject.- 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:
IndexUnreachableExceptionPresentationException
-
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:
Recordif found; null otherwise
-