@Test public void convert_TypeReason() { sourceCcJudgment.setTypes(Lists.newArrayList("Reason")); RawSourceCcJudgment rJudgment = sourceCcjTextDataConverter.convert(ccjTextData); assertRawSourceCcJudgment(rJudgment, true); }
public RawSourceCcJudgment convert(SourceCcJudgmentTextData ccjTextData) { RawSourceCcJudgment rJudgment = new RawSourceCcJudgment(); rJudgment.setTextMetadata(ccjTextData.getMetadata()); rJudgment.setTextContent(ccjTextData.getContent()); rJudgment.setSourceUrl(ccjTextData.getMetadataSourceUrl()); rJudgment.setContentSourceUrl(ccjTextData.getContentSourceUrl()); SourceCcJudgment sourceCcJudgment = ccJudgmentMarshaller.unmarshal(ccjTextData.getMetadata()); rJudgment.setCaseNumber(sourceCcJudgment.getSignature()); rJudgment.setSourceId(sourceCcJudgment.getId()); rJudgment.setPublicationDate(sourceCcJudgment.getPublicationDate()); rJudgment.setDataMd5(DigestUtils.md5Hex(rJudgment.getTextMetadata() + rJudgment.getTextContent())); return rJudgment; }
SourceCcjTextDataConverter { public RawSourceCcJudgment convert(SourceCcJudgmentTextData ccjTextData) { RawSourceCcJudgment rJudgment = new RawSourceCcJudgment(); rJudgment.setTextMetadata(ccjTextData.getMetadata()); rJudgment.setTextContent(ccjTextData.getContent()); rJudgment.setSourceUrl(ccjTextData.getMetadataSourceUrl()); rJudgment.setContentSourceUrl(ccjTextData.getContentSourceUrl()); SourceCcJudgment sourceCcJudgment = ccJudgmentMarshaller.unmarshal(ccjTextData.getMetadata()); rJudgment.setCaseNumber(sourceCcJudgment.getSignature()); rJudgment.setSourceId(sourceCcJudgment.getId()); rJudgment.setPublicationDate(sourceCcJudgment.getPublicationDate()); rJudgment.setDataMd5(DigestUtils.md5Hex(rJudgment.getTextMetadata() + rJudgment.getTextContent())); return rJudgment; } }
SourceCcjTextDataConverter { public RawSourceCcJudgment convert(SourceCcJudgmentTextData ccjTextData) { RawSourceCcJudgment rJudgment = new RawSourceCcJudgment(); rJudgment.setTextMetadata(ccjTextData.getMetadata()); rJudgment.setTextContent(ccjTextData.getContent()); rJudgment.setSourceUrl(ccjTextData.getMetadataSourceUrl()); rJudgment.setContentSourceUrl(ccjTextData.getContentSourceUrl()); SourceCcJudgment sourceCcJudgment = ccJudgmentMarshaller.unmarshal(ccjTextData.getMetadata()); rJudgment.setCaseNumber(sourceCcJudgment.getSignature()); rJudgment.setSourceId(sourceCcJudgment.getId()); rJudgment.setPublicationDate(sourceCcJudgment.getPublicationDate()); rJudgment.setDataMd5(DigestUtils.md5Hex(rJudgment.getTextMetadata() + rJudgment.getTextContent())); return rJudgment; }  }
SourceCcjTextDataConverter { public RawSourceCcJudgment convert(SourceCcJudgmentTextData ccjTextData) { RawSourceCcJudgment rJudgment = new RawSourceCcJudgment(); rJudgment.setTextMetadata(ccjTextData.getMetadata()); rJudgment.setTextContent(ccjTextData.getContent()); rJudgment.setSourceUrl(ccjTextData.getMetadataSourceUrl()); rJudgment.setContentSourceUrl(ccjTextData.getContentSourceUrl()); SourceCcJudgment sourceCcJudgment = ccJudgmentMarshaller.unmarshal(ccjTextData.getMetadata()); rJudgment.setCaseNumber(sourceCcJudgment.getSignature()); rJudgment.setSourceId(sourceCcJudgment.getId()); rJudgment.setPublicationDate(sourceCcJudgment.getPublicationDate()); rJudgment.setDataMd5(DigestUtils.md5Hex(rJudgment.getTextMetadata() + rJudgment.getTextContent())); return rJudgment; }  RawSourceCcJudgment convert(SourceCcJudgmentTextData ccjTextData); @Autowired void setCcJudgmentMarshaller(SourceCcJudgmentMarshaller ccJudgmentMarshaller); }
SourceCcjTextDataConverter { public RawSourceCcJudgment convert(SourceCcJudgmentTextData ccjTextData) { RawSourceCcJudgment rJudgment = new RawSourceCcJudgment(); rJudgment.setTextMetadata(ccjTextData.getMetadata()); rJudgment.setTextContent(ccjTextData.getContent()); rJudgment.setSourceUrl(ccjTextData.getMetadataSourceUrl()); rJudgment.setContentSourceUrl(ccjTextData.getContentSourceUrl()); SourceCcJudgment sourceCcJudgment = ccJudgmentMarshaller.unmarshal(ccjTextData.getMetadata()); rJudgment.setCaseNumber(sourceCcJudgment.getSignature()); rJudgment.setSourceId(sourceCcJudgment.getId()); rJudgment.setPublicationDate(sourceCcJudgment.getPublicationDate()); rJudgment.setDataMd5(DigestUtils.md5Hex(rJudgment.getTextMetadata() + rJudgment.getTextContent())); return rJudgment; }  RawSourceCcJudgment convert(SourceCcJudgmentTextData ccjTextData); @Autowired void setCcJudgmentMarshaller(SourceCcJudgmentMarshaller ccJudgmentMarshaller);  }