de.pangaea.metadataportal.harvester
Class OAIMetadataSaxRule

java.lang.Object
  extended by org.apache.commons.digester.Rule
      extended by de.pangaea.metadataportal.utils.SaxRule
          extended by de.pangaea.metadataportal.harvester.OAIMetadataSaxRule

public 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 the OAIMetadataDocument on 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
 
Fields inherited from class org.apache.commons.digester.Rule
digester, namespaceURI
 
Constructor Summary
OAIMetadataSaxRule()
          Creates a new rule which is enabled by default.
 
Method Summary
 void begin(String namespace, String name, Attributes attributes)
           
 void end(String namespace, String name)
           
 boolean isEnabled()
           
 void setEnabled(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
 
Methods inherited from class org.apache.commons.digester.Rule
begin, body, body, end, finish, getDigester, getNamespaceURI, setNamespaceURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OAIMetadataSaxRule

public OAIMetadataSaxRule()
Creates a new rule which is enabled by default.

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:
true if storing in DOM tree is enabled

begin

public void begin(String namespace,
                  String name,
                  Attributes attributes)
           throws Exception
Overrides:
begin in class SaxRule
Throws:
Exception

end

public void end(String namespace,
                String name)
         throws Exception
Overrides:
end in class SaxRule
Throws:
Exception


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