@Test public void testDocumentGraphMetadataHasContentFromJCas() throws UIMAException { DocumentGraphOptions options = DocumentGraphOptions.builder().withContent(true).build(); DocumentGraphFactory factory = createfactory(options); JCas jCas = JCasFactory.createJCas(); JCasTestGraphUtil.populateJcas(jCas); Graph graph = factory.create(jCas); Variables variables = graph.variables(); assertEquals(JCasTestGraphUtil.CONTENT, variables.get(FIELD_CONTENT).orElse("")); }
public Graph create(JCas jCas) { TinkerGraph graph = TinkerGraph.open(); load(jCas, graph); return graph; }
DocumentGraphFactory { public Graph create(JCas jCas) { TinkerGraph graph = TinkerGraph.open(); load(jCas, graph); return graph; } }
DocumentGraphFactory { public Graph create(JCas jCas) { TinkerGraph graph = TinkerGraph.open(); load(jCas, graph); return graph; } DocumentGraphFactory(final UimaMonitor monitor, final DocumentGraphOptions options); }
DocumentGraphFactory { public Graph create(JCas jCas) { TinkerGraph graph = TinkerGraph.open(); load(jCas, graph); return graph; } DocumentGraphFactory(final UimaMonitor monitor, final DocumentGraphOptions options); Graph create(JCas jCas); void load(JCas jCas, Graph graph); void load(JCas jCas, GraphTraversalSource traversal); }
DocumentGraphFactory { public Graph create(JCas jCas) { TinkerGraph graph = TinkerGraph.open(); load(jCas, graph); return graph; } DocumentGraphFactory(final UimaMonitor monitor, final DocumentGraphOptions options); Graph create(JCas jCas); void load(JCas jCas, Graph graph); void load(JCas jCas, GraphTraversalSource traversal); static final String DOCUMENT; static final String MENTION; static final String REFERENCE_TARGET; static final String ENTITY; static final String EVENT; static final String RELATION; static final String MENTION_OF; static final String MENTION_IN; static final String PARTICIPANT_IN; static final String SOURCE; static final String TARGET; static final String FIELD_DOCUMENT_ID; static final String FIELD_DOCUMENT_TYPE; static final String FIELD_DOCUMENT_SOURCE; static final String FIELD_DOCUMENT_LANGUAGE; static final String FIELD_DOCUMENT_TIMESTAMP; static final String FIELD_DOCUMENT_CLASSIFICATION; static final String FIELD_DOCUMENT_CAVEATS; static final String FIELD_DOCUMENT_RELEASABILITY; static final String FIELD_PUBLISHEDIDS; static final String FIELD_PUBLISHEDIDS_ID; static final String FIELD_PUBLISHEDIDS_TYPE; static final String FIELD_METADATA; static final String FIELD_CONTENT; static final String FIELD_LINKING; }