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
|
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 |
addAttributesRelationship(String baseTableName,
AttributesTable attributesTable,
String mappingTableName)
Adds an attributes relationship between the base table and user
attributes related table.
|
ExtendedRelation |
addAttributesRelationship(String baseTableName,
AttributesTable attributesTable,
UserMappingTable userMappingTable)
Adds an attributes relationship between the base table and user
attributes related table.
|
ExtendedRelation |
addAttributesRelationship(String baseTableName,
String relatedAttributesTableName,
String mappingTableName)
Adds an attributes relationship between the base table and related
attributes table.
|
ExtendedRelation |
addAttributesRelationship(String baseTableName,
String relatedAttributesTableName,
UserMappingTable userMappingTable)
Adds an attributes relationship between the base table and related
attributes table.
|
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 |
addRelationship(String baseTableName,
UserTable<? extends UserColumn> relatedTable,
String mappingTableName)
Adds a relationship between the base and user related table.
|
ExtendedRelation |
addRelationship(String baseTableName,
UserTable<? extends UserColumn> relatedTable,
String relationName,
String mappingTableName)
Adds a relationship between the base and user related table.
|
ExtendedRelation |
addRelationship(String baseTableName,
UserTable<? extends UserColumn> relatedTable,
String relationName,
UserMappingTable userMappingTable)
Adds a relationship between the base and user related table.
|
ExtendedRelation |
addRelationship(String baseTableName,
UserTable<? extends UserColumn> 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.
|
ExtendedRelation |
addTilesRelationship(String baseTableName,
String relatedTilesTableName,
String mappingTableName)
Adds a tiles relationship between the base table and related tiles table.
|
ExtendedRelation |
addTilesRelationship(String baseTableName,
String relatedTilesTableName,
UserMappingTable userMappingTable)
Adds a tiles relationship between the base table and related tiles table.
|
ExtendedRelation |
addTilesRelationship(String baseTableName,
TileTable tileTable,
String mappingTableName)
Adds a tiles relationship between the base table and user tiles related
table.
|
ExtendedRelation |
addTilesRelationship(String baseTableName,
TileTable tileTable,
UserMappingTable userMappingTable)
Adds a tiles relationship between the base table and user tiles related
table.
|
String |
buildRelationName(String author,
String name)
Build the custom relation name with author
|
boolean |
createRelatedTable(UserTable<? extends UserColumn> 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
|
String |
getPrimaryKeyColumnName(String tableName)
Get the primary key of a table
|
List<ExtendedRelation> |
getRelations(String baseTable,
String relatedTable)
Get the relations to the base table and related table
|
List<ExtendedRelation> |
getRelations(String baseTable,
String relatedTable,
String mappingTable)
Get the relations matching the non null provided values
|
List<ExtendedRelation> |
getRelations(String baseTable,
String relatedTable,
String relation,
String mappingTable)
Get the relations matching the non null provided values
|
List<ExtendedRelation> |
getRelations(String baseTable,
String baseColumn,
String relatedTable,
String relatedColumn,
String relation,
String mappingTable)
Get the relations matching the non null provided values
|
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
|
boolean |
hasRelations(String baseTable,
String relatedTable)
Determine if has one or more relations matching the base table and
related table
|
boolean |
hasRelations(String baseTable,
String relatedTable,
String mappingTable)
Determine if has one or more relations matching the non null provided
values
|
boolean |
hasRelations(String baseTable,
String relatedTable,
String relation,
String mappingTable)
Determine if has one or more relations matching the non null provided
values
|
boolean |
hasRelations(String baseTable,
String baseColumn,
String relatedTable,
String relatedColumn,
String relation,
String mappingTable)
Determine if has one or more relations matching the non null provided
values
|
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
|
void |
removeRelationships(String table)
Remove all relationships that include the table
|
void |
removeRelationshipsWithMappingTable(String mappingTable)
Remove all relationships with the mapping table
|
void |
setContents(UserTable<? extends UserColumn> table)
Set the contents in the user table
|
get, getExtensions, getExtensions, getExtensionsDao, getGeoPackage, getOrCreate, has, 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)
has in class BaseExtensionmappingTable - mapping table namepublic String getPrimaryKeyColumnName(String tableName)
tableName - table namepublic void setContents(UserTable<? extends UserColumn> table)
table - user 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 addRelationship(String baseTableName, UserTable<? extends UserColumn> relatedTable, String mappingTableName)
baseTableName - base table namerelatedTable - user related tablemappingTableName - user mapping table namepublic ExtendedRelation addRelationship(String baseTableName, UserTable<? extends UserColumn> relatedTable, UserMappingTable userMappingTable)
baseTableName - base table namerelatedTable - user related tableuserMappingTable - user mapping tablepublic ExtendedRelation addRelationship(String baseTableName, UserTable<? extends UserColumn> relatedTable, String relationName, String mappingTableName)
baseTableName - base table namerelatedTable - user related tablerelationName - relation namemappingTableName - user mapping table namepublic ExtendedRelation addRelationship(String baseTableName, UserTable<? extends UserColumn> relatedTable, String relationName, UserMappingTable userMappingTable)
baseTableName - base table namerelatedTable - user related tablerelationName - relation nameuserMappingTable - 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 ExtendedRelation addAttributesRelationship(String baseTableName, String relatedAttributesTableName, String mappingTableName)
baseTableName - base table namerelatedAttributesTableName - related attributes table namemappingTableName - mapping table namepublic ExtendedRelation addAttributesRelationship(String baseTableName, String relatedAttributesTableName, UserMappingTable userMappingTable)
baseTableName - base table namerelatedAttributesTableName - related attributes table nameuserMappingTable - user mapping tablepublic ExtendedRelation addAttributesRelationship(String baseTableName, AttributesTable attributesTable, String mappingTableName)
baseTableName - base table nameattributesTable - user attributes tablemappingTableName - user mapping table namepublic ExtendedRelation addAttributesRelationship(String baseTableName, AttributesTable attributesTable, UserMappingTable userMappingTable)
baseTableName - base table nameattributesTable - user attributes tableuserMappingTable - user mapping tablepublic ExtendedRelation addTilesRelationship(String baseTableName, String relatedTilesTableName, String mappingTableName)
baseTableName - base table namerelatedTilesTableName - related tiles table namemappingTableName - mapping table namepublic ExtendedRelation addTilesRelationship(String baseTableName, String relatedTilesTableName, UserMappingTable userMappingTable)
baseTableName - base table namerelatedTilesTableName - related tiles table nameuserMappingTable - user mapping tablepublic ExtendedRelation addTilesRelationship(String baseTableName, TileTable tileTable, String mappingTableName)
baseTableName - base table nametileTable - user tile tablemappingTableName - user mapping table namepublic ExtendedRelation addTilesRelationship(String baseTableName, TileTable tileTable, UserMappingTable userMappingTable)
baseTableName - base table nametileTable - user tile tableuserMappingTable - user mapping tablepublic boolean createUserMappingTable(String mappingTableName)
mappingTableName - user mapping table namepublic boolean createUserMappingTable(UserMappingTable userMappingTable)
userMappingTable - user mapping tablepublic boolean createRelatedTable(UserTable<? extends UserColumn> 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 removeRelationships(String table)
table - base or related table namepublic void removeRelationshipsWithMappingTable(String mappingTable)
mappingTable - mapping tablepublic void removeExtension()
public boolean hasRelations(String baseTable, String relatedTable) throws SQLException
baseTable - base table namerelatedTable - related table nameSQLException - upon failurepublic List<ExtendedRelation> getRelations(String baseTable, String relatedTable) throws SQLException
baseTable - base table namerelatedTable - related table nameSQLException - upon failurepublic boolean hasRelations(String baseTable, String relatedTable, String mappingTable) throws SQLException
baseTable - base table namerelatedTable - related table namemappingTable - mapping table nameSQLException - upon failurepublic List<ExtendedRelation> getRelations(String baseTable, String relatedTable, String mappingTable) throws SQLException
baseTable - base table namerelatedTable - related table namemappingTable - mapping table nameSQLException - upon failurepublic boolean hasRelations(String baseTable, String relatedTable, String relation, String mappingTable) throws SQLException
baseTable - base table namerelatedTable - related table namerelation - relation namemappingTable - mapping table nameSQLException - upon failurepublic List<ExtendedRelation> getRelations(String baseTable, String relatedTable, String relation, String mappingTable) throws SQLException
baseTable - base table namerelatedTable - related table namerelation - relation namemappingTable - mapping table nameSQLException - upon failurepublic boolean hasRelations(String baseTable, String baseColumn, String relatedTable, String relatedColumn, String relation, String mappingTable) throws SQLException
baseTable - base table namebaseColumn - base primary column namerelatedTable - related table namerelatedColumn - related primary column namerelation - relation namemappingTable - mapping table nameSQLException - upon failurepublic List<ExtendedRelation> getRelations(String baseTable, String baseColumn, String relatedTable, String relatedColumn, String relation, String mappingTable) throws SQLException
baseTable - base table namebaseColumn - base primary column namerelatedTable - related table namerelatedColumn - related primary column namerelation - relation namemappingTable - mapping table nameSQLException - upon failureCopyright © 2019 National Geospatial-Intelligence Agency. All rights reserved.