com.mkdoc.jspider
Class AbstractXhtmlParserPlugin

java.lang.Object
  |
  +--com.mkdoc.jspider.AbstractMKDocPlugin
        |
        +--com.mkdoc.jspider.AbstractXhtmlParserPlugin

public abstract class AbstractXhtmlParserPlugin
extends AbstractMKDocPlugin

A base class for plugins that parse XHTML source documents.

Version:
0.2 2005-11-01
Author:
Philip Shaw

Field Summary
protected  ApplicationProfile profile
          A custom metadata application profile.
 
Fields inherited from class com.mkdoc.jspider.AbstractMKDocPlugin
log, VENDOR
 
Constructor Summary
AbstractXhtmlParserPlugin()
           
 
Method Summary
protected  void configureHandler(RdfContentHandler handler)
          Configure an RDF handler with a custom application profile.
protected abstract  org.xml.sax.ContentHandler getContentHandler(StoreManager manager, java.net.URL url)
          Get a pre-configured content handler.
protected  java.lang.String loadApplicationProfile(net.javacoding.jspider.core.util.config.PropertySet propertySet)
          Load a custom application profile if specified in a property set.
 void notify(net.javacoding.jspider.api.event.JSpiderEvent event)
          Receive notification of a JSpider event.
protected abstract  void parse(java.io.InputStream inStream, java.net.URL url)
          Add a resource to the repository from an input stream.
 
Methods inherited from class com.mkdoc.jspider.AbstractMKDocPlugin
getApplicationContext, getVendor, initialize, setLog, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

profile

protected ApplicationProfile profile
A custom metadata application profile.

Since:
Version 0.1 2005-05-31
Constructor Detail

AbstractXhtmlParserPlugin

public AbstractXhtmlParserPlugin()
Method Detail

notify

public final void notify(net.javacoding.jspider.api.event.JSpiderEvent event)
Receive notification of a JSpider event.

Parameters:
event - A JSpider event.
Since:
Version 0.1 2005-05-31

parse

protected abstract void parse(java.io.InputStream inStream,
                              java.net.URL url)
Add a resource to the repository from an input stream.

Parameters:
inStream - The input stream source for the metadata.
url - The URL of the source document.
Since:
Version 0.1 2005-05-31

getContentHandler

protected abstract org.xml.sax.ContentHandler getContentHandler(StoreManager manager,
                                                                java.net.URL url)
Get a pre-configured content handler.

Parameters:
manager - A subject manager interface the content handler will write the document metadata to.
url - An initial URI subject.
Returns:
An RdfContentHandler instance with custom Schema if configured.
Since:
Version 0.1 2005-05-31

loadApplicationProfile

protected final java.lang.String loadApplicationProfile(net.javacoding.jspider.core.util.config.PropertySet propertySet)
                                                 throws java.lang.ClassNotFoundException,
                                                        java.lang.InstantiationException,
                                                        java.lang.IllegalAccessException
Load a custom application profile if specified in a property set.

Parameters:
propertySet - The property set for the plugin, which may contain a custom ApplicationProfile class name value.
Returns:
A status message for logging.
Throws:
java.lang.ClassNotFoundException - If the custom profile cannot be located or instantiated.
java.lang.IllegalAccessException - If the classloader is not permitted to access the custom profile.
java.lang.InstantiationException - If the custom profile cannot be instantiated.
Since:
Version 0.1 2005-05-31

configureHandler

protected final void configureHandler(RdfContentHandler handler)
Configure an RDF handler with a custom application profile.

Parameters:
handler - The handler to configure.
Since:
Version 0.1 2005-05-31