private void validateRelationship ( String baseTableName , String relatedTableName , String relationName ) { // Verify the base and related tables exist if ( ! geoPackage . isTable ( baseTableName ) ) { throw new GeoPackageException ( "Base Relationship table does not exist: " + baseTableName + ", Relation: " + relationName ) ; } if ( ! geoPackage . isTable ( relatedTableName ) ) { throw new GeoPackageException ( "Related Relationship table does not exist: " + relatedTableName + ", Relation: " + relationName ) ; } // Verify spec defined relation types RelationType relationType = RelationType . fromName ( relationName ) ; if ( relationType != null ) { validateRelationship ( baseTableName , relatedTableName , relationType ) ; } }
Validate that the relation name is valid between the base and related table