net.fortytwo.sesametools.mappingsail
Class MappingSchema
java.lang.Object
net.fortytwo.sesametools.mappingsail.MappingSchema
public class MappingSchema
- extends Object
A set of rules for rewriting URIs based on direction (to or from the data store) and part of speech (the position
in an RDF statement in which a URI appears)
- Author:
- Joshua Shinavier (http://fortytwo.net)
|
Nested Class Summary |
static class |
MappingSchema.Direction
The direction of a URI rewriting rule: inbound rules map externally visible URIs to the URIs found in the data store,
while outbound rules do the opposite. |
static class |
MappingSchema.PartOfSpeech
The position in an RDF statement in which a URI appears |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MappingSchema
public MappingSchema()
getRewriter
public RewriteRule getRewriter(MappingSchema.PartOfSpeech partOfSpeech,
MappingSchema.Direction direction)
- Parameters:
partOfSpeech - the position in an RDF statement (subject, predicate, object or context) in which the URI appearsdirection - whether this is a rule to map externally visible URIs to internal URIs (inbound) or the reverse (outbound)
- Returns:
- the matching rewriting rule.
If no such rule has been explicitly defined, the default rule (the identity mapping) is returned.
setRewriter
public void setRewriter(MappingSchema.Direction direction,
RewriteRule rule)
- Defines an inbound or outbound URI rewriter.
- Parameters:
direction - whether this is a rule to map externally visible URIs to internal URIs (inbound) or the reverse (outbound)rule - the rewriting rule
setRewriter
public void setRewriter(MappingSchema.Direction direction,
MappingSchema.PartOfSpeech partOfSpeech,
RewriteRule rule)
- Defines an inbound or outbound URI rewriter for a specific part of speech (subject, predicate, object, or context).
- Parameters:
partOfSpeech - the part of speech to which this rewriter appliesdirection - whether this is a rule to map externally visible URIs to internal URIs (inbound) or the reverse (outbound)rule - the rewriting rule
Copyright © 2013. All Rights Reserved.