Element dsdef = (Element) child2; String logicalName = getAttribute(dsdef, "name"); Properties props = parseParameters(dsdef); dsc.addDataSourceDefinition(logicalName, props);
Element dsdef = (Element) child2; String logicalName = getAttribute(dsdef, "name"); Properties props = parseParameters(dsdef); dsc.addDataSourceDefinition(logicalName, props);
public QueryHandler getQueryHandler(QueryHandlerContext context) throws RepositoryException { Element element = (Element) child; // Optional file system implementation FileSystem fs = null; if (getElement(element, FILE_SYSTEM_ELEMENT, false) != null) { fs = getFileSystemFactory( element, FILE_SYSTEM_ELEMENT).getFileSystem(); } // Search implementation class String className = getAttribute( element, CLASS_ATTRIBUTE, DEFAULT_QUERY_HANDLER); BeanConfig config = new BeanConfig( className, parseParameters(element)); QueryHandler handler = config.newInstance(QueryHandler.class); try { handler.init(fs, context); return handler; } catch (IOException e) { throw new RepositoryException( "Unable to initialize query handler: " + handler, e); } } };
public QueryHandler getQueryHandler(QueryHandlerContext context) throws RepositoryException { Element element = (Element) child; // Optional file system implementation FileSystem fs = null; if (getElement(element, FILE_SYSTEM_ELEMENT, false) != null) { fs = getFileSystemFactory( element, FILE_SYSTEM_ELEMENT).getFileSystem(); } // Search implementation class String className = getAttribute( element, CLASS_ATTRIBUTE, DEFAULT_QUERY_HANDLER); BeanConfig config = new BeanConfig( className, parseParameters(element)); QueryHandler handler = config.newInstance(QueryHandler.class); try { handler.init(fs, context); return handler; } catch (IOException e) { throw new RepositoryException( "Unable to initialize query handler: " + handler, e); } } };