Package com.clarkparsia.empire.util

Examples of com.clarkparsia.empire.util.DefaultEmpireModule


public class TestEmpireCore {

    @BeforeClass
    public static void beforeClass () {
        TestUtil.setConfigSystemProperty( "test.empire.config.properties" );
        Empire.init(new DefaultEmpireModule(), new TestModule());

        // TODO: tests for TripleSource stuff
        // TODO: tests for persistence injectors
        // TODO: tests for transactions
        // TODO: more failure tests -- badly annotated beans, misconfigured datasources, etc.
View Full Code Here


  /**
   * Initialize Empire with the given configuration
   * @param theConfig the container configuration for Empire
   */
  public static void init(EmpireConfiguration theConfig) {
    init(new DefaultEmpireModule(theConfig));
  }
View Full Code Here

   */
  public static void init(EmpireConfiguration theConfig, EmpireModule... theModules) {
    Collection<EmpireModule> aModules = new HashSet<EmpireModule>(Arrays.asList(theModules));

    if (aModules.isEmpty() || !find2(aModules, new FindDefaultEmpireModulePredicate())) {
      aModules.add(new DefaultEmpireModule(theConfig));
    }

    init(aModules.toArray(new EmpireModule[aModules.size()]));
  }
View Full Code Here

    mModules.clear();

    Collection<EmpireModule> aModules = new HashSet<EmpireModule>(theModules);

    if (aModules.isEmpty() || !find2(aModules, new FindDefaultEmpireModulePredicate())) {
      aModules.add(new DefaultEmpireModule());
    }

    // keep track of the modules we've "installed"
    for (Module aModule : aModules) {
      mModules.put(aModule.getClass(), aModule);
View Full Code Here

   * Return the Guice injector.
   * @return the Guice injector for Empire
   */
  private static Injector injector() {
    if (injector == null) {
      injector = Guice.createInjector(new DefaultEmpireModule());
    }

    return injector;
  }
View Full Code Here

public class SesameTestSuite {

    @BeforeClass
    public static void beforeClass () {
        TestUtil.setConfigSystemProperty( "test.empire.config.properties" );
        Empire.init(new DefaultEmpireModule(), new OpenRdfEmpireModule());
    }
View Full Code Here

* @since   0.7
*/
public class TestDS {
  @Test
  public void testTripleSourceCreate() throws DataSourceException {
    Empire.init(new DefaultEmpireModule(), new TestModule());
   
    DataSource aTestSource = TestUtil.createTestSource();

    // this is a test source, so it should not be a TripleSource...

View Full Code Here

TOP

Related Classes of com.clarkparsia.empire.util.DefaultEmpireModule

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.