new LongLongIndexElement(relationId, objectOffset)
);
// Write the relation id to indexes keyed by each of the relation members.
for (RelationMember member : relation.getMembers()) {
EntityType memberType;
memberType = member.getMemberType();
if (memberType.equals(EntityType.Node)) {
nodeRelationIndexWriter.write(new LongLongIndexElement(member.getMemberId(), relationId));
} else if (memberType.equals(EntityType.Way)) {
wayRelationIndexWriter.write(new LongLongIndexElement(member.getMemberId(), relationId));
} else if (memberType.equals(EntityType.Relation)) {
relationRelationIndexWriter.write(new LongLongIndexElement(member.getMemberId(), relationId));
} else {
throw new OsmosisRuntimeException("Member type " + memberType + " is not recognised.");
}
}