Examples of FileResource


Examples of helma.framework.repository.FileResource

            }
        }

        // create system properties
        ResourceProperties sysProps = new ResourceProperties();
        sysProps.addResource(new FileResource(config.getPropFile()));

        // try to get hopHome from property file
        if (!config.hasHomeDir() && sysProps.getProperty("hophome") != null) {
            config.setHomeDir(new File(sysProps.getProperty("hophome")));
        }
View Full Code Here

Examples of helma.framework.repository.FileResource

            file = new File(hopHome, "db.properties");
        }

        dbProps = new ResourceProperties();
        dbProps.setIgnoreCase(false);
        dbProps.addResource(new FileResource(file));
        DbSource.setDefaultProps(dbProps);

        // read apps.properties file
        String appsPropfile = sysProps.getProperty("appsPropFile");
        if ((appsPropfile != null) && !"".equals(appsPropfile.trim())) {
            file = new File(appsPropfile);
        } else {
            file = new File(hopHome, "apps.properties");
        }
        appsProps = new ResourceProperties();
        appsProps.setIgnoreCase(true);
        appsProps.addResource(new FileResource(file));

        paranoid = "true".equalsIgnoreCase(sysProps.getProperty("paranoid"));

        String language = sysProps.getProperty("language");
        String country = sysProps.getProperty("country");
View Full Code Here

Examples of helma.framework.repository.FileResource

            // TODO: check for lower case prototype name for backwards compat

            File f = new File(b.toString());

            if (f.exists() && f.canRead()) {
                return Skin.getSkin(new FileResource(f), app);
            }
        }

        // Inheritance is taken care of in the above getSkin method.
        // the sequence is prototype.skin-from-db, prototype.skin-from-file, parent.from-db, parent.from-file etc.
View Full Code Here

Examples of httl.spi.loaders.resources.FileResource

    File file = new File(directory);
    return UrlUtils.listFile(file, suffix);
  }
 
  protected Resource doLoad(String name, Locale locale, String encoding, String path) throws IOException {
    return new FileResource(getEngine(), name, locale, encoding, path);
  }
View Full Code Here

Examples of org.apache.ambari.view.pig.resources.files.FileResource

      FilePaginator paginator = new FilePaginator(filePath, context);

      if (page == null)
        page = 0L;

      FileResource file = new FileResource();
      file.setFilePath(filePath);
      file.setFileContent(paginator.readPage(page));
      file.setHasNext(paginator.pageCount() > page + 1);
      file.setPage(page);
      file.setPageCount(paginator.pageCount());

      JSONObject object = new JSONObject();
      object.put("file", file);
      return Response.ok(object).status(200).build();
    } catch (WebApplicationException ex) {
View Full Code Here

Examples of org.apache.avalon.excalibur.monitor.FileResource

            getLogger().info( "Aquired Active monitor" );
            for ( int i = 0; i < 500; i++ )
            {
                final int threadNum = i;
                final Thread thread = new Thread() {
                    Resource resource = new FileResource( "testts-" + threadNum + ".txt" );

                    public void run()
                    {
                        while ( true )
                        {
View Full Code Here

Examples of org.apache.ctakes.core.resource.FileResource

    IndexReader indexReader;
    String indexDirAbsPath = null;
    try {
     
      // ohnlp Bugs tracker ID: 3425014 SNOMED lucene dictionary lookup hardcodes resource path
      FileResource fResrc = (FileResource) aCtx.getResourceObject(SNOMED_CODE_LIST_CONFIG_PARM);
      if (fResrc == null) logger.error("Unable to find config parm " + SNOMED_CODE_LIST_CONFIG_PARM +  ".");
      File indexDir = fResrc.getFile();
      indexDirAbsPath = indexDir.getAbsolutePath();

      try {
        logger.info("Using lucene index: " + indexDir.getAbsolutePath());
      }
View Full Code Here

Examples of org.apache.derby.iapi.store.access.FileResource

      throw StandardException.newException(SQLState.LANG_FILE_DOES_NOT_EXIST, sqlName,schemaName);

    long generationId = fid.getGenerationId();

        ContextManager cm = ContextService.getFactory().getCurrentContextManager();
    FileResource fr = af.getTransaction(cm).getFileHandler();

    String externalName = JarUtil.mkExternalName(schemaName, sqlName, fr.getSeparatorChar());

    return fr.getAsFile(externalName, generationId);
  }
View Full Code Here

Examples of org.apache.derby.iapi.store.access.FileResource

      throw StandardException.newException(SQLState.LANG_FILE_DOES_NOT_EXIST, sqlName,schemaName);

    long generationId = fid.getGenerationId();

        ContextManager cm = ContextService.getFactory().getCurrentContextManager();
    FileResource fr = af.getTransaction(cm).getFileHandler();

    String externalName = JarUtil.mkExternalName(schemaName, sqlName, fr.getSeparatorChar());

    return fr.getAsFile(externalName, generationId);
  }
View Full Code Here

Examples of org.apache.derby.iapi.store.access.FileResource

     throws StandardException
  {
    if (!removeAtOnce)
      return false;

    FileResource fr = ((RawTransaction) xact).getDataFactory().getFileHandler();

    fileToGo = fr.getAsFile(name, generationId);

    if (fileToGo == null)
      return false;

        return fileToGo.exists();
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.