/** * {@inheritDoc} */ @Override public void process(T data, ResultSet resultSet) throws SQLException { long id; // Get the owning entity id. id = resultSet.getLong("id"); listener.process(new DbFeature<T>(id, data), resultSet); } }
/** * {@inheritDoc} */ @Override public void process(T data, ResultSet resultSet) throws SQLException { long id; // Get the owning entity id. id = resultSet.getLong("id"); listener.process(new DbFeature<T>(id, data), resultSet); } }
/** * Adds the specified tags to the database. * * @param entityId * The identifier of the entity to add these features to. * @param tags * The features to add. */ private void addTags(long entityId, Collection<Tag> tags) { Collection<DbFeature<Tag>> dbList; dbList = new ArrayList<DbFeature<Tag>>(tags.size()); for (Tag tag : tags) { dbList.add(new DbFeature<Tag>(entityId, tag)); } tagDao.addAll(dbList); }
/** * Process the node tags. * * @param node The node to be processed. */ private void addNodeTags(Node node) { for (Tag tag : node.getTags()) { nodeTagBuffer.add(new DbFeatureHistory<DbFeature<Tag>>(new DbFeature<Tag>(node.getId(), tag), node .getVersion())); } flushNodeTags(false); }
/** * Process the relation tags. * * @param relation The relation to be processed. */ private void addRelationTags(Relation relation) { for (Tag tag : relation.getTags()) { relationTagBuffer.add(new DbFeatureHistory<DbFeature<Tag>>(new DbFeature<Tag>(relation.getId(), tag), relation.getVersion())); } flushRelationTags(false); }
/** * Process the way tags. * * @param way The way to be processed. */ private void addWayTags(Way way) { for (Tag tag : way.getTags()) { wayTagBuffer.add(new DbFeatureHistory<DbFeature<Tag>>(new DbFeature<Tag>(way.getId(), tag), way .getVersion())); } flushWayTags(false); }
/** * Process the way tags. * * @param way The way to be processed. */ private void addWayTags(Way way) { for (Tag tag : way.getTags()) { wayTagBuffer.add(new DbFeatureHistory<DbFeature<Tag>>(new DbFeature<Tag>(way.getId(), tag), way .getVersion())); } flushWayTags(false); }
/** * {@inheritDoc} */ @Override public DbFeature<Tag> buildEntity(ResultSet resultSet) { try { return new DbFeature<Tag>( resultSet.getLong("entity_id"), new Tag( resultSet.getString("k"), resultSet.getString("v") ) ); } catch (SQLException e) { throw new OsmosisRuntimeException("Unable to build a tag from the current recordset row.", e); } }
/** * Process the node tags. * * @param node The node to be processed. */ private void addNodeTags(Node node) { for (Tag tag : node.getTags()) { nodeTagBuffer.add(new DbFeatureHistory<DbFeature<Tag>>(new DbFeature<Tag>(node.getId(), tag), node .getVersion())); } flushNodeTags(false); }
/** * Process the relation tags. * * @param relation The relation to be processed. */ private void addRelationTags(Relation relation) { for (Tag tag : relation.getTags()) { relationTagBuffer.add(new DbFeatureHistory<DbFeature<Tag>>(new DbFeature<Tag>(relation.getId(), tag), relation.getVersion())); } flushRelationTags(false); }
/** * Process the way tags. * * @param way * The way to be processed. */ private void addWayTags(Way way) { for (Tag tag : way.getTags()) { wayTagBuffer.add(new DbFeature<Tag>(way.getId(), tag)); } flushWayTags(false); }
/** * Process the node tags. * * @param node * The node to be processed. */ private void addNodeTags(Node node) { for (Tag tag : node.getTags()) { nodeTagBuffer.add(new DbFeature<Tag>(node.getId(), tag)); } flushNodeTags(false); }
/** * Process the relation tags. * * @param relation * The relation to be processed. */ private void addRelationTags(Relation relation) { for (Tag tag : relation.getTags()) { relationTagBuffer.add(new DbFeature<Tag>(relation.getId(), tag)); } flushRelationTags(false); }