public void storeMemberSig(String memID, PGPSignature sig) { if (memberSig.containsKey(memID)) { memberSig .get(memID) .addSignature(sig, TrustRelation.generateRelationMemberSigtext(this, memID)); return; } else { memberSig.put( memID, new TrustSignatures( sig, TrustRelation.generateRelationMemberSigtext(this, memID), TrustSignatures.SIG_VALID)); } }
public static String generateRelationMemberSigtext(TrustRelation trust, String memID) { Relation r = (Relation) trust.getOsmPrimitive(); List<RelationMember> members = r.getMembers(); RelationMember member = null; for (RelationMember m : members) { if (TrustOsmPrimitive.createUniqueObjectIdentifier(m.getMember()).equals(memID)) { member = m; break; } } if (member == null) return ""; String sigtext = "RelID=" + r.getUniqueId() + "\n"; sigtext += TrustOsmPrimitive.createUniqueObjectIdentifier(member.getMember()) + "," + member.getRole(); return sigtext; }