Package org.dozer.util

Examples of org.dozer.util.DozerClassLoader.loadResource()


    }

    log.info("Trying to find Dozer configuration file: {}", propFileName);
    // Load prop file. Prop file is optional, so if it's not found just use defaults
    DozerClassLoader classLoader = BeanContainer.getInstance().getClassLoader();
    URL url = classLoader.loadResource(propFileName);
    if (url == null) {
      log.warn("Dozer configuration file not found: {}.  Using defaults for all Dozer global properties.", propFileName);
      return;
    } else {
      log.info("Using URL [{}] for Dozer global property configuration", url);
View Full Code Here


    if (systemId != null && systemId.indexOf(DozerConstants.XSD_NAME) > systemId.lastIndexOf("/")) {
      String fileName = systemId.substring(systemId.indexOf(DozerConstants.XSD_NAME));
      log.debug("Trying to locate [{}] in classpath", fileName);
      try {
        DozerClassLoader classLoader = BeanContainer.getInstance().getClassLoader();
        URL url = classLoader.loadResource(fileName);
        InputStream stream = url.openStream();
        InputSource source = new InputSource(stream);
        source.setPublicId(publicId);
        source.setSystemId(systemId);
        log.debug("Found beanmapping XML Schema [{}] in classpath", systemId);
View Full Code Here

    documentBuilder = parserFactory.createParser();
  }

  public MappingFileData read(String fileName) {
    DozerClassLoader classLoader = BeanContainer.getInstance().getClassLoader();
    URL url = classLoader.loadResource(fileName);
    return read(url);
  }

  public MappingFileData read(URL url) {
    MappingFileData result = null;
View Full Code Here

    streamReader = new MappingStreamReader(parserFactory);
  }

  public MappingFileData read(String fileName) {
    DozerClassLoader classLoader = BeanContainer.getInstance().getClassLoader();
    URL url = classLoader.loadResource(fileName);
    return read(url);
  }

  public MappingFileData read(URL url) {
    MappingFileData result = null;
View Full Code Here

    if (systemId != null && systemId.indexOf(DozerConstants.XSD_NAME) > systemId.lastIndexOf("/")) {
      String fileName = systemId.substring(systemId.indexOf(DozerConstants.XSD_NAME));
      log.debug("Trying to locate [{}] in classpath", fileName);
      try {
        DozerClassLoader classLoader = BeanContainer.getInstance().getClassLoader();
        URL url = classLoader.loadResource(fileName);
        InputStream stream = url.openStream();
        InputSource source = new InputSource(stream);
        source.setPublicId(publicId);
        source.setSystemId(systemId);
        log.debug("Found beanmapping XML Schema [{}] in classpath", systemId);
View Full Code Here

    }

    log.info("Trying to find Dozer configuration file: {}", propFileName);
    // Load prop file. Prop file is optional, so if it's not found just use defaults
    DozerClassLoader classLoader = BeanContainer.getInstance().getClassLoader();
    URL url = classLoader.loadResource(propFileName);
    if (url == null) {
      log.warn("Dozer configuration file not found: {}.  Using defaults for all Dozer global properties.", propFileName);
      return;
    } else {
      log.info("Using URL [{}] for Dozer global property configuration", url);
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.