⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 domloadingtestcase.java

📁 xbrlapi的源码
💻 JAVA
字号:
package org.xbrlapi;import java.io.File;import org.xbrlapi.SAXHandlers.EntityResolverImpl;import org.xbrlapi.cache.CacheImpl;import org.xbrlapi.data.Store;import org.xbrlapi.data.dom.StoreImpl;import org.xbrlapi.loader.Loader;import org.xbrlapi.loader.LoaderImpl;import org.xbrlapi.utilities.BaseTestCase;import org.xbrlapi.xlink.XLinkProcessor;import org.xbrlapi.xlink.XLinkProcessorImpl;import org.xbrlapi.xlink.handler.XBRLCustomLinkRecogniserImpl;import org.xbrlapi.xlink.handler.XBRLXLinkHandlerImpl;import org.xml.sax.EntityResolver;/** * Provides a base test case for all tests involving * loading of data into a data store.  A DOM data store * is established and a loader is set up.  The loader * is made available via the getLoader() method.  This  * gives access to the data store in the usual manner. *  * Use for small scale loading operations because it  * relies on the DOM data store implementation. *  * Specific implementations then just need to provide the  * loader with the URLs to discover and then trigger the  * discovery process. *  * @author Geoffrey Shuetrim (geoff@galexy.net) */public abstract class DOMLoadingTestCase extends BaseTestCase {	public DOMLoadingTestCase(String arg0) {		super(arg0);	}	protected Store store = null;	protected Loader loader = null;		private XBRLXLinkHandlerImpl xlinkHandler = null;	private XLinkProcessor xlinkProcessor = null;	private EntityResolver entityResolver = null;		protected void setUp() throws Exception {		super.setUp();		store = new StoreImpl();		xlinkHandler = new XBRLXLinkHandlerImpl();		XBRLCustomLinkRecogniserImpl clr = new XBRLCustomLinkRecogniserImpl(); 		xlinkProcessor = new XLinkProcessorImpl(xlinkHandler ,clr);		File cacheFile = new File(configuration.getProperty("local.cache"));		entityResolver = new EntityResolverImpl(cacheFile);		loader = new LoaderImpl(store,xlinkProcessor);		loader.setCache(new CacheImpl(cacheFile));		loader.setEntityResolver(entityResolver);		xlinkHandler.setLoader(loader);	}		protected void tearDown() throws Exception {		super.tearDown();	}	}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -