|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.mkdoc.schema.AbstractApplicationProfile
A base implementation of application profile methods.
Field Summary | |
static java.lang.String |
DCTERMS
The Dublin Core metadata scheme prefix. |
protected java.util.Map |
schemas
A number of schemes that may be handled by a profile. |
Constructor Summary | |
AbstractApplicationProfile()
|
Method Summary | |
protected void |
addSchema(Schema schema)
Add a schema to the handler. |
java.lang.String |
expandPredicate(java.lang.String predicate)
Expand a schema encoded value to a URI. |
protected abstract java.lang.String |
expandPredicateProfile(java.lang.String predicate)
Template method for falling back to profile-specific algorithms. |
java.lang.String |
expandScheme(java.lang.String scheme)
Expand an encoding scheme to a URI. |
protected abstract java.lang.String |
expandSchemeProfile(java.lang.String scheme)
Template method for falling back to profile-specific algorithms. |
SchemaProperty |
getPredicateProperty(java.lang.String predicate)
Get the schema property for a given predicate. |
protected Schema |
getPrimarySchema(java.lang.String prefix)
Get the primary schema indicated by a metadata prefix. |
java.util.Map |
getSchemaMap()
Get a mapping of schemas with their default prefixes. |
protected boolean |
hasPrimarySchema(java.lang.String prefix)
Get the primary schema signified by a metadata prefix. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DCTERMS
protected java.util.Map schemas
Schemas are stored by their encoding prefix in lower case. For example, metadata with the Dublin Core schema prefix "DC" are matched by the key "dc".
Constructor Detail |
public AbstractApplicationProfile()
Method Detail |
public final java.lang.String expandPredicate(java.lang.String predicate)
predicate
- The encoded triple predicate to
expand in the form "DC.Title" for
instance.
protected abstract java.lang.String expandPredicateProfile(java.lang.String predicate)
predicate
- A predicate that has not been matched using default
schema prefixes.
null
if not matched.protected final boolean hasPrimarySchema(java.lang.String prefix)
prefix
- The prefix for the metadata element.
true
if the profile includes a schema with this
default prefix.protected final Schema getPrimarySchema(java.lang.String prefix)
prefix
- The prefix for the metadata element.
null
if not found.public final java.lang.String expandScheme(java.lang.String scheme)
scheme
- The encoded triple component to
expand in the form
"DCTERMS.W3CDTF" for instance.
protected abstract java.lang.String expandSchemeProfile(java.lang.String scheme)
scheme
- A scheme that has not been matched using default
schema prefixes.
null
if not matched.protected final void addSchema(Schema schema)
schema
- The schema instance to be added.public final java.util.Map getSchemaMap()
public final SchemaProperty getPredicateProperty(java.lang.String predicate)
predicate
- The predicate name with schema prefix
null
if no
mapping exists.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |