if (e.getIdentifier() == null) { e.setIdentifier(schema.getTypeName()); e.setDescription(e.getIdentifier());
/** * Create the audit tables for the specified feature type. * * @param geopackage the geopackage to add the tables to * @param mappedPath the feature tree path * @param fe the feature entry to add audit logs too * @param commitId the commit that the exported features came from * @throws SQLException */ private void createAuditLog(final GeoPackage geopackage, final String mappedPath, final FeatureEntry fe, final ObjectId commitId) throws SQLException { info("Creating audit metadata for table '%s'", fe.getIdentifier()); final DataSource dataSource = geopackage.getDataSource(); try (Connection connection = dataSource.getConnection(); GeopkgGeogigMetadata metadata = new GeopkgGeogigMetadata(connection)) { URI repoURI = context.repository().getLocation(); metadata.init(repoURI); final String auditedTable = fe.getIdentifier(); metadata.createAudit(auditedTable, mappedPath, commitId); } }
/** * Create the audit tables for the specified feature type. * * @param geopackage the geopackage to add the tables to * @param mappedPath the feature tree path * @param fe the feature entry to add audit logs too * @param commitId the commit that the exported features came from * @throws SQLException */ private void createAuditLog(final GeoPackage geopackage, final String mappedPath, final FeatureEntry fe, final ObjectId commitId) throws SQLException { info("Creating audit metadata for table '%s'", fe.getIdentifier()); final DataSource dataSource = geopackage.getDataSource(); try (Connection connection = dataSource.getConnection(); GeopkgGeogigMetadata metadata = new GeopkgGeogigMetadata(connection)) { URI repoURI = context.repository().getLocation(); metadata.init(repoURI); final String auditedTable = fe.getIdentifier(); metadata.createAudit(auditedTable, mappedPath, commitId); } }
if (e.getIdentifier() == null) { e.setIdentifier(schema.getTypeName()); e.setDescription(e.getIdentifier());