org.d2rq.r2rml
Class Mapping

java.lang.Object
  extended by org.d2rq.r2rml.MappingComponent
      extended by 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:

Author:
Richard Cyganiak (richard@cyganiak.de)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.d2rq.r2rml.MappingComponent
MappingComponent.ComponentType
 
Constructor Summary
Mapping(String baseIRI)
           
 
Method Summary
 void accept(MappingVisitor visitor)
           
 CompiledMapping compile(SQLConnection sqlConnection)
           
 String getBaseIRI()
           
 MappingComponent getMappingComponent(Resource r, MappingComponent.ComponentType type)
           
 PrefixMapping getPrefixMapping()
           
 MappingComponent.ComponentType getType()
           
 Map<Resource,MappingComponent> getUnreferencedMappingComponents()
          Returns all mapping components that are not referenced from a triples map.
 boolean isValid()
           
 ComponentCollection<Join> joins()
           
 ComponentCollection<LogicalTable> logicalTables()
           
 ComponentCollection<PredicateObjectMap> predicateObjectMaps()
           
 ComponentCollection<ReferencingObjectMap> referencingObjectMaps()
           
 void setPrefixMapping(PrefixMapping prefixes)
           
 ComponentCollection<TermMap> termMaps()
           
 ComponentCollection<TriplesMap> triplesMaps()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mapping

public Mapping(String baseIRI)
Parameters:
baseIRI - Used for resolving relative IRI templates
Method Detail

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)

getPrefixMapping

public PrefixMapping getPrefixMapping()

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.