|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.mkdoc.sax.AbstractContentHandler | +--com.mkdoc.sax.AbstractRdfContentHandler
Base class for RDF content handlers.
Field Summary | |
static java.lang.String |
DC_PREFIX
The Dublin Core metadata scheme prefix. |
static java.lang.String |
DCTERMS_URI
The Dublin Core terms URI type. |
protected static java.lang.String |
NODE_PREFIX
A blank node prefix. |
protected static java.lang.String |
NODE_SUFFIX
A blank node suffix. |
static java.lang.String |
NS_XHTML1
The XHTML 1.0 namespace URI. |
protected ApplicationProfile |
profile
An application profile to resolve metadata values. |
static java.lang.String |
RDF_TYPE
The RDF type URI. |
static java.lang.String |
RDF_VALUE
The RDF value URI. |
protected java.lang.String |
subject
The subject of the RDF statement. |
protected static java.lang.String[] |
URI_SCHEMES
A number of schemes that may be used by a URI. |
Fields inherited from class com.mkdoc.sax.AbstractContentHandler |
locator |
Constructor Summary | |
AbstractRdfContentHandler()
|
Method Summary | |
static java.lang.String |
escape(java.lang.String component)
Escape an N-Triple URI or literal. |
java.lang.String |
expandPredicate(java.lang.String predicate)
Expand a schema encoded value to a URI. |
java.lang.String[] |
expandPredicates(java.lang.String list)
Expand a space separated list of schema encoded values. |
java.lang.String |
expandScheme(java.lang.String scheme)
Expand an encoding scheme to a URI. |
java.lang.String |
getBNode()
Get a blank node. |
java.lang.String |
getBNodeId()
Get a blank node identifier. |
java.lang.String |
getSubject()
Get the current subject URI for the RDF handler. |
static boolean |
isUri(java.lang.String component)
Check whether a component is an absolute URI. |
void |
setApplicationProfile(ApplicationProfile profile)
Set the application profile for the handler. |
void |
setSubject(java.lang.String uri)
Set the subject of the RDF content handler. |
Methods inherited from class com.mkdoc.sax.AbstractContentHandler |
characters, endDocument, endElement, endPrefixMapping, getAttributeValue, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping |
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, startElement, startPrefixMapping |
Field Detail |
public static final java.lang.String NS_XHTML1
public static final java.lang.String RDF_TYPE
public static final java.lang.String RDF_VALUE
public static final java.lang.String DCTERMS_URI
public static final java.lang.String DC_PREFIX
protected static final java.lang.String[] URI_SCHEMES
protected static final java.lang.String NODE_PREFIX
protected static final java.lang.String NODE_SUFFIX
protected java.lang.String subject
protected ApplicationProfile profile
Constructor Detail |
public AbstractRdfContentHandler()
Method Detail |
public final void setApplicationProfile(ApplicationProfile profile)
setApplicationProfile
in interface RdfContentHandler
profile
- The application profile to be used.public final void setSubject(java.lang.String uri)
setSubject
in interface RdfContentHandler
uri
- The URI of the subject, such as the URL
of an (X)HTML document.public final java.lang.String getSubject()
getSubject
in interface RdfContentHandler
public final java.lang.String expandPredicate(java.lang.String predicate)
expandPredicate
in interface RdfContentHandler
predicate
- The encoded triple predicate to
expand in the form "DC.Title" for
instance.
public final java.lang.String[] expandPredicates(java.lang.String list)
Intended to extract Dublin Core encoded values from HTML
link
elements' rel
or rev
attributes, which may be mixed with generic link types. Distinguishes
properties that are not encoded metadata predicates and
silently drops them.
expandPredicates
in interface RdfContentHandler
list
- The encoded, space separated link list.
public final java.lang.String expandScheme(java.lang.String scheme)
expandScheme
in interface RdfContentHandler
scheme
- The encoded triple component to
expand in the form
"DCTERMS.W3CDTF" for instance.
public static final java.lang.String escape(java.lang.String component)
component
- An N-Triple component.
public static final boolean isUri(java.lang.String component)
Only checks for a number of common URI scheme prefixes, the full URI is not validated:
component
- The the string to check.
true
if the component appears
to be a URI.public final java.lang.String getBNode()
getBNode
in interface RdfContentHandler
public final java.lang.String getBNodeId()
getBNodeId
in interface RdfContentHandler
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |