当前位置: 首页>>代码示例>>Java>>正文


Java CaArrayServer类代码示例

本文整理汇总了Java中gov.nih.nci.caarray.services.CaArrayServer的典型用法代码示例。如果您正苦于以下问题:Java CaArrayServer类的具体用法?Java CaArrayServer怎么用?Java CaArrayServer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CaArrayServer类属于gov.nih.nci.caarray.services包,在下文中一共展示了CaArrayServer类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: main

import gov.nih.nci.caarray.services.CaArrayServer; //导入依赖的package包/类
public static void main(String[] args) {
    ApiArrayDesignDownload client = new ApiArrayDesignDownload();
    try {
        CaArrayServer server = new CaArrayServer(BaseProperties.getServerHostname(), BaseProperties
                .getServerJndiPort());
        server.connect();
        CaArraySearchService searchService = server.getSearchService();
        System.out.println("Downloading array design details for " + ARRAY_DESIGN_NAME);
        client.downloadDetailsFromArrayDesign(server, searchService, ARRAY_DESIGN_NAME);
    } catch (ServerConnectionException e) {
        System.out.println("Could not connect to server.");
        e.printStackTrace();
    } catch (Throwable t) {
        System.out.println("Generic error.");
        t.printStackTrace();
    }
}
 
开发者ID:NCIP,项目名称:caarray,代码行数:18,代码来源:ApiArrayDesignDownload.java

示例2: downloadDetailsFromArrayDesign

import gov.nih.nci.caarray.services.CaArrayServer; //导入依赖的package包/类
private void downloadDetailsFromArrayDesign(CaArrayServer server, CaArraySearchService searchService,
        String arrayDesignName) {
    ArrayDesign arrayDesign = lookupArrayDesign(searchService, arrayDesignName);
    if (arrayDesign == null) {
        System.out.println("Error: Could not find array design.");
        return;
    }
    ArrayDesignDetailsService arrayDesignDetailsService = server.getArrayDesignDetailsService();
    ArrayDesignDetails details = arrayDesignDetailsService.getDesignDetails(arrayDesign);
    if (details != null) {
        System.out.println("Retrieved " + details.getFeatures().size() + " features, "
                + details.getProbeGroups().size() + " probe group(s), " + details.getProbes().size()
                + " physical probes and " + details.getLogicalProbes().size() + " logical probes.");
    } else {
        System.out.println("Error: Retrieved null array design details.");
    }
}
 
开发者ID:NCIP,项目名称:caarray,代码行数:18,代码来源:ApiArrayDesignDownload.java

示例3: main

import gov.nih.nci.caarray.services.CaArrayServer; //导入依赖的package包/类
public static void main(String[] args) {
    ApiSearchExperimentByExample client = new ApiSearchExperimentByExample();
    try {
        // Connect to the server.
        CaArrayServer server = new CaArrayServer(BaseProperties.getServerHostname(), BaseProperties
                .getServerJndiPort());
        server.connect();

        // Get the search service.
        CaArraySearchService searchService = server.getSearchService();

        // Search for experiments.
        System.out.println("Searching for " + ORGANISM_NAME + " experiments run on the " + PROVIDER_NAME
                + " platform...");
        client.searchExperiments(searchService, PROVIDER_NAME, ORGANISM_NAME);
    } catch (ServerConnectionException e) {
        System.out.println("Could not connect to server.");
        e.printStackTrace();
    } catch (Throwable t) {
        System.out.println("Generic error.");
        t.printStackTrace();
    }
}
 
开发者ID:NCIP,项目名称:caarray,代码行数:24,代码来源:ApiSearchExperimentByExample.java

示例4: main

import gov.nih.nci.caarray.services.CaArrayServer; //导入依赖的package包/类
public static void main(String[] args) {
    ApiLoginAndSearch client = new ApiLoginAndSearch();
    try {
        CaArrayServer server = new CaArrayServer(BaseProperties.getServerHostname(), BaseProperties
                .getServerJndiPort());
        CaArraySearchService searchService = null;
        System.out.println("Searching for " + ORGANISM_NAME + " experiments run on the " + PROVIDER_NAME
                + " platform.");

        System.out.println("Searching as an anonymous user...");
        server.connect();
        searchService = server.getSearchService();
        client.searchExperiments(searchService, PROVIDER_NAME, ORGANISM_NAME);

        System.out.println("Searching as credentialled user " + USER_NAME + "...");
        server.connect(USER_NAME, PASSWD);
        searchService = server.getSearchService();
        client.searchExperiments(searchService, PROVIDER_NAME, ORGANISM_NAME);
    } catch (ServerConnectionException e) {
        System.out.println("Could not connect to server.");
        e.printStackTrace();
    } catch (Throwable t) {
        System.out.println("Generic error.");
        t.printStackTrace();
    }
}
 
开发者ID:NCIP,项目名称:caarray,代码行数:27,代码来源:ApiLoginAndSearch.java

示例5: main

import gov.nih.nci.caarray.services.CaArrayServer; //导入依赖的package包/类
public static void main(String[] args) {
    ApiDataSetDownload client = new ApiDataSetDownload();
    try {
        CaArrayServer server = new CaArrayServer(BaseProperties.getServerHostname(), BaseProperties
                .getServerJndiPort());
        server.connect();
        CaArraySearchService searchService = server.getSearchService();
        DataRetrievalService dataService = server.getDataRetrievalService();
        System.out.println("Downloading a DataSet from experiment " + EXPERIMENT_NAME + "...");
        client.getDataSetFromExperiment(searchService, dataService, EXPERIMENT_NAME, QUANTITATION_TYPES_CSV_STRING);
    } catch (ServerConnectionException e) {
        System.out.println("Could not connect to server.");
        e.printStackTrace();
    } catch (Throwable t) {
        System.out.println("Generic error.");
        t.printStackTrace();
    }
}
 
开发者ID:NCIP,项目名称:caarray,代码行数:19,代码来源:ApiDataSetDownload.java

示例6: main

import gov.nih.nci.caarray.services.CaArrayServer; //导入依赖的package包/类
public static void main(String[] args) {
    ApiOneFileDataSetDownload client = new ApiOneFileDataSetDownload();
    try {
        CaArrayServer server = new CaArrayServer(BaseProperties.getServerHostname(), BaseProperties
                .getServerJndiPort());
        server.connect();
        CaArraySearchService searchService = server.getSearchService();
        System.out.println("Downloading a data set corresponding to one data file from Experiment "
                + EXPERIMENT_NAME);
        client.getDataSetFromExperiment(searchService, EXPERIMENT_NAME);
    } catch (ServerConnectionException e) {
        System.out.println("Could not connect to server.");
        e.printStackTrace();
    } catch (Throwable t) {
        System.out.println("Generic error.");
        t.printStackTrace();
    }
}
 
开发者ID:NCIP,项目名称:caarray,代码行数:19,代码来源:ApiOneFileDataSetDownload.java

示例7: main

import gov.nih.nci.caarray.services.CaArrayServer; //导入依赖的package包/类
public static void main(String[] args) {
    ApiFileDownload client = new ApiFileDownload();
    try {
        CaArrayServer server = new CaArrayServer(BaseProperties.getServerHostname(), BaseProperties
                .getServerJndiPort());
        server.connect();
        CaArraySearchService searchService = server.getSearchService();
        FileRetrievalService fileRetrievalService = server.getFileRetrievalService();
        System.out.println("Downloading File Contents from Experiment: " + EXPERIMENT_NAME);
        client.downloadFileFromExperiment(searchService, fileRetrievalService, EXPERIMENT_NAME);
    } catch (ServerConnectionException e) {
        System.out.println("Could not connect to server.");
        e.printStackTrace();
    } catch (Throwable t) {
        System.out.println("Generic error.");
        t.printStackTrace();
    }
}
 
开发者ID:NCIP,项目名称:caarray,代码行数:19,代码来源:ApiFileDownload.java

示例8: downloadDetailsFromArrayDesign

import gov.nih.nci.caarray.services.CaArrayServer; //导入依赖的package包/类
private void downloadDetailsFromArrayDesign(CaArrayServer server, CaArraySearchService searchService, String arrayDesignName) {
    ArrayDesign arrayDesign = lookupArrayDesign(searchService, arrayDesignName);
    if (arrayDesign != null) {
        ArrayDesignDetailsService arrayDesignDetailsService = server.getArrayDesignDetailsService();
        ArrayDesignDetails details = arrayDesignDetailsService.getDesignDetails(arrayDesign);
        logForSilverCompatibility(API_CALL, "ArrayDesignDetailsService.getDesignDetails()");
        if (details != null) {
            logForSilverCompatibility(TEST_OUTPUT, "Retrieved " + arrayDesignName + " with " + details.getFeatures().size() + " features, "
                    + details.getProbeGroups().size() + " probe groups, " + details.getProbes().size()
                    + " probes and " + details.getLogicalProbes().size() + " logical probes.");
            assertTrue(true);
        } else {
            logForSilverCompatibility(TEST_OUTPUT, "Error: Array Design Details was null.");
            assertTrue("Error: Array Design Details was null.", false);
        }
    } else {
        logForSilverCompatibility(TEST_OUTPUT, "Error: Array Design was null.");
        assertTrue("Error: Array Design was null.", false);
    }
}
 
