@Test public void testSameIdSameUUID() throws ResourceInitializationException { final SharedIdGenerator generator = createSharedIdGenerator(); final String p1id = "1234"; final String p2id = "abcd"; final String p1UUID = generator.generateForExternalId(p1id); final String p2UUID = generator.generateForExternalId(p2id); assertNotEquals(p1UUID, p2UUID); assertEquals(p1UUID, generator.generateForExternalId(p1id)); assertEquals(p2UUID, generator.generateForExternalId(p2id)); }
public String generateForExternalId(final String externalId) { return findByExternalId(externalId) .orElseGet( () -> { final String id = generate(); addMapping(externalId, id); return id; }); }
SharedIdGenerator extends BaleenResource { public String generateForExternalId(final String externalId) { return findByExternalId(externalId) .orElseGet( () -> { final String id = generate(); addMapping(externalId, id); return id; }); } }
SharedIdGenerator extends BaleenResource { public String generateForExternalId(final String externalId) { return findByExternalId(externalId) .orElseGet( () -> { final String id = generate(); addMapping(externalId, id); return id; }); }  }
SharedIdGenerator extends BaleenResource { public String generateForExternalId(final String externalId) { return findByExternalId(externalId) .orElseGet( () -> { final String id = generate(); addMapping(externalId, id); return id; }); }  boolean resetIfNewJCas(final JCas jCas); String generateForAnnotation(final BaleenAnnotation annotation); String generateForExternalId(final String externalId); }
SharedIdGenerator extends BaleenResource { public String generateForExternalId(final String externalId) { return findByExternalId(externalId) .orElseGet( () -> { final String id = generate(); addMapping(externalId, id); return id; }); }  boolean resetIfNewJCas(final JCas jCas); String generateForAnnotation(final BaleenAnnotation annotation); String generateForExternalId(final String externalId); static final String RESOURCE_KEY; }