Package org.apache.oodt.cas.filemgr.system

Examples of org.apache.oodt.cas.filemgr.system.XmlRpcFileManager


                     mimeTypesUrl.getFile()).getAbsolutePath());

        System.setProperties(properties);

        try {
            fm = new XmlRpcFileManager(FM_PORT);
        } catch (Exception e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
    }
View Full Code Here


                     mimeTypesUrl.getFile()).getAbsolutePath());

        System.setProperties(properties);

        try {
            fm = new XmlRpcFileManager(FM_PORT);
        } catch (Exception e) {
            fail(e.getMessage());
        }
    }
View Full Code Here

                     mimeTypesUrl.getFile()).getAbsolutePath());

        System.setProperties(properties);

        try {
            fm = new XmlRpcFileManager(FM_PORT);
        } catch (Exception e) {
            fail(e.getMessage());
        }
    }
View Full Code Here

                     mimeTypesUrl.getFile()).getAbsolutePath());

        System.setProperties(properties);

        try {
            fm = new XmlRpcFileManager(FM_PORT);
        } catch (Exception e) {
            fail(e.getMessage());
        }
    }
View Full Code Here

    }
   
    private void startXmlRpcFileManager() {
        try {
            fmServer = new XmlRpcFileManager(FILEMGR_PORT);
            fmServer.setCatalog(new HsqlDbFriendlyDataSourceCatalogFatory().createCatalog());
        } catch (Exception e) {
            fail(e.getMessage());
        }
    }
View Full Code Here

    private XmlRpcFileManager startXmlRpcFileManager(int port, String catPath) {

        Properties properties = new Properties(System.getProperties());

        XmlRpcFileManager fileMgr = null;
       
        // first make sure to load properties for the file manager
        // and make sure to load logging properties as well

        // set the log levels
        URL loggingPropertiesUrl = this.getClass().getResource(
            "/test.logging.properties");
        properties.setProperty("java.util.logging.config.file", new File(
            loggingPropertiesUrl.getFile()).getAbsolutePath());
       
       
        // first load the example configuration
        try {
            URL filemgrPropertiesUrl = this.getClass().getResource(
                "/filemgr.properties");
            properties.load(
                new FileInputStream(new File(filemgrPropertiesUrl.getFile())));
        } catch (Exception e) {
            fail(e.getMessage());
        }

        // override the catalog to use: we'll use lucene
        properties.setProperty("filemgr.catalog.factory",
                "org.apache.oodt.cas.filemgr.catalog.LuceneCatalogFactory");
        properties.setProperty(
                "org.apache.oodt.cas.filemgr.catalog.lucene.idxPath",
                catPath);

        // now override the repo mgr policy
        URL fmpolicyUrl = this.getClass().getResource("/ingest/fmpolicy");
        try {
          properties.setProperty(
              "org.apache.oodt.cas.filemgr.repositorymgr.dirs",
              "file://" + new File(fmpolicyUrl.getFile()).getCanonicalPath());
        } catch (Exception e) {
            fail(e.getMessage());
        }

        // now override the val layer ones
        properties.setProperty("org.apache.oodt.cas.filemgr.validation.dirs",
            "file://" + new File(fmpolicyUrl.getFile()).getAbsolutePath());

        // set up mime repo path
        URL mimeTypesUrl = this.getClass().getResource("/mime-types.xml");
        properties.setProperty(
            "org.apache.oodt.cas.filemgr.mime.type.repository",
            new File(mimeTypesUrl.getFile()).getAbsolutePath());

        System.setProperties(properties);

        try {
            fileMgr = new XmlRpcFileManager(port);
        } catch (Exception e) {
            fail(e.getMessage());
        }

        return fileMgr;
View Full Code Here

            new File(mimeTypesUrl.getFile()).getAbsolutePath());

        System.setProperties(properties);

        try {
            fm = new XmlRpcFileManager(FM_PORT);
        } catch (Exception e) {
            fail(e.getMessage());
        }
    }
View Full Code Here

        // Use the local properties object to set system properties.
        System.setProperties(properties);

        try {
            fmServer = new XmlRpcFileManager(FILEMGR_PORT);
        } catch (Exception e) {
            fail(e.getMessage());
        }
    }
View Full Code Here

      // Test success case.
      System.setProperty("filemgr.catalog.factory", "");
      System.setProperty("filemgr.repository.factory", "");
      int port = 9876;
      XmlRpcFileManager filemgr = new XmlRpcFileManager(port);
      String filemgrUrl = "http://localhost:" + port;
      pgeMetadata = createStrictMock(PgeMetadata.class);
      expect(pgeMetadata.getMetadata(PgeTaskMetKeys.QUERY_FILE_MANAGER_URL))
            .andReturn(filemgrUrl);
      replay(pgeMetadata);

      assertEquals(filemgrUrl, FileStager.createFileManagerClient(pgeMetadata)
            .getFileManagerUrl().toString());
      verify(pgeMetadata);
      filemgr.shutdown();
   }
View Full Code Here

    }
   
    private void startXmlRpcFileManager() {
        try {
            fmServer = new XmlRpcFileManager(FILEMGR_PORT);
            fmServer.setCatalog(new HsqlDbFriendlyDataSourceCatalogFatory().createCatalog());
        } catch (Exception e) {
            fail(e.getMessage());
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.filemgr.system.XmlRpcFileManager

Copyright © 2018 www.massapicom. 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.