|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.d2rq.mapgen.D2RQMappingStyle
public class D2RQMappingStyle
Generates an original-style mapping. Unlike the W3C Direct Mapping, this handles N:M link tables, includes label definitions and instance labels, and uses different URI patterns.
Constructor Summary | |
---|---|
D2RQMappingStyle(SQLConnection connection,
String baseIRI)
|
Method Summary | |
---|---|
String |
getBaseIRI()
|
Property |
getColumnProperty(TableName tableName,
Identifier column)
Creates a property for a table column. |
TemplateValueMaker |
getEntityIRITemplate(TableDef table,
Key columns)
Returns an IRI template to be used to uniquely identify the records in a table. |
TemplateValueMaker |
getEntityLabelTemplate(TableName tableName,
Key columns)
Creates a best-effort template for human-readable labels for the records in a table, based on a given list of columns. |
List<Identifier> |
getEntityPseudoKeyColumns(List<ColumnDef> columns)
Returns a list of columns to be used to form blank node identifiers for the records in a table that has no suitable unique/primary key |
Property |
getForeignKeyProperty(TableName tableName,
ForeignKey fk)
Creates a property for a foreign key relationship between two tables. |
Resource |
getGeneratedOntologyResource()
Creates a resource that represents the ontology that defines all generated classes and properties. |
Property |
getLinkProperty(TableName linkTable)
Creates a property for an N:M link table. |
MappingGenerator |
getMappingGenerator()
|
PrefixMapping |
getPrefixes()
Returns a prefix mapping with convenient prefix declarations for this style of mapping. |
Resource |
getTableClass(TableName tableName)
Creates a class for a table. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public D2RQMappingStyle(SQLConnection connection, String baseIRI)
Method Detail |
---|
public MappingGenerator getMappingGenerator()
getMappingGenerator
in interface MappingStyle
public String getBaseIRI()
getBaseIRI
in interface MappingStyle
public PrefixMapping getPrefixes()
MappingStyle
getPrefixes
in interface MappingStyle
public TemplateValueMaker getEntityIRITemplate(TableDef table, Key columns)
MappingStyle
MappingStyle.getBaseIRI()
.
getEntityIRITemplate
in interface MappingStyle
table
- The table definitioncolumns
- The primary or unique key to be used, or null
public List<Identifier> getEntityPseudoKeyColumns(List<ColumnDef> columns)
MappingStyle
getEntityPseudoKeyColumns
in interface MappingStyle
columns
- The column definition
public Resource getGeneratedOntologyResource()
MappingStyle
getGeneratedOntologyResource
in interface MappingStyle
public Resource getTableClass(TableName tableName)
MappingStyle
getTableClass
in interface MappingStyle
tableName
- The table
public Property getColumnProperty(TableName tableName, Identifier column)
MappingStyle
getColumnProperty
in interface MappingStyle
tableName
- The tablecolumn
- A column on the table
public Property getForeignKeyProperty(TableName tableName, ForeignKey fk)
MappingStyle
getForeignKeyProperty
in interface MappingStyle
tableName
- The source tablefk
- A foreign key defines on the source table
public Property getLinkProperty(TableName linkTable)
MappingStyle
getLinkProperty
in interface MappingStyle
linkTable
- A relationship table
public TemplateValueMaker getEntityLabelTemplate(TableName tableName, Key columns)
MappingStyle
getEntityLabelTemplate
in interface MappingStyle
tableName
- The tablecolumns
- A list of columns in the table
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |