public abstract class RelatedTablesCoreExtension extends BaseExtension
| Modifier and Type | Field and Description |
|---|---|
static String |
EXTENSION_AUTHOR
Extension author
|
static String |
EXTENSION_DEFINITION
Extension definition URL
|
static String |
EXTENSION_NAME
Extension, with author and name
TODO Remove the commented sections when extension is adopted
|
static String |
EXTENSION_NAME_NO_AUTHOR
Extension name without the author
|
extensionsDao, geoPackage| Modifier | Constructor and Description |
|---|---|
protected |
RelatedTablesCoreExtension(GeoPackageCore geoPackage)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
ExtendedRelation |
addFeaturesRelationship(String baseFeaturesTableName,
String relatedFeaturesTableName,
String mappingTableName)
Adds a features relationship between the base feature and related feature
table.
|
ExtendedRelation |
addFeaturesRelationship(String baseFeaturesTableName,
String relatedFeaturesTableName,
UserMappingTable userMappingTable)
Adds a features relationship between the base feature and related feature
table.
|
ExtendedRelation |
addMediaRelationship(String baseTableName,
MediaTable mediaTable,
String mappingTableName)
Adds a media relationship between the base table and user media related
table.
|
ExtendedRelation |
addMediaRelationship(String baseTableName,
MediaTable mediaTable,
UserMappingTable userMappingTable)
Adds a media relationship between the base table and user media related
table.
|
ExtendedRelation |
addRelationship(String baseTableName,
String relatedTableName,
String mappingTableName,
RelationType relationType)
Adds a relationship between the base and related table.
|
ExtendedRelation |
addRelationship(String baseTableName,
String relatedTableName,
String mappingTableName,
String relationName)
Adds a relationship between the base and related table.
|
ExtendedRelation |
addRelationship(String baseTableName,
String relatedTableName,
String mappingTableName,
String relationAuthor,
String relationName)
Adds a relationship between the base and related table.
|
ExtendedRelation |
addRelationship(String baseTableName,
String relatedTableName,
UserMappingTable userMappingTable,
RelationType relationType)
Adds a relationship between the base and related table.
|
ExtendedRelation |
addRelationship(String baseTableName,
String relatedTableName,
UserMappingTable userMappingTable,
String relationName)
Adds a relationship between the base and related table.
|
ExtendedRelation |
addRelationship(String baseTableName,
String relatedTableName,
UserMappingTable userMappingTable,
String relationAuthor,
String relationName)
Adds a relationship between the base and related table.
|
ExtendedRelation |
addRelationship(String baseTableName,
UserRelatedTable relatedTable,
String mappingTableName)
Adds a relationship between the base and user related table.
|
ExtendedRelation |
addRelationship(String baseTableName,
UserRelatedTable relatedTable,
UserMappingTable userMappingTable)
Adds a relationship between the base and user related table.
|
ExtendedRelation |
addSimpleAttributesRelationship(String baseTableName,
SimpleAttributesTable simpleAttributesTable,
String mappingTableName)
Adds a simple attributes relationship between the base table and user
simple attributes related table.
|
ExtendedRelation |
addSimpleAttributesRelationship(String baseTableName,
SimpleAttributesTable simpleAttributesTable,
UserMappingTable userMappingTable)
Adds a simple attributes relationship between the base table and user
simple attributes related table.
|
String |
buildRelationName(String author,
String name)
Build the custom relation name with author
|
boolean |
createRelatedTable(UserRelatedTable relatedTable)
Create a user related table if it does not exist.
|
boolean |
createUserMappingTable(String mappingTableName)
Create a default user mapping table and extension row if either does not
exist.
|
boolean |
createUserMappingTable(UserMappingTable userMappingTable)
Create a user mapping table and extension row if either does not exist.
|
ExtendedRelationsDao |
getExtendedRelationsDao()
Get the extended relations DAO
|
abstract String |
getPrimaryKeyColumnName(String tableName)
Get the primary key of a table
|
List<ExtendedRelation> |
getRelationships()
Returns the relationships defined through this extension
|
boolean |
has()
Determine if the GeoPackage has the extension
|
boolean |
has(String mappingTable)
Determine if the GeoPackage has the extension for the mapping table
|
void |
removeExtension()
Remove all trace of the extension
|
void |
removeRelationship(ExtendedRelation extendedRelation)
Remove a specific relationship from the GeoPackage
|
void |
removeRelationship(String baseTableName,
String relatedTableName,
RelationType relationType)
Remove a specific relationship from the GeoPackage
|
void |
removeRelationship(String baseTableName,
String relatedTableName,
String relationName)
Remove a specific relationship from the GeoPackage
|
void |
removeRelationship(String baseTableName,
String relatedTableName,
String relationAuthor,
String relationName)
Remove a specific relationship from the GeoPackage
|
protected void |
setContents(UserRelatedTable table)
Set the contents in the user related table
|
get, getExtensionsDao, getGeoPackage, getOrCreate, haspublic static final String EXTENSION_AUTHOR
public static final String EXTENSION_NAME_NO_AUTHOR
public static final String EXTENSION_NAME
public static final String EXTENSION_DEFINITION
protected RelatedTablesCoreExtension(GeoPackageCore geoPackage)
geoPackage - GeoPackagepublic ExtendedRelationsDao getExtendedRelationsDao()
public boolean has()
public boolean has(String mappingTable)
mappingTable - mapping table namepublic abstract String getPrimaryKeyColumnName(String tableName)
tableName - table nameprotected void setContents(UserRelatedTable table)
table - user related tablepublic List<ExtendedRelation> getRelationships()
public ExtendedRelation addRelationship(String baseTableName, String relatedTableName, String mappingTableName, RelationType relationType)
baseTableName - base table namerelatedTableName - related table namemappingTableName - mapping table namerelationType - relation typepublic ExtendedRelation addRelationship(String baseTableName, String relatedTableName, String mappingTableName, String relationAuthor, String relationName)
baseTableName - base table namerelatedTableName - related table namemappingTableName - mapping table namerelationAuthor - relation authorrelationName - relation namepublic ExtendedRelation addRelationship(String baseTableName, String relatedTableName, String mappingTableName, String relationName)
baseTableName - base table namerelatedTableName - related table namemappingTableName - mapping table namerelationName - relation namepublic ExtendedRelation addRelationship(String baseTableName, String relatedTableName, UserMappingTable userMappingTable, RelationType relationType)
baseTableName - base table namerelatedTableName - related table nameuserMappingTable - user mapping tablerelationType - relation typepublic ExtendedRelation addRelationship(String baseTableName, String relatedTableName, UserMappingTable userMappingTable, String relationAuthor, String relationName)
baseTableName - base table namerelatedTableName - related table nameuserMappingTable - user mapping tablerelationAuthor - relation authorrelationName - relation namepublic ExtendedRelation addRelationship(String baseTableName, String relatedTableName, UserMappingTable userMappingTable, String relationName)
baseTableName - base table namerelatedTableName - related table nameuserMappingTable - user mapping tablerelationName - relation namepublic ExtendedRelation addRelationship(String baseTableName, UserRelatedTable relatedTable, String mappingTableName)
baseTableName - base table namerelatedTable - user related tablemappingTableName - user mapping table namepublic ExtendedRelation addRelationship(String baseTableName, UserRelatedTable relatedTable, UserMappingTable userMappingTable)
baseTableName - base table namerelatedTable - user related tableuserMappingTable - user mapping tablepublic ExtendedRelation addFeaturesRelationship(String baseFeaturesTableName, String relatedFeaturesTableName, String mappingTableName)
baseFeaturesTableName - base features table namerelatedFeaturesTableName - related features table namemappingTableName - mapping table namepublic ExtendedRelation addFeaturesRelationship(String baseFeaturesTableName, String relatedFeaturesTableName, UserMappingTable userMappingTable)
baseFeaturesTableName - base features table namerelatedFeaturesTableName - related features table nameuserMappingTable - user mapping tablepublic ExtendedRelation addMediaRelationship(String baseTableName, MediaTable mediaTable, String mappingTableName)
baseTableName - base table namemediaTable - user media tablemappingTableName - user mapping table namepublic ExtendedRelation addMediaRelationship(String baseTableName, MediaTable mediaTable, UserMappingTable userMappingTable)
baseTableName - base table namemediaTable - user media tableuserMappingTable - user mapping tablepublic ExtendedRelation addSimpleAttributesRelationship(String baseTableName, SimpleAttributesTable simpleAttributesTable, String mappingTableName)
baseTableName - base table namesimpleAttributesTable - user simple attributes tablemappingTableName - user mapping table namepublic ExtendedRelation addSimpleAttributesRelationship(String baseTableName, SimpleAttributesTable simpleAttributesTable, UserMappingTable userMappingTable)
baseTableName - base table namesimpleAttributesTable - user simple attributes tableuserMappingTable - user mapping tablepublic boolean createUserMappingTable(String mappingTableName)
mappingTableName - user mapping table namepublic boolean createUserMappingTable(UserMappingTable userMappingTable)
userMappingTable - user mapping tablepublic boolean createRelatedTable(UserRelatedTable relatedTable)
relatedTable - user related tablepublic void removeRelationship(String baseTableName, String relatedTableName, RelationType relationType)
baseTableName - base table namerelatedTableName - related table namerelationType - relation typepublic void removeRelationship(String baseTableName, String relatedTableName, String relationAuthor, String relationName)
baseTableName - base table namerelatedTableName - related table namerelationAuthor - relation authorrelationName - relation namepublic void removeRelationship(ExtendedRelation extendedRelation)
extendedRelation - extended relationpublic void removeRelationship(String baseTableName, String relatedTableName, String relationName)
baseTableName - base table namerelatedTableName - related table namerelationName - relation namepublic void removeExtension()
Copyright © 2018 National Geospatial-Intelligence Agency. All rights reserved.