protected Graph getGraph() { if (graph != null) { return graph; } graph = InMemoryGraph.create(); return graph; }
null ); graph = InMemoryGraph.create(); termMentionAuthorizations = graph.createAuthorizations(TermMentionRepository.VISIBILITY_STRING, VISIBILITY_SOURCE, WORKSPACE_ID); visibility = new Visibility(VISIBILITY_SOURCE);
@SuppressWarnings("unused") public static InMemoryGraph create() { return create(DEFAULT_CONFIGURATION); }
null ); graph = InMemoryGraph.create(); termMentionAuthorizations = graph.createAuthorizations(TermMentionRepository.VISIBILITY_STRING, VISIBILITY_SOURCE, WORKSPACE_ID); visibility = new Visibility(VISIBILITY_SOURCE);
@SuppressWarnings("unused") public static InMemoryGraph create(Map<String, Object> config) { return create(new InMemoryGraphConfiguration(config)); }
protected void before() { graph = InMemoryGraph.create(); when(metricsManager.counter(any())).thenReturn(mockCounter); when(metricsManager.counter(any(), any())).thenReturn(mockCounter); when(metricsManager.timer(any())).thenReturn(mockTimer); when(metricsManager.timer(any(), any())).thenReturn(mockTimer); when(metricsManager.meter(any())).thenReturn(mockMeter); when(metricsManager.meter(any(), any())).thenReturn(mockMeter); when(userRepository.getSystemUser()).thenReturn(systemUser); when(authorizationRepository.getGraphAuthorizations(systemUser)).thenReturn(systemUserAuthorizations); }
public void before() { Map config = new HashMap(); ConfigurationLoader hashMapConfigurationLoader = new HashMapConfigurationLoader(config); configuration = new Configuration(hashMapConfigurationLoader, new HashMap<>()); graph = InMemoryGraph.create(getGraphConfiguration()); visibility = new Visibility(""); authorizations = graph.createAuthorizations(""); }
protected Graph getGraph() { if (graph == null) { Map graphConfiguration = getConfigurationMap(); InMemoryGraphConfiguration inMemoryGraphConfiguration = new InMemoryGraphConfiguration(graphConfiguration); graph = InMemoryGraph.create(inMemoryGraphConfiguration, getGraphIdGenerator(), getGraphSearchIndex(inMemoryGraphConfiguration)); } return graph; }
@Override protected Graph createGraph() throws Exception { InMemoryGraphConfiguration configuration = new InMemoryGraphConfiguration(elasticsearchResource.createConfig()); return InMemoryGraph.create(configuration); }
@Before public void before() { graph = InMemoryGraph.create(); authorizations = graph.createAuthorizations(); workQueueRepository = new TestWorkQueueRepository( graph, workQueueNames, configuration ); workQueueRepository.setAuthorizationRepository(authorizationRepository); workQueueRepository.setUserRepository(userRepository); workQueueRepository.setWorkspaceRepository(workspaceRepository); }
protected Graph getGraph() { if (graph == null) { Map graphConfiguration = getConfigurationMap(); InMemoryGraphConfiguration inMemoryGraphConfiguration = new InMemoryGraphConfiguration(graphConfiguration); graph = InMemoryGraph.create(inMemoryGraphConfiguration, getGraphIdGenerator(), getGraphSearchIndex(inMemoryGraphConfiguration)); graph.defineProperty(VisalloProperties.CONCEPT_TYPE.getPropertyName()).dataType(String.class).textIndexHint(TextIndexHint.EXACT_MATCH).define(); graph.defineProperty(VisalloProperties.MODIFIED_BY.getPropertyName()).dataType(String.class).textIndexHint(TextIndexHint.EXACT_MATCH).define(); graph.defineProperty(VisalloProperties.MODIFIED_DATE.getPropertyName()).dataType(Date.class).define(); graph.defineProperty(VisalloProperties.VISIBILITY_JSON.getPropertyName()).dataType(String.class).define(); graph.defineProperty(VisalloProperties.TEXT.getPropertyName()).dataType(String.class).textIndexHint(TextIndexHint.FULL_TEXT).define(); } return graph; }