Spring Framework ResourceEntityResolver - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework ResourceEntityResolver class.

This code example shows how to use the following methods:
    } 
 
    @BeforeClass 
    public static void initSchemas() { 
        sps = new SpringPluggableSchemas();
        resolver = new SchemaEntityResolver(new ResourceEntityResolver(new DefaultResourceLoader()), sps);
    } 
 
    @Before 
    public void initReader() throws Exception {
        reader = new SAXReader(true);
        reader.setEntityResolver(resolver);
        reader.setProperty(SCHEMA_LANGUAGE_ATTRIBUTE, XSD_SCHEMA_LANGUAGE);
    } 
 
    @Test
    public void parseBoolean() throws Exception {
        assertBoolean("true"); 
        assertBoolean("false"); 
        assertBoolean("${placeholder:defaultValue}"); 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 
		// Configure the bean definition reader with this context's 
		// resource loading environment. 
		beanDefinitionReader.setEnvironment(this.getEnvironment());
		beanDefinitionReader.setResourceLoader(this);
		beanDefinitionReader.setEntityResolver(new ResourceEntityResolver(this));
 
		// Allow a subclass to provide custom initialization of the reader, 
		// then proceed with actually loading the bean definitions. 
		initBeanDefinitionReader(beanDefinitionReader);
		loadBeanDefinitions(beanDefinitionReader);
	} 
 
	/** 
	 * Initialize the bean definition reader used for loading the bean 
	 * definitions of this context. Default implementation is empty. 
	 * <p>Can be overridden in subclasses, e.g. for turning off XML validation 
	 * or using a different XmlBeanDefinitionParser implementation. 
	 * @param reader the bean definition reader used by this context 
	 * @see org.springframework.beans.factory.xml.XmlBeanDefinitionReader#setDocumentReaderClass 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
        TestEnvStatic.init(); 
    } 
 
    @Before 
    public void init() { 
        resolver = new SchemaEntityResolver(new ResourceEntityResolver(new DefaultResourceLoader()));
    } 
 
    @Test
    public void resolveDefault_resourceLoader() throws SAXException, IOException {
        InputSource source = resolver.resolveEntity(null, "classpath:dummy.txt");
 
        assertEquals("dummy", getContent(source));
        assertEquals("classpath:dummy.txt", source.getSystemId());
    } 
 
    @Test
    public void resolveDefault_springSchemas() throws SAXException, IOException {
        InputSource source = resolver.resolveEntity(null,
                                                    "http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"); 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 
		// Configure the bean definition reader with this context's 
		// resource loading environment. 
		beanDefinitionReader.setEnvironment(getEnvironment()); 
		beanDefinitionReader.setResourceLoader(this); 
		beanDefinitionReader.setEntityResolver(new ResourceEntityResolver(this)); 
 
		// Allow a subclass to provide custom initialization of the reader, 
		// then proceed with actually loading the bean definitions. 
		initBeanDefinitionReader(beanDefinitionReader); 
		loadBeanDefinitions(beanDefinitionReader); 
	} 
 
	/** 
	 * Initialize the bean definition reader used for loading the bean 
	 * definitions of this context. Default implementation is empty. 
	 * <p>Can be overridden in subclasses, e.g. for turning off XML validation 
	 * or using a different XmlBeanDefinitionParser implementation. 
	 * @param beanDefinitionReader the bean definition reader used by this context 
	 * @see org.springframework.beans.factory.xml.XmlBeanDefinitionReader#setValidationMode 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 
		// Configure the bean definition reader with this context's 
		// resource loading environment. 
		beanDefinitionReader.setEnvironment(this.getEnvironment());
		beanDefinitionReader.setResourceLoader(this);
		beanDefinitionReader.setEntityResolver(new ResourceEntityResolver(this));
 
		// Allow a subclass to provide custom initialization of the reader, 
		// then proceed with actually loading the bean definitions. 
		initBeanDefinitionReader(beanDefinitionReader);
		loadBeanDefinitions(beanDefinitionReader);
	} 
 
	/** 
	 * Initialize the bean definition reader used for loading the bean 
	 * definitions of this context. Default implementation is empty. 
	 * <p>Can be overridden in subclasses, e.g. for turning off XML validation 
	 * or using a different XmlBeanDefinitionParser implementation. 
	 * @param beanDefinitionReader the bean definition reader used by this context 
	 * @see org.springframework.beans.factory.xml.XmlBeanDefinitionReader#setValidationMode 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
    // Configure the bean definition reader with this context's 
    // resource loading environment. 
 
    beanDefinitionReader.setEnvironment(this.getEnvironment());
    beanDefinitionReader.setResourceLoader(this);
    beanDefinitionReader.setEntityResolver(new ResourceEntityResolver(this));
 
    // Disable xml validating 
    beanDefinitionReader.setValidating(false);
    // Allow a subclass to provide custom initialization of the reader, 
    // then proceed with actually loading the bean definitions. 
    loadBeanDefinitions(beanDefinitionReader);
  } 
 
  protected void loadBeanDefinitions(XmlBeanDefinitionReader reader) throws IOException {
    String[] configLocations = getConfigLocations();
    if (configLocations != null) {
      for (String configLocation : configLocations) {
        reader.loadBeanDefinitions(configLocation);
      } 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java