|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ceryle.plink.MetaProcessor
public class MetaProcessor
Harvests XHTML <meta>-based metadata from a supplied
XHTML document.
For more extensive documentation see the
plink home page,
or the specification upon which this is based, Augmented Metadata in XHTML
See:
http://purl.org/ceryle/docs/NOTE-xhtml-augmeta.html.
Known bugs:
The processor does not properly handle qualified DCMES attributes.
Constants| Field Summary | |
|---|---|
protected String |
documentSystemId
A String containing the system identifier (filename) of the Document. |
protected String |
documentTitle
A String containing the contents of the <title> Element of the Document. |
protected MetaHandler |
metaH
A MetaHandler to receive events from this MetaProcessor. |
| Constructor Summary | |
|---|---|
MetaProcessor(MetaHandler metahandler)
Default constructor. |
|
| Method Summary | |
|---|---|
protected String |
convertAttrToElt(String name)
Returns a String as the conversion of the supplied attribute name as an element type name. |
protected String |
generateXPointerExpression(Element element)
Returns a String containing an XPointer reference to the specified node within the document tree. |
String |
getAbout(Document doc,
Element meta)
Processes the Element node of Document doc to return
a URI string suitable as a reference to the object. |
protected int |
getDepth(Document doc,
Element element)
Returns an int indicating the depth within the document element (or 'root') that Element element resides. |
Document |
getHarvestDocument()
Returns the Document populated with the harvested metadata. |
protected String |
getPlinkReference(Document doc,
Element element)
Returns a String containing a reference to the specified Element element of Document doc by pointing to the plink SID or SSN (preferring the former) for the node, null if unavailable. |
void |
harvest(Document doc,
String systemId)
Processes the Document doc to return a harvested
Document. |
void |
processMeta(Document doc,
Hashtable crop,
Element meta)
Processes the Element meta to populate the supplied Vector
with metadata content. |
protected void |
registerSchemas(Document doc)
Extracts all link elements from the provided Document doc and registers a schema for those having a rel attribute whose content attribute follows the schema registration formula: “schema.PREFIX”, where PREFIX is the schema prefix String. |
protected String |
traverse(Node node,
String schema)
Recursively traverses the specified node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected MetaHandler metaH
protected String documentTitle
protected String documentSystemId
| Constructor Detail |
|---|
public MetaProcessor(MetaHandler metahandler)
| Method Detail |
|---|
protected void registerSchemas(Document doc)
public void harvest(Document doc,
String systemId)
doc to return a harvested
Document. This is generally used only for XHTML source documents.
The String systemId is the locator used to create references
to the document as a resource.
public void processMeta(Document doc,
Hashtable crop,
Element meta)
throws Exception
meta to populate the supplied Vector
with metadata content.
Exception
public String getAbout(Document doc,
Element meta)
throws Exception
node of Document doc to return
a URI string suitable as a reference to the object. The priority for creating
a locator is as follows:
Exception
protected String getPlinkReference(Document doc,
Element element)
protected String generateXPointerExpression(Element element)
protected String traverse(Node node,
String schema)
throws Exception
Exceptionpublic Document getHarvestDocument()
protected String convertAttrToElt(String name)
throws Exception
Exception
protected int getDepth(Document doc,
Element element)
throws Exception
Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||