org.d2rq.r2rml
Class Mapping
java.lang.Object
org.d2rq.r2rml.MappingComponent
org.d2rq.r2rml.Mapping
public class Mapping
- extends MappingComponent
A representation of an R2RML mapping.
It provides getters and
setters for everything, allowing programmatic construction and
manipulation of mappings.
It can represent certain kinds of invalid R2RML mappings,
for example those with required information missing.
A call to isValid()
can be used to check that it's
ok.
It represent some extra bits of information that
strictly speaking are not part of an R2RML mapping:
- There can be unused mapping components (e.g., a term map
instance that is not used by anything). These can be listed
via
getUnreferencedMappingComponents()
.
- There is an associated prefix mapping:
getPrefixes()
.
- Mapping components are stored along with the Jena
Resource
that represents it in the mapping graph.
- Author:
- Richard Cyganiak (richard@cyganiak.de)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Mapping
public Mapping(String baseIRI)
- Parameters:
baseIRI
- Used for resolving relative IRI templates
compile
public CompiledMapping compile(SQLConnection sqlConnection)
getType
public MappingComponent.ComponentType getType()
- Specified by:
getType
in class MappingComponent
getBaseIRI
public String getBaseIRI()
setPrefixMapping
public void setPrefixMapping(PrefixMapping prefixes)
getPrefixes
public PrefixMapping getPrefixes()
triplesMaps
public ComponentCollection<TriplesMap> triplesMaps()
logicalTables
public ComponentCollection<LogicalTable> logicalTables()
termMaps
public ComponentCollection<TermMap> termMaps()
predicateObjectMaps
public ComponentCollection<PredicateObjectMap> predicateObjectMaps()
referencingObjectMaps
public ComponentCollection<ReferencingObjectMap> referencingObjectMaps()
joins
public ComponentCollection<Join> joins()
getMappingComponent
public MappingComponent getMappingComponent(Resource r,
MappingComponent.ComponentType type)
accept
public void accept(MappingVisitor visitor)
- Specified by:
accept
in class MappingComponent
isValid
public boolean isValid()
- Overrides:
isValid
in class MappingComponent
getUnreferencedMappingComponents
public Map<Resource,MappingComponent> getUnreferencedMappingComponents()
- Returns all mapping components that are not referenced from a
triples map.