Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSBundle.pathURLForResourcePath()


            }
            if (wonderVersion == "" && ERXApplication.isDevelopmentModeSafe()) {
                // running within Eclipse and no Info.plist has been generated so look at maven config
                FileInputStream is = null;
                try {
                    URL path = bundle.pathURLForResourcePath("../pom.xml");
                    File pomFile = new File(path.toURI());
                    if (pomFile.exists()) {
                        is = new FileInputStream(pomFile);
                        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                        DocumentBuilder builder = factory.newDocumentBuilder();
View Full Code Here


          NSBundle bundle = (NSBundle) bundles.nextElement();
         
          // Get list of all files with extension indexModel
          NSArray<String> files = bundle.resourcePathsForResources("indexModel", null);
          for (String file : files) {
              URL url = bundle.pathURLForResourcePath(file);
             
              // Get the name of the indexModel file withut the directory path and without the file extension
              String name = url.toString().replaceAll(".*?/(\\w+)\\.indexModel$", "$1");
              if(url != null) {
               
View Full Code Here

        }
        String modelPath = NSPathUtilities.stringByDeletingLastPathComponent(indexPath);
        String modelName = (NSPathUtilities.stringByDeletingPathExtension(NSPathUtilities.lastPathComponent(modelPath)));
        EOModel eomodel = modelNamed(modelName);
        if (eomodel == null) {
          URL url = nsbundle.pathURLForResourcePath(modelPath);
          modelNameURLDictionary.setObjectForKey(url, modelName);
          modelNames.addObject(modelName);
        }
        else if (NSLog.debugLoggingAllowedForLevelAndGroups(1, 32768L)) {
          NSLog.debug.appendln("Ignoring model at path \"" + modelPath + "\" because the model group " + this + " already contains the model from the path \"" + eomodel.pathURL() + "\"");
View Full Code Here

          if (propFramework == null)
            bundle = NSBundle.mainBundle();
          else
            bundle = NSBundle.bundleForName(propFramework);
          if (bundle != null)
            propFileURL = bundle.pathURLForResourcePath(propFileName);
          if (propFileURL == null)
            log.error("method: getScheduler: unable to get the path to the properties file: " + propFileName + " in the framework: " + propFramework + ".\nThe Quartz scheduler is not launched.");
          else
          {
            filePath = propFileURL.getFile();
View Full Code Here

              URL url = application.resourceManager().pathURLForResourceNamed(fileName, frameworkName, languages);
              if(url != null) {
                  path = url.getFile();
              }
          } else if( bundle != null ) {
            URL url = bundle.pathURLForResourcePath(fileName);
              if(url != null) {
                  path = url.getFile();
              }
          }
        }
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.