org.openstreetmap.osmosis.core.domain.v0_6.Relation.getChangesetId()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(155)

本文整理了Java中org.openstreetmap.osmosis.core.domain.v0_6.Relation.getChangesetId方法的一些代码示例,展示了Relation.getChangesetId的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Relation.getChangesetId方法的具体详情如下:
包路径:org.openstreetmap.osmosis.core.domain.v0_6.Relation
类名称:Relation
方法名:getChangesetId

Relation.getChangesetId介绍

暂无

代码示例

代码示例来源:origin: openstreetmap/osmosis

/**
 * Sets relation values as bind variable parameters to a relation insert query.
 *
 * @param statement The prepared statement to add the values to.
 * @param initialIndex The offset index of the first variable to set.
 * @param relation The way containing the data to be inserted.
 */
private void populateRelationParameters(PreparedStatement statement, int initialIndex, Relation relation) {
  int prmIndex;
  prmIndex = initialIndex;
  assertEntityHasTimestamp(relation);
  try {
    statement.setLong(prmIndex++, relation.getId());
    statement.setTimestamp(prmIndex++, new Timestamp(relation.getTimestamp().getTime()));
    statement.setInt(prmIndex++, relation.getVersion());
    statement.setBoolean(prmIndex++, true);
    statement.setLong(prmIndex++, relation.getChangesetId());
  } catch (SQLException e) {
    throw new OsmosisRuntimeException("Unable to set a prepared statement parameter for a relation.", e);
  }
}

代码示例来源:origin: org.openstreetmap.osmosis/osmosis-apidb

/**
 * Sets relation values as bind variable parameters to a relation insert query.
 *
 * @param statement The prepared statement to add the values to.
 * @param initialIndex The offset index of the first variable to set.
 * @param relation The way containing the data to be inserted.
 */
private void populateRelationParameters(PreparedStatement statement, int initialIndex, Relation relation) {
  int prmIndex;
  prmIndex = initialIndex;
  assertEntityHasTimestamp(relation);
  try {
    statement.setLong(prmIndex++, relation.getId());
    statement.setTimestamp(prmIndex++, new Timestamp(relation.getTimestamp().getTime()));
    statement.setInt(prmIndex++, relation.getVersion());
    statement.setBoolean(prmIndex++, true);
    statement.setLong(prmIndex++, relation.getChangesetId());
  } catch (SQLException e) {
    throw new OsmosisRuntimeException("Unable to set a prepared statement parameter for a relation.", e);
  }
}

代码示例来源:origin: openstreetmap/osmosis

changesetManager.addChangesetIfRequired(relation.getChangesetId(), relation.getUser());
    updateRelationStatement.setTimestamp(prmIndex++, new Timestamp(relation.getTimestamp().getTime()));
    updateRelationStatement.setBoolean(prmIndex++, visible);
    updateRelationStatement.setLong(prmIndex++, relation.getChangesetId());
    updateRelationStatement.setLong(prmIndex++, relation.getId());
    updateRelationStatement.setInt(prmIndex++, relation.getVersion());
    insertRelationStatement.setTimestamp(prmIndex++, new Timestamp(relation.getTimestamp().getTime()));
    insertRelationStatement.setBoolean(prmIndex++, visible);
    insertRelationStatement.setLong(prmIndex++, relation.getChangesetId());
          .getTime()));
      updateRelationCurrentStatement.setBoolean(prmIndex++, visible);
      updateRelationCurrentStatement.setLong(prmIndex++, relation.getChangesetId());
      updateRelationCurrentStatement.setLong(prmIndex++, relation.getId());
          .getTime()));
      insertRelationCurrentStatement.setBoolean(prmIndex++, visible);
      insertRelationCurrentStatement.setLong(prmIndex++, relation.getChangesetId());

代码示例来源:origin: org.openstreetmap.osmosis/osmosis-apidb

changesetManager.addChangesetIfRequired(relation.getChangesetId(), relation.getUser());
    updateRelationStatement.setTimestamp(prmIndex++, new Timestamp(relation.getTimestamp().getTime()));
    updateRelationStatement.setBoolean(prmIndex++, visible);
    updateRelationStatement.setLong(prmIndex++, relation.getChangesetId());
    updateRelationStatement.setLong(prmIndex++, relation.getId());
    updateRelationStatement.setInt(prmIndex++, relation.getVersion());
    insertRelationStatement.setTimestamp(prmIndex++, new Timestamp(relation.getTimestamp().getTime()));
    insertRelationStatement.setBoolean(prmIndex++, visible);
    insertRelationStatement.setLong(prmIndex++, relation.getChangesetId());
          .getTime()));
      updateRelationCurrentStatement.setBoolean(prmIndex++, visible);
      updateRelationCurrentStatement.setLong(prmIndex++, relation.getChangesetId());
      updateRelationCurrentStatement.setLong(prmIndex++, relation.getId());
          .getTime()));
      insertRelationCurrentStatement.setBoolean(prmIndex++, visible);
      insertRelationCurrentStatement.setLong(prmIndex++, relation.getChangesetId());

代码示例来源:origin: openstreetmap/osmosis

/**
 * {@inheritDoc}
 */
public void process(RelationContainer relationContainer) {
  Relation relation;
  int memberSequenceId;
  
  relation = relationContainer.getEntity();
  
  relationWriter.writeField(relation.getId());
  relationWriter.writeField(relation.getVersion());
  relationWriter.writeField(relation.getUser().getId());
  relationWriter.writeField(relation.getTimestamp());
  relationWriter.writeField(relation.getChangesetId());
  relationWriter.writeField(buildTags(relation));
  relationWriter.endRecord();
  
  memberSequenceId = 0;
  for (RelationMember member : relation.getMembers()) {
    relationMemberWriter.writeField(relation.getId());
    relationMemberWriter.writeField(member.getMemberId());
    relationMemberWriter.writeField(memberTypeValueMapper.getMemberType(member.getMemberType()));
    relationMemberWriter.writeField(member.getMemberRole());
    relationMemberWriter.writeField(memberSequenceId++);
    relationMemberWriter.endRecord();
  }
}

代码示例来源:origin: openstreetmap/osmosis

relationWriter.writeField(relation.getUser().getId());
relationWriter.writeField(relation.getTimestamp());
relationWriter.writeField(relation.getChangesetId());
relationWriter.endRecord();

相关文章