de.pangaea.metadataportal.harvester
Class OAIMetadataDocument

java.lang.Object
  extended by de.pangaea.metadataportal.harvester.MetadataDocument
      extended by de.pangaea.metadataportal.harvester.OAIMetadataDocument

public class OAIMetadataDocument
extends MetadataDocument

Special implementation of MetadataDocument that adds OAI set support to internal fields

Author:
Uwe Schindler

Nested Class Summary
 
Nested classes/interfaces inherited from class de.pangaea.metadataportal.harvester.MetadataDocument
MetadataDocument.XMLConverter
 
Field Summary
protected  Set<String> sets
           
 
Fields inherited from class de.pangaea.metadataportal.harvester.MetadataDocument
datestamp, deleted, iconfig, identifier
 
Constructor Summary
OAIMetadataDocument(SingleIndexConfig iconfig)
          Constructor, that creates an empty instance for the supplied index configuration.
 
Method Summary
 void addSet(String set)
          Adds an OAI set to the set Set.
protected  org.apache.lucene.document.Document createEmptyDocument()
          Helper method that generates an empty Lucene Document instance.
 Set<String> getSets()
          Returns all OAI sets as Set.
 void loadFromLucene(org.apache.lucene.document.Document ldoc)
          "Harvests" a stored Lucene Document from index for re-parsing.
 void setHeaderInfo(String status, String identifier, String datestampStr)
          Deprecated. 
 String toString()
           
 
Methods inherited from class de.pangaea.metadataportal.harvester.MetadataDocument
addDefaultField, addField, addFields, addSystemVariables, createInstanceFromLucene, evaluateTemplate, evaluateTemplateAsXHTML, getConverter, getDatestamp, getFinalDOM, getIdentifier, getLuceneDocument, getXML, isDeleted, processDocumentBoost, processFilters, processXPathVariables, setDatestamp, setDeleted, setFinalDOM, setIdentifier, walkNodeTexts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sets

protected Set<String> sets
See Also:
getSets()
Constructor Detail

OAIMetadataDocument

public OAIMetadataDocument(SingleIndexConfig iconfig)
Constructor, that creates an empty instance for the supplied index configuration.

Method Detail

setHeaderInfo

@PublicForDigesterUse
@Deprecated
public void setHeaderInfo(String status,
                                                          String identifier,
                                                          String datestampStr)
                   throws ParseException
Deprecated. 

Throws:
ParseException

addSet

public void addSet(String set)
Adds an OAI set to the set Set.


getSets

public Set<String> getSets()
Returns all OAI sets as Set.


loadFromLucene

public void loadFromLucene(org.apache.lucene.document.Document ldoc)
                    throws Exception
Description copied from class: MetadataDocument
"Harvests" a stored Lucene Document from index for re-parsing. Extracts XML blob, identifier and datestamp from Document. Stored fields are not restored. They are regenerated by re-executing all XPath and Templates. SingleIndexConfig is used for index specific conversions.

Overrides:
loadFromLucene in class MetadataDocument
Throws:
Exception

createEmptyDocument

protected org.apache.lucene.document.Document createEmptyDocument()
                                                           throws Exception
Description copied from class: MetadataDocument
Helper method that generates an empty Lucene Document instance. The standard fields are set to the doc properties (identifier, datestamp)

Overrides:
createEmptyDocument in class MetadataDocument
Returns:
Lucene Document or null, if doc was deleted.
Throws:
Exception - if an exception occurs during transformation (various types of exceptions can be thrown).
IllegalStateException - if identifier is empty.

toString

public String toString()
Overrides:
toString in class MetadataDocument


Copyright ©2007-2009 panFMP Developers c/o Uwe Schindler