protected void configureContext( org.picocontainer.MutablePicoContainer container) { container.registerComponentInstance(ResourceLocator.class, locator); }; };
/** * Configures the ows context. * * <p>The following factories are registered: * * <ul> * <li>{@link Ows10Factory} * </ul> */ protected void configureContext(MutablePicoContainer container) { super.configureContext(container); container.registerComponentInstance(Ows10Factory.eINSTANCE); } }
private static void setManager(Project project, CodeStyleManager newManager) { if (newManager != null) { MutablePicoContainer container = (MutablePicoContainer) project.getPicoContainer(); container.unregisterComponent(CODE_STYLE_MANAGER_KEY); container.registerComponentInstance(CODE_STYLE_MANAGER_KEY, newManager); } } }
protected void configureContext(MutablePicoContainer container) { container.registerComponentInstance(Wcs10Factory.eINSTANCE); } }
protected void configureContext(MutablePicoContainer container) { container.registerComponentInstance(Csw20Factory.eINSTANCE); }
protected void configureContext(MutablePicoContainer container) { container.registerComponentInstance(Ows11Factory.eINSTANCE); } }
protected void configureContext(MutablePicoContainer container) { container.registerComponentInstance(Wcs111Factory.eINSTANCE); } }
/** Registers an instanceof {@link WfsFactory} in the context. */ protected void configureContext(MutablePicoContainer container) { container.registerComponentInstance(WfsFactory.eINSTANCE); }
protected void configureContext(MutablePicoContainer container) { container.registerComponentInstance(Csw20Factory.eINSTANCE); }
protected void configureContext(MutablePicoContainer container) { container.registerComponentInstance(Ows20Factory.eINSTANCE); }
@Override protected void configureContext(MutablePicoContainer container) { container.registerComponentInstance(WfsFactory.eINSTANCE); container.registerComponentInstance(Wfs20Factory.eINSTANCE); container.registerComponentInstance(Fes20Factory.eINSTANCE); container.registerComponentInstance(new XSDIdRegistry()); container.registerComponentImplementation(QueryExpressionTextDelegate.class); container.registerComponentImplementation(ParameterParserDelegate.class); }
protected void configureContext(MutablePicoContainer container) { container.registerComponentInstance(Ows20Factory.eINSTANCE); // register parser delegate for extension schemas container.registerComponentInstance(new RangeSubsetParserDelegate()); container.registerComponentInstance(new ScalingParserDelegate()); container.registerComponentInstance(new InterpolationParserDelegate()); }
@Override protected void configureContext(MutablePicoContainer container) { container.registerComponentInstance(Wps10Factory.eINSTANCE); // register parser delegates for parsing schemas we do not know about container.registerComponentInstance(new GMLParserDelegate()); container.registerComponentInstance(new WFSParserDelegate()); container.registerComponentInstance(new FilterParserDelegate()); container.registerComponentInstance(new FESParserDelegate()); } }
/** Places an instance of {@link GeometryFactory}. */ protected void configureContext(MutablePicoContainer container) { StyleFactory styleFactory = CommonFactoryFinder.getStyleFactory(null); StyleBuilder styleBuilder = new StyleBuilder(styleFactory); container.registerComponentInstance(styleFactory); container.registerComponentInstance(styleBuilder); container.registerComponentInstance(new GeometryFactory()); container.registerComponentInstance(CoordinateArraySequenceFactory.instance()); container.registerComponentInstance(new StyleMap()); container.registerComponentInstance(new FolderStack()); container.registerComponentInstance(new SchemaRegistry()); }
@Override protected void configureContext(MutablePicoContainer container) { super.configureContext(container); container.registerComponentImplementation(FilterFactory.class, FilterFactoryImpl.class); container.registerComponentInstance(Fes20Factory.eINSTANCE); } }
@Override public void customizeContext(MutablePicoContainer context) { Object instance = context.getComponentInstanceOfType(FeatureTypeCache.class); context.unregisterComponentByInstance(instance); context.registerComponentInstance(dynamicFeatureTypeCache); } }
@Override protected void configureContext(MutablePicoContainer container) { super.configureContext(container); container.registerComponentImplementation(StyleFactory.class, StyleFactoryImpl.class); container.registerComponentInstance(ResourceLocator.class, new DefaultResourceLocator()); }
@Override protected void configureContext(MutablePicoContainer container) { super.configureContext(container); delegate.configureContext(container); container.unregisterComponent(GML3EncodingUtils.class); container.registerComponentInstance(new GML32EncodingUtils()); }
protected void configureContext( org.picocontainer.MutablePicoContainer container) { DefaultResourceLocator locator = new DefaultResourceLocator(); locator.setSourceUrl(surl); container.registerComponentInstance(ResourceLocator.class, locator); }; };
public void testParserDelegate() throws Exception { MLConfiguration config = new MLConfiguration(); MyParserDelegate delegate = new MyParserDelegate(); assertFalse(delegate.foo); assertFalse(delegate.bar); config.getContext().registerComponentInstance(delegate); Parser parser = new Parser(config); Object o = parser.parse(ParserTest.class.getResourceAsStream("parserDelegate.xml")); assertTrue(delegate.foo); assertTrue(delegate.bar); }