コード例 #1
0
 private void testLanguage(LanguageIdentifier lang, String language)
     throws IOException, PipelineException {
   final Document doc = new Document();
   doc.setFieldValue(lang.getInputField(), getResourceAsString(language));
   assertEquals(PipelineStepStatus.DEFAULT, lang.execute(doc));
   assertEquals(language, doc.getFieldValue(lang.getLangField()));
 }
コード例 #2
0
 @Override
 public PipelineStepStatus execute(Document doc) throws PipelineException {
   messageDigest.reset();
   executeInputFields(doc);
   doc.setFieldValue(outField, toHexString(messageDigest.digest()));
   return PipelineStepStatus.DEFAULT;
 }