com.mkdoc.sax
Class MetaStoreWriter
java.lang.Object
|
+--com.mkdoc.sax.AbstractContentHandler
|
+--com.mkdoc.sax.AbstractRdfContentHandler
|
+--com.mkdoc.sax.AbstractStoreWriter
|
+--com.mkdoc.sax.MetaStoreWriter
- All Implemented Interfaces:
- org.xml.sax.ContentHandler, ElementHandler, ElementRdfWriter, RdfContentHandler
- public class MetaStoreWriter
- extends AbstractStoreWriter
- implements org.xml.sax.ContentHandler, ElementRdfWriter
A Sesame repository writer for XHTML meta
content.
Generates RDF Graph
objects and adds
them to a Sesame repository. Supports Dublin Core
element and qualified terms schemata.
- Version:
- 0.8 2005-11-01
- Author:
- Philip Shaw
- To do:
- Reduce the complexity of the addTriples method.
Field Summary |
static java.lang.String |
META
The local name of the meta element. |
Method Summary |
boolean |
acceptElement(java.lang.String uri,
java.lang.String localName)
Report whether an instance accepts named element types. |
void |
addTriples(org.openrdf.model.URI sourceUri,
org.xml.sax.Attributes attributes,
org.openrdf.model.Graph graph)
Add statements to an RDF graph for a source URI. |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
Extract meta element content. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.xml.sax.ContentHandler |
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping |
META
public static final java.lang.String META
- The local name of the
meta
element.
- Since:
- Version 0.3 2005-02-15
- See Also:
- Constant Field Values
MetaStoreWriter
public MetaStoreWriter(StoreManager manager,
java.net.URL url)
- Construct from a Sesame repository and initial URI.
- Parameters:
manager
- A subject manager interface to store the
RDF triples.url
- An initial URI subject.- Since:
- Version 0.1 2005-01-07
acceptElement
public final boolean acceptElement(java.lang.String uri,
java.lang.String localName)
- Report whether an instance accepts named element types.
- Specified by:
acceptElement
in interface ElementHandler
- Parameters:
uri
- The namespace URI for the document type.localName
- The local name of the element to check.
- Returns:
true
if this type is capable of handling the
specified element.- Since:
- Version 0.8 2005-02-15
startElement
public final void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
- Extract
meta
element content.
- Specified by:
startElement
in interface org.xml.sax.ContentHandler
- Overrides:
startElement
in class AbstractContentHandler
- Parameters:
uri
- The namespace URI for the element.localName
- The local element name.qName
- The qualified element name.attributes
- A set of attributes.
- Throws:
org.xml.sax.SAXException
- If the element is not a meta
element or the instance is was not constructed with an output
source and subject URI.- Since:
- Version 0.1 2005-01-07
addTriples
public final void addTriples(org.openrdf.model.URI sourceUri,
org.xml.sax.Attributes attributes,
org.openrdf.model.Graph graph)
- Add statements to an RDF graph for a source URI.
- Specified by:
addTriples
in interface ElementRdfWriter
- Parameters:
sourceUri
- The URI for the source document.attributes
- The element attribute set to process.graph
- An RDF graph to add the statements to.- Since:
- Version 0.1 2005-01-07