Package io.goobi.viewer.model.archives
Class SolrEADParser
java.lang.Object
io.goobi.viewer.model.archives.ArchiveParser
io.goobi.viewer.model.archives.SolrEADParser
- All Implemented Interfaces:
Serializable
Loads and parses EAD documents from the Solr index.
- See Also:
-
Field Summary
Fields inherited from class io.goobi.viewer.model.archives.ArchiveParser
associatedRecordMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<org.apache.solr.common.SolrDocument> getChildDocsForIddoc(String iddoc) Gets the database names.getUrl()voidloadChildren(ArchiveEntry entry, Set<String> loadPath, boolean loadChildrenRecursively) loadDatabase(ArchiveResource database, int lazyLoadingThreshold) Loads the given database and parses the EAD document.loadNode(int order, int hierarchy, org.apache.solr.common.SolrDocument doc, Set<String> loadPath, boolean loadChildrenRecursively) booleansearchInUnparsedNodes(ArchiveEntry node, String searchValue) toString()Methods inherited from class io.goobi.viewer.model.archives.ArchiveParser
getAssociatedRecordPis, getIdForName, updateAssociatedRecordMap
-
Constructor Details
-
SolrEADParser
public SolrEADParser()
-
-
Method Details
-
getPossibleDatabases
public List<ArchiveResource> getPossibleDatabases() throws PresentationException, IndexUnreachableExceptionGets the database names.- Specified by:
getPossibleDatabasesin classArchiveParser- Returns:
- List
- Throws:
IndexUnreachableExceptionPresentationException
-
loadDatabase
public ArchiveEntry loadDatabase(ArchiveResource database, int lazyLoadingThreshold) throws PresentationException, IndexUnreachableException Loads the given database and parses the EAD document.- Specified by:
loadDatabasein classArchiveParser- Parameters:
database- the archive resource to loadlazyLoadingThreshold- minimum tree size to switch to lazy loading- Returns:
- Root element of the loaded tree
- Throws:
IndexUnreachableExceptionPresentationException
-
loadNode
public ArchiveEntry loadNode(int order, int hierarchy, org.apache.solr.common.SolrDocument doc, Set<String> loadPath, boolean loadChildrenRecursively) throws PresentationException, IndexUnreachableException - Parameters:
order- position of this node within its parent's childrenhierarchy- depth level of this node in the treedoc- Solr document representing this archive entryloadPath- set of IDDOCs on the path to the search hit to loadloadChildrenRecursively- if true, child nodes are loaded recursively- Returns:
ArchiveEntry- Throws:
IndexUnreachableExceptionPresentationException
-
loadChildren
public void loadChildren(ArchiveEntry entry, Set<String> loadPath, boolean loadChildrenRecursively) throws PresentationException, IndexUnreachableException - Parameters:
entry- the parent entry whose children are to be loadedloadPath- set of IDDOCs on the path to the search hitloadChildrenRecursively- if true, child nodes are loaded recursively- Throws:
PresentationExceptionIndexUnreachableException
-
getChildDocsForIddoc
public static List<org.apache.solr.common.SolrDocument> getChildDocsForIddoc(String iddoc) throws PresentationException, IndexUnreachableException - Parameters:
iddoc- Parent IDDOC- Returns:
- Map<String, List<SolrDocument>>
- Throws:
PresentationExceptionIndexUnreachableException
-
searchInUnparsedNodes
- Specified by:
searchInUnparsedNodesin classArchiveParser- Parameters:
node- archive entry node to search withinsearchValue- search term to match against unparsed nodes- Returns:
- true if new nodes were loaded; false otherwise
-
getUrl
- Specified by:
getUrlin classArchiveParser
-
toString
-