mil.nga.geopackage.extension.related.simple.SimpleAttributesTable Java Examples
The following examples show how to use
mil.nga.geopackage.extension.related.simple.SimpleAttributesTable.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RelatedTablesUtils.java From geopackage-android with MIT License | 6 votes |
/** * Create simple user columns * * @param notNull not null flag * @return columns */ public static List<UserCustomColumn> createSimpleUserColumns(boolean notNull) { List<UserCustomColumn> simpleUserColumns = new ArrayList<>(); List<UserCustomColumn> allAdditionalColumns = createAdditionalUserColumns(notNull); for (UserCustomColumn column : allAdditionalColumns) { if (SimpleAttributesTable.isSimple(column)) { simpleUserColumns.add(UserCustomColumn.createColumn( column.getName(), column.getDataType(), column.getMax(), column.isNotNull(), column.getDefaultValue())); } } return simpleUserColumns; }
Example #2
Source File: RelatedTablesUtils.java From geopackage-java with MIT License | 6 votes |
/** * Create simple user columns * * @param notNull * not null flag * @return columns */ public static List<UserCustomColumn> createSimpleUserColumns(boolean notNull) { List<UserCustomColumn> simpleUserColumns = new ArrayList<>(); List<UserCustomColumn> allAdditionalColumns = createAdditionalUserColumns(notNull); for (UserCustomColumn column : allAdditionalColumns) { if (SimpleAttributesTable.isSimple(column)) { simpleUserColumns.add(UserCustomColumn.createColumn( column.getName(), column.getDataType(), column.getMax(), column.isNotNull(), column.getDefaultValue())); } } return simpleUserColumns; }
Example #3
Source File: RelatedSimpleAttributesUtils.java From geopackage-android with MIT License | 5 votes |
/** * Validate contents * * @param simpleAttributesTable simple attributes table * @param contents contents */ private static void validateContents( SimpleAttributesTable simpleAttributesTable, Contents contents) { TestCase.assertNotNull(contents); TestCase.assertNotNull(contents.getDataType()); TestCase.assertEquals( SimpleAttributesTable.RELATION_TYPE.getDataType(), contents .getDataType().getName()); TestCase.assertEquals( SimpleAttributesTable.RELATION_TYPE.getDataType(), contents.getDataTypeString()); TestCase.assertEquals(simpleAttributesTable.getTableName(), contents.getTableName()); TestCase.assertNotNull(contents.getLastChange()); }
Example #4
Source File: RelatedSimpleAttributesUtils.java From geopackage-java with MIT License | 5 votes |
/** * Validate contents * * @param simpleAttributesTable * simple attributes table * @param contents * contents */ private static void validateContents( SimpleAttributesTable simpleAttributesTable, Contents contents) { TestCase.assertNotNull(contents); TestCase.assertNotNull(contents.getDataType()); TestCase.assertEquals( SimpleAttributesTable.RELATION_TYPE.getDataType(), contents .getDataType().getName()); TestCase.assertEquals( SimpleAttributesTable.RELATION_TYPE.getDataType(), contents.getDataTypeString()); TestCase.assertEquals(simpleAttributesTable.getTableName(), contents.getTableName()); TestCase.assertNotNull(contents.getLastChange()); }
Example #5
Source File: RelatedTablesCoreExtension.java From geopackage-core-java with MIT License | 3 votes |
/** * Adds a simple attributes relationship between the base table and user * simple attributes related table. Creates a default user mapping table and * the simple attributes table if needed. * * @param baseTableName * base table name * @param simpleAttributesTable * user simple attributes table * @param mappingTableName * user mapping table name * @return The relationship that was added */ public ExtendedRelation addSimpleAttributesRelationship( String baseTableName, SimpleAttributesTable simpleAttributesTable, String mappingTableName) { return addRelationship(baseTableName, simpleAttributesTable, mappingTableName); }
Example #6
Source File: RelatedTablesCoreExtension.java From geopackage-core-java with MIT License | 3 votes |
/** * Adds a simple attributes relationship between the base table and user * simple attributes related table. Creates the user mapping table and * simple attributes table if needed. * * @param baseTableName * base table name * @param simpleAttributesTable * user simple attributes table * @param userMappingTable * user mapping table * @return The relationship that was added */ public ExtendedRelation addSimpleAttributesRelationship( String baseTableName, SimpleAttributesTable simpleAttributesTable, UserMappingTable userMappingTable) { return addRelationship(baseTableName, simpleAttributesTable, userMappingTable); }
Example #7
Source File: RelatedTablesExtension.java From geopackage-android with MIT License | 2 votes |
/** * Get a related simple attributes table DAO * * @param simpleAttributesTable simple attributes table * @return simple attributes DAO */ public SimpleAttributesDao getSimpleAttributesDao( SimpleAttributesTable simpleAttributesTable) { return getSimpleAttributesDao(simpleAttributesTable.getTableName()); }
Example #8
Source File: RelatedTablesExtension.java From geopackage-java with MIT License | 2 votes |
/** * Get a related simple attributes table DAO * * @param simpleAttributesTable * simple attributes table * @return simple attributes DAO */ public SimpleAttributesDao getSimpleAttributesDao( SimpleAttributesTable simpleAttributesTable) { return getSimpleAttributesDao(simpleAttributesTable.getTableName()); }