|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Target
A target that receives information from the MappingGenerator
and
represents that information in some other form. This allows us to
use the same mapping generator code to output in different formats.
Method Summary | |
---|---|
void |
addPrefix(String prefix,
String uri)
Adds a prefix mapping. |
void |
close()
Will be called when generation is complete. |
void |
generateColumnProperty(Property property,
TableName table,
Identifier column,
DataType datatype)
Generates a mapping from one column to a property. |
void |
generateDatabase(SQLConnection connection,
String startupSQLScript)
Generates a database connection. |
void |
generateEntities(Resource class_,
TableName table,
TemplateValueMaker iriTemplate,
List<Identifier> blankNodeColumns)
Generates a mapping from one table to a set of entities. |
void |
generateEntityLabels(TemplateValueMaker labelTemplate,
TableName table)
Generates a label template for the entities of one table, as part of that table's mapping. |
void |
generateLinkProperty(Property property,
TableName table,
ForeignKey fk1,
ForeignKey fk2)
Generates a mapping from one N:M table to a property. |
void |
generateRefProperty(Property property,
TableName table,
ForeignKey foreignKey)
Generates a mapping from a foreign key to a property. |
void |
init(String baseIRI,
Resource generatedOntology,
boolean serveVocabulary,
boolean generateDefinitionLabels)
Called before generation starts. |
void |
skipColumn(TableName table,
Identifier column,
String reason)
Informs the Target instance that a certain column has been
skipped. |
Method Detail |
---|
void init(String baseIRI, Resource generatedOntology, boolean serveVocabulary, boolean generateDefinitionLabels)
baseIRI
- A base IRI for absolutizing relative IRI templatesgeneratedOntology
- A URI that identifies the generated vocabularyserveVocabulary
- true
iff the generated mapping is supposed to include vocabulary definitionsgenerateDefinitionLabels
- true
iff the generated mapping is supposed to include labels for generated classes and propertiesvoid addPrefix(String prefix, String uri)
void generateDatabase(SQLConnection connection, String startupSQLScript)
connection
- Connection information to the databasestartupSQLScript
- A SQL file that was used to populate/initialize the database connection; may be null
void generateEntities(Resource class_, TableName table, TemplateValueMaker iriTemplate, List<Identifier> blankNodeColumns)
null
.
class_
- RDFS/OWL class of the entities; may be null
table
- Name of the tableiriTemplate
- IRI template for generating entity IRIs, possibly relativeblankNodeColumns
- List of columns for generating unique blank nodesvoid generateEntityLabels(TemplateValueMaker labelTemplate, TableName table)
labelTemplate
- Template for the labelstable
- Name of the tablevoid generateColumnProperty(Property property, TableName table, Identifier column, DataType datatype)
property
- The target propertytable
- The source tablecolumn
- The source columndatatype
- The column's datatype; guaranteed to be non-null
void generateRefProperty(Property property, TableName table, ForeignKey foreignKey)
property
- The target propertytable
- The table on which the foreign key constraint is definedforeignKey
- The foreign keyvoid generateLinkProperty(Property property, TableName table, ForeignKey fk1, ForeignKey fk2)
property
- The target propertytable
- Name of the N:M tablefk1
- The foreign key constraint on the N:M table that points to the table containing subjectsfk2
- The foreign key constraint on the N:M table that points to the table containing objectsvoid skipColumn(TableName table, Identifier column, String reason)
Target
instance that a certain column has been
skipped. May be useful for logging etc.
void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |