Codota Logo
IEntityConverterFields.getHistory
Code IndexAdd Codota to your IDE (free)

How to use
getHistory
method
in
uk.gov.dstl.baleen.consumers.utils.IEntityConverterFields

Best Java code snippets using uk.gov.dstl.baleen.consumers.utils.IEntityConverterFields.getHistory (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: dstl/baleen

/** Add history to the map */
public Map<String, Object> convert() {
 Map<String, Object> map = new IgnoreEmptyKeyMapDecorator<>(new LinkedHashMap<>());
 List<Object> list = createEventsList();
 map.put(fields.getHistory(), list);
 return map;
}
origin: dstl/baleen

@SuppressWarnings("unchecked")
@Test
public void testHistory() throws AnalysisEngineProcessException {
 jCas.setDocumentText("Bill went to London. William came back.");
 Person p = Annotations.createPerson(jCas, 0, 4, "Bill");
 Person q = Annotations.createPerson(jCas, 21, 28, NAME_2);
 DocumentHistory documentHistory =
   history.getHistory("unknown:" + getDocumentAnnotation(jCas).getHash());
 documentHistory.add(HistoryEvents.createAdded(p, "test"));
 documentHistory.add(HistoryEvents.createAdded(q, "test"));
 documentHistory.add(HistoryEvents.createMerged(p, "test", q.getInternalId()));
 documentHistory.add(HistoryEvents.createMerged(p, "fakeId merge", 500));
 documentHistory.add(HistoryEvents.createRemoved(q, "test"));
 ae.process(jCas);
 Collection<HistoryEvent> pHistory = documentHistory.getHistory(p.getInternalId());
 Collection<HistoryEvent> qHistory = documentHistory.getHistory(q.getInternalId());
 assertEquals(1, documents.count());
 assertEquals(2, entities.count());
 Document a = entities.find(new Document(Mongo.FIELD_ENTITIES + "." + VALUE, "Bill")).first();
 List<Document> pH =
   (List<Document>)
     ((List<Document>) a.get(Mongo.FIELD_ENTITIES)).get(0).get(fields.getHistory());
 assertEquals(pHistory.size() + qHistory.size(), pH.size());
 Document b = entities.find(new Document(Mongo.FIELD_ENTITIES + "." + VALUE, NAME_2)).first();
 List<Document> qH =
   (List<Document>)
     ((List<Document>) b.get(Mongo.FIELD_ENTITIES)).get(0).get(fields.getHistory());
 assertEquals(qHistory.size(), qH.size());
}
uk.gov.dstl.baleen.consumers.utilsIEntityConverterFieldsgetHistory

Popular methods of IEntityConverterFields

  • getExternalId
  • getHistoryAction
  • getHistoryParameters
  • getHistoryReferrer
  • getHistoryTimestamp
  • getHistoryType
  • getType
  • getGeoJSON
  • getHistoryRecordable

Popular in Java

  • Parsing JSON documents to java classes using gson
  • startActivity (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • findViewById (Activity)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • BoxLayout (javax.swing)
  • JPanel (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now