@Test public void testFromCertify() throws Exception { }
public static List<Certification> fromCertify(CertifyJson certifyJson, CertificationType type){ List<Certification> res = new ArrayList<>(); for(Certif c : certifyJson.certifications){ Certification certification = new Certification(); certification.setType(type.name()); certification.setPublicKey(c.pubkey); certification.setUid(c.uid); certification.setMember(c.isMember); certification.setWasMember(c.wasMember); certification.setBlockNumber(c.cert_time.block); certification.setMedianTime(c.cert_time.medianTime); certification.setWritten(c.written != null); if (c.written!=null) { certification.setHash(c.written.hash); } res.add(certification); } return res; }
CertifyJson implements Serializable { public static List<Certification> fromCertify(CertifyJson certifyJson, CertificationType type){ List<Certification> res = new ArrayList<>(); for(Certif c : certifyJson.certifications){ Certification certification = new Certification(); certification.setType(type.name()); certification.setPublicKey(c.pubkey); certification.setUid(c.uid); certification.setMember(c.isMember); certification.setWasMember(c.wasMember); certification.setBlockNumber(c.cert_time.block); certification.setMedianTime(c.cert_time.medianTime); certification.setWritten(c.written != null); if (c.written!=null) { certification.setHash(c.written.hash); } res.add(certification); } return res; } }
CertifyJson implements Serializable { public static List<Certification> fromCertify(CertifyJson certifyJson, CertificationType type){ List<Certification> res = new ArrayList<>(); for(Certif c : certifyJson.certifications){ Certification certification = new Certification(); certification.setType(type.name()); certification.setPublicKey(c.pubkey); certification.setUid(c.uid); certification.setMember(c.isMember); certification.setWasMember(c.wasMember); certification.setBlockNumber(c.cert_time.block); certification.setMedianTime(c.cert_time.medianTime); certification.setWritten(c.written != null); if (c.written!=null) { certification.setHash(c.written.hash); } res.add(certification); } return res; }  }
CertifyJson implements Serializable { public static List<Certification> fromCertify(CertifyJson certifyJson, CertificationType type){ List<Certification> res = new ArrayList<>(); for(Certif c : certifyJson.certifications){ Certification certification = new Certification(); certification.setType(type.name()); certification.setPublicKey(c.pubkey); certification.setUid(c.uid); certification.setMember(c.isMember); certification.setWasMember(c.wasMember); certification.setBlockNumber(c.cert_time.block); certification.setMedianTime(c.cert_time.medianTime); certification.setWritten(c.written != null); if (c.written!=null) { certification.setHash(c.written.hash); } res.add(certification); } return res; }  static CertifyJson fromJson(String response); static List<Certification> fromCertify(CertifyJson certifyJson, CertificationType type); }
CertifyJson implements Serializable { public static List<Certification> fromCertify(CertifyJson certifyJson, CertificationType type){ List<Certification> res = new ArrayList<>(); for(Certif c : certifyJson.certifications){ Certification certification = new Certification(); certification.setType(type.name()); certification.setPublicKey(c.pubkey); certification.setUid(c.uid); certification.setMember(c.isMember); certification.setWasMember(c.wasMember); certification.setBlockNumber(c.cert_time.block); certification.setMedianTime(c.cert_time.medianTime); certification.setWritten(c.written != null); if (c.written!=null) { certification.setHash(c.written.hash); } res.add(certification); } return res; }  static CertifyJson fromJson(String response); static List<Certification> fromCertify(CertifyJson certifyJson, CertificationType type); public String pubkey; public String uid; public String sigDate; public Boolean isMember; public Certif[] certifications; }