Search in sources :

Example 1 with MetaverseCompletionService

use of org.pentaho.metaverse.impl.MetaverseCompletionService in project pentaho-metaverse by pentaho.

the class IntegrationTestUtil method buildMetaverseGraph.

public static synchronized Graph buildMetaverseGraph(IDocumentLocatorProvider provider) throws Exception {
    IDocumentLocatorProvider documentLocatorProvider = provider;
    IMetaverseReader reader = PentahoSystem.get(IMetaverseReader.class);
    Set<IDocumentLocator> locators = documentLocatorProvider.getDocumentLocators();
    MetaverseCompletionService mcs = MetaverseCompletionService.getInstance();
    // Run a scan for each locator
    for (IDocumentLocator locator : locators) {
        locator.startScan();
    }
    mcs.waitTillEmpty();
    return reader.getMetaverse();
}
Also used : IMetaverseReader(org.pentaho.metaverse.api.IMetaverseReader) IDocumentLocatorProvider(org.pentaho.metaverse.api.IDocumentLocatorProvider) IDocumentLocator(org.pentaho.metaverse.api.IDocumentLocator) MetaverseCompletionService(org.pentaho.metaverse.impl.MetaverseCompletionService)

Aggregations

IDocumentLocator (org.pentaho.metaverse.api.IDocumentLocator)1 IDocumentLocatorProvider (org.pentaho.metaverse.api.IDocumentLocatorProvider)1 IMetaverseReader (org.pentaho.metaverse.api.IMetaverseReader)1 MetaverseCompletionService (org.pentaho.metaverse.impl.MetaverseCompletionService)1