Class OAIMetadataSaxRule
- java.lang.Object
-
- org.apache.commons.digester.Rule
-
- de.pangaea.metadataportal.utils.SaxRule
-
- de.pangaea.metadataportal.harvester.OAIMetadataSaxRule
-
public final class OAIMetadataSaxRule extends SaxRule
This class is used as a rule for the "metadata" element of the OAI response. Whenever this element occurs in Digester, it feeds the SAX events to a content handler and stores the DOM result in theOAIMetadataDocumenton the Digester stack, if rule is not enabled, metadata is fed to nowhere.- Author:
- Uwe Schindler
-
-
Field Summary
-
Fields inherited from class de.pangaea.metadataportal.utils.SaxRule
destContentHandler, excludeNamespaces
-
-
Constructor Summary
Constructors Constructor Description OAIMetadataSaxRule()Creates a new rule which is enabled by default.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbegin(String namespace, String name, Attributes attributes)voidend(String namespace, String name)booleanisEnabled()voidsetEnabled(boolean enabled)If enabled, a DOM tree is build from metadata.-
Methods inherited from class de.pangaea.metadataportal.utils.SaxRule
emptyRule, finishDocument, getContentHandler, initDocument, setContentHandler, setDigester, setExcludeNamespaces
-
-
-
-
Method Detail
-
setEnabled
public void setEnabled(boolean enabled)
If enabled, a DOM tree is build from metadata. If not enabled, metadata is fed to nowhere (for static OAI repositories to filter wrong metadataPrefix).
-
isEnabled
public boolean isEnabled()
- Returns:
trueif storing in DOM tree is enabled
-
begin
public void begin(String namespace, String name, Attributes attributes) throws Exception
-
-