开发者ID:NCIP,项目名称:caarray,代码行数:21,代码来源:ApiArrayDesignDownload.java

示例9: downloadFileFromExperiment

import gov.nih.nci.caarray.services.CaArrayServer; //导入依赖的package包/类
private void downloadFileFromExperiment(CaArrayServer server, CaArraySearchService searchService, String experimentName) {
    Experiment experiment = lookupExperiment(searchService, experimentName);
    if (experiment != null) {
        Hybridization hybridization = getFirstHybridization(searchService, experiment);
        if (hybridization != null) {
            CaArrayFile dataFile = getDataFile(searchService, hybridization);
            if (dataFile != null) {
                logForSilverCompatibility(TEST_OUTPUT, "Downloading file " + dataFile.getName());
                FileRetrievalService fileRetrievalService = server.getFileRetrievalService();
                byte[] byteArray = fileRetrievalService.readFile(dataFile);
                logForSilverCompatibility(API_CALL, "FileRetrievalService.readFile(CaArrayFile)");
                if (byteArray != null) {
                    logForSilverCompatibility(TEST_OUTPUT, "Retrieved " + byteArray.length + " bytes.");
                    assertTrue(byteArray.length > 0);
                } else {
                    logForSilverCompatibility(TEST_OUTPUT, "Error: Retrieved null byte array.");
                    assertTrue("Error: Retrieved null byte array.", false);
                }
            } else {
                logForSilverCompatibility(TEST_OUTPUT, "Error: Retrieved null data file.");
                assertTrue("Error: Retrieved null data file.", false);
            }
        } else {
            logForSilverCompatibility(TEST_OUTPUT,
                    "Error: Retrieved null hybridization for experiment with title " + experimentName);
            assertTrue("Error: Retrieved null hybridization.", false);
        }
    } else {
        logForSilverCompatibility(TEST_OUTPUT, "Error: Could not find experiment " + experimentName);
        assertTrue("Error: Could not find experiment.", false);
    }
}
 
开发者ID:NCIP,项目名称:caarray,代码行数:33,代码来源:ApiFileDownload.java

示例10: connect

import gov.nih.nci.caarray.services.CaArrayServer; //导入依赖的package包/类
public void connect() throws Exception
{

    String hostName = TestProperties.getJavaServerHostname();
    int port = TestProperties.getJavaServerJndiPort();
    System.out.println("Connecting to java server: " + hostName + ":" + port);
    CaArrayServer server = new CaArrayServer(hostName, port);
    server.connect();
    javaSearchService = server.getSearchService();   
    dataService = server.getDataRetrievalService();
    arrayDesignService = server.getArrayDesignDetailsService();
    fileRetrievalService = server.getFileRetrievalService();
}
 
开发者ID:NCIP,项目名称:caarray,代码行数:14,代码来源:JavaApiFacade.java

示例11: connectWithLogin

import gov.nih.nci.caarray.services.CaArrayServer; //导入依赖的package包/类
private void connectWithLogin() throws ServerConnectionException, FailedLoginException
{
    String hostName = TestProperties.getJavaServerHostname();
    int port = TestProperties.getJavaServerJndiPort();
    System.out.println("Connecting to java server: " + hostName + ":" + port);
    CaArrayServer server = new CaArrayServer(hostName, port);
    server.connect("caarrayuser","Pass#1234");
    loginSearchService = server.getSearchService();
}
 
开发者ID:NCIP,项目名称:caarray,代码行数:10,代码来源:JavaApiFacade.java

示例12: connect

import gov.nih.nci.caarray.services.CaArrayServer; //导入依赖的package包/类
/**
 * This will connect the user to caArray server.
 * 
 * @param userName
 * @param password
 * @throws Exception
 */
private void connect(String userName, String password)throws Exception{			
	server = new CaArrayServer(serverName, jndiPort);		
	server.connect(userName, password);
	
	// Need this to use later
	this.userName = userName;
}
 
开发者ID:NCIP,项目名称:webgenome,代码行数:15,代码来源:CaArrayClient.java


注:本文中的gov.nih.nci.caarray.services.CaArrayServer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。