Examples of registerScope()


Examples of org.apache.stanbol.ontologymanager.ontonet.api.scope.ScopeRegistry.registerScope()

        for (String s : success)
            log.info(" >> {} : SUCCESS", s);
        for (String s : failed)
            log.info(" >> {} : FAILED", s);
        ontologySpace.setUp();
        if (!scopeRegistry.containsScope(scopeId)) scopeRegistry.registerScope(scope);
        scopeRegistry.setScopeActive(scopeId, true);

        /*
         * The first thing to do is to create a recipe in the rule store that can be used by the engine to
         * refactor the enhancement graphs.
View Full Code Here

Examples of org.apache.stanbol.ontologymanager.ontonet.api.scope.ScopeRegistry.registerScope()

        OntologyScope scope = null, scope2 = null;
        try {
            scope = scf.createOntologyScope(scopeId1, src1, src2);
            scope2 = scf.createOntologyScope(scopeId2, src2);
            scope.setUp();
            reg.registerScope(scope);
            scope2.setUp();
            reg.registerScope(scope2);
        } catch (DuplicateIDException e) {
            fail("Duplicate ID exception caught on " + e.getDuplicateID());
        }
View Full Code Here

Examples of org.apache.stanbol.ontologymanager.ontonet.api.scope.ScopeRegistry.registerScope()

            scope = scf.createOntologyScope(scopeId1, src1, src2);
            scope2 = scf.createOntologyScope(scopeId2, src2);
            scope.setUp();
            reg.registerScope(scope);
            scope2.setUp();
            reg.registerScope(scope2);
        } catch (DuplicateIDException e) {
            fail("Duplicate ID exception caught on " + e.getDuplicateID());
        }
        // System.err.println(new ScopeSetRenderer().getScopesAsRDF(reg
        // .getRegisteredScopes()));
View Full Code Here

Examples of org.apache.stanbol.ontologymanager.ontonet.api.scope.ScopeRegistry.registerScope()

            // .createOntologyScope(scopeid, coreSrc);
            scope = f.createOntologyScope(scopeid, expanded.toArray(new OntologyInputSource[0]));
            // Setup and register the scope. If no custom space was set, it will
            // still be open for modification.
            scope.setUp();
            reg.registerScope(scope);
            reg.setScopeActive(scopeid, activate);
        } catch (DuplicateIDException e) {
            throw new WebApplicationException(e, CONFLICT);
        } catch (Exception ex) {
            throw new WebApplicationException(ex, INTERNAL_SERVER_ERROR);
View Full Code Here

Examples of org.impalaframework.spring.dynamic.DynamicBeanFactory.registerScope()

    beanFactory.setBeanClassLoader(classLoader);

    // create the scope, and register with the bean factory
    DynamicScope dynamicScope = new DynamicScope();
    dynamicScope.setClassLoader(classLoader);
    beanFactory.registerScope("dynamic", dynamicScope);

    // create the application context, and set the class loader
    GenericApplicationContext context = new GenericApplicationContext(beanFactory);
    context.setClassLoader(classLoader);
View Full Code Here

Examples of org.springframework.beans.factory.config.ConfigurableListableBeanFactory.registerScope()

  }

  public void setUpApplicationContextWithScopes(ConfigurableApplicationContext applicationContext) {
    assert applicationContext!=null;
    ConfigurableListableBeanFactory beanFactory = applicationContext.getBeanFactory();
    beanFactory.registerScope("request", new RequestScope());
    beanFactory.registerScope("session", new SessionScope(false));
    beanFactory.registerScope("globalSession", new SessionScope(true));

    beanFactory.addBeanPostProcessor(new ServletContextAwareProcessor(getServletContext(),
        getConfig()));
View Full Code Here

Examples of org.springframework.beans.factory.config.ConfigurableListableBeanFactory.registerScope()

  public void setUpApplicationContextWithScopes(ConfigurableApplicationContext applicationContext) {
    assert applicationContext!=null;
    ConfigurableListableBeanFactory beanFactory = applicationContext.getBeanFactory();
    beanFactory.registerScope("request", new RequestScope());
    beanFactory.registerScope("session", new SessionScope(false));
    beanFactory.registerScope("globalSession", new SessionScope(true));

    beanFactory.addBeanPostProcessor(new ServletContextAwareProcessor(getServletContext(),
        getConfig()));
    beanFactory.ignoreDependencyInterface(ServletContextAware.class);
View Full Code Here

Examples of org.springframework.beans.factory.config.ConfigurableListableBeanFactory.registerScope()

  public void setUpApplicationContextWithScopes(ConfigurableApplicationContext applicationContext) {
    assert applicationContext!=null;
    ConfigurableListableBeanFactory beanFactory = applicationContext.getBeanFactory();
    beanFactory.registerScope("request", new RequestScope());
    beanFactory.registerScope("session", new SessionScope(false));
    beanFactory.registerScope("globalSession", new SessionScope(true));

    beanFactory.addBeanPostProcessor(new ServletContextAwareProcessor(getServletContext(),
        getConfig()));
    beanFactory.ignoreDependencyInterface(ServletContextAware.class);
    beanFactory.ignoreDependencyInterface(ServletConfigAware.class);
View Full Code Here

Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.registerScope()

  public void testJdkScopedProxy() throws Exception {
    DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
    new XmlBeanDefinitionReader(bf).loadBeanDefinitions(TESTBEAN_CONTEXT);
    bf.setSerializationId("X");
    SimpleMapScope scope = new SimpleMapScope();
    bf.registerScope("request", scope);

    ITestBean bean = (ITestBean) bf.getBean("testBean");
    assertNotNull(bean);
    assertTrue(AopUtils.isJdkDynamicProxy(bean));
    assertTrue(bean instanceof ScopedObject);
View Full Code Here

Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.registerScope()

  public void testCglibScopedProxy() throws Exception {
    DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
    new XmlBeanDefinitionReader(bf).loadBeanDefinitions(LIST_CONTEXT);
    bf.setSerializationId("Y");
    SimpleMapScope scope = new SimpleMapScope();
    bf.registerScope("request", scope);

    TestBean tb = (TestBean) bf.getBean("testBean");
    assertTrue(AopUtils.isCglibProxy(tb.getFriends()));
    assertTrue(tb.getFriends() instanceof ScopedObject);
    ScopedObject scoped = (ScopedObject) tb.getFriends();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.