+ EnhancementEngineHelper.randomUUID(),SINGLE_SENTENCE);
UriRef ciUri = new UriRef(ci.getUri().getUnicodeString());
RdfEntityFactory factory = RdfEntityFactory.createInstance(ci.getMetadata());
long start = System.currentTimeMillis();
//create an Text Annotation representing an extracted Person
TextAnnotation personAnnotation = factory.getProxy(
createEnhancementURI(), TextAnnotation.class);
personAnnotation.setCreator(TEST_ENHANCEMENT_ENGINE_URI);
personAnnotation.setCreated(new Date());
personAnnotation.setExtractedFrom(ciUri);
personAnnotation.getDcType().add(new UriRef("http://www.example.org/cv/annotatation-types/text#Person"));
personAnnotation.setConfidence(0.8);
personAnnotation.setSelectedText("Patrick Marshall");
personAnnotation.setStart(SINGLE_SENTENCE.indexOf(personAnnotation.getSelectedText()));
personAnnotation.setEnd(personAnnotation.getStart()+personAnnotation.getSelectedText().length());
personAnnotation.setSelectionContext(SINGLE_SENTENCE);
//create an Text Annotation representing an extracted Location
TextAnnotation locationAnnotation = factory.getProxy(
createEnhancementURI(), TextAnnotation.class);
locationAnnotation.setCreator(TEST_ENHANCEMENT_ENGINE_URI);
locationAnnotation.setCreated(new Date());
locationAnnotation.setExtractedFrom(ciUri);
locationAnnotation.getDcType().add(new UriRef("http://www.example.org/cv/annotatation-types/text#Location"));
locationAnnotation.setConfidence(0.78);
locationAnnotation.setSelectedText("New Zealand");
locationAnnotation.setStart(SINGLE_SENTENCE.indexOf(locationAnnotation.getSelectedText()));
locationAnnotation.setEnd(locationAnnotation.getStart()+locationAnnotation.getSelectedText().length());
locationAnnotation.setSelectionContext(SINGLE_SENTENCE);
//create an Text Annotation representing an extracted Organisation
TextAnnotation orgAnnotation = factory.getProxy(
createEnhancementURI(), TextAnnotation.class);
orgAnnotation.setCreator(TEST_ENHANCEMENT_ENGINE_URI);
orgAnnotation.setCreated(new Date());
orgAnnotation.setExtractedFrom(ciUri);
orgAnnotation.getDcType().add(new UriRef("http://www.example.org/cv/annotatation-types/text#Organisation"));
orgAnnotation.setConfidence(0.78);
orgAnnotation.setSelectedText("University of Otago");
orgAnnotation.setStart(SINGLE_SENTENCE.indexOf(orgAnnotation.getSelectedText()));
orgAnnotation.setEnd(orgAnnotation.getStart()+orgAnnotation.getSelectedText().length());
orgAnnotation.setSelectionContext(SINGLE_SENTENCE);
// create an Entity Annotation for the person TextAnnotation
EntityAnnotation patrickMarshall = factory.getProxy(
createEnhancementURI(), EntityAnnotation.class);
patrickMarshall.setCreator(TEST_ENHANCEMENT_ENGINE_URI);