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


Java ServiceMetadata.getServiceDescription方法代码示例

本文整理汇总了Java中gov.nih.nci.cagrid.metadata.ServiceMetadata.getServiceDescription方法的典型用法代码示例。如果您正苦于以下问题:Java ServiceMetadata.getServiceDescription方法的具体用法?Java ServiceMetadata.getServiceDescription怎么用?Java ServiceMetadata.getServiceDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gov.nih.nci.cagrid.metadata.ServiceMetadata的用法示例。


在下文中一共展示了ServiceMetadata.getServiceDescription方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getServiceVersion

import gov.nih.nci.cagrid.metadata.ServiceMetadata; //导入方法依赖的package包/类
/**
 * This method returns the version of the Grid Service
 * 
 * @return The version of the grid service.
 * @throws InvalidResourcePropertyException
 * @throws ResourcePropertyRetrievalException
 */

public String getServiceVersion() throws InvalidResourcePropertyException, ResourcePropertyRetrievalException {
    ServiceMetadata sm = getServiceMetadata();
    if (sm == null) {
        return VERSION_UNKNOWN;
    } else {
        if (sm.getServiceDescription() != null) {
            if (sm.getServiceDescription().getService() != null) {
                if (sm.getServiceDescription().getService().getVersion() != null) {
                    return sm.getServiceDescription().getService().getVersion();
                } else {
                    return VERSION_UNKNOWN;
                }
            } else {
                return VERSION_UNKNOWN;
            }
        } else {
            return VERSION_UNKNOWN;
        }

    }
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:30,代码来源:DorianBaseClient.java

示例2: annotateServiceMetadata

import gov.nih.nci.cagrid.metadata.ServiceMetadata; //导入方法依赖的package包/类
/**
 * Add caDSR information to model.
 * 
 * @param metadata
 * @throws CaDSRGeneralException
 */
public void annotateServiceMetadata(ServiceMetadata metadata) throws CaDSRGeneralException {
    if (metadata == null || metadata.getServiceDescription() == null
        || metadata.getServiceDescription().getService() == null) {
        return;
    }

    Service service = metadata.getServiceDescription().getService();

    // TODO: how to set caDSR registration?
    CaDSRRegistration caDSRRegistration = service.getCaDSRRegistration();

    // TODO: set/edit service semantic metadata once service's are
    // registered in caDSR
    SemanticMetadata[] semanticMetadatas = service.getSemanticMetadata();

    if (service.getServiceContextCollection() == null
        || service.getServiceContextCollection().getServiceContext() == null) {
        return;
    }
    ServiceContext[] serviceContexts = service.getServiceContextCollection().getServiceContext();
    for (int i = 0; i < serviceContexts.length; i++) {
        annotateServiceContext(serviceContexts[i]);
    }

}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:32,代码来源:ServiceMetadataAnnotator.java

示例3: annotateServiceMetadata

import gov.nih.nci.cagrid.metadata.ServiceMetadata; //导入方法依赖的package包/类
/**
 * Add caDSR information to model.
 * 
 * @param metadata
 * @throws CaDSRGeneralException
 */
public void annotateServiceMetadata(ServiceMetadata metadata) throws CaDSRGeneralException {
    if (metadata == null || metadata.getServiceDescription() == null
        || metadata.getServiceDescription().getService() == null) {
        return;
    }

    Service service = metadata.getServiceDescription().getService();

    // TODO: how to set caDSR registration?
    CaDSRRegistration caDSRRegistration = service.getCaDSRRegistration();

    // TODO: set/edit service semantic metadata once service's are
    // registered in caDSR
    SemanticMetadata[] semanticMetadatas = (SemanticMetadata[])service.getSemanticMetadata().toArray();

    if (service.getServiceContextCollection() == null
        || service.getServiceContextCollection().getServiceContext() == null) {
        return;
    }
    ServiceContext[] serviceContexts = (ServiceContext[])service.getServiceContextCollection().getServiceContext().toArray();
    for (int i = 0; i < serviceContexts.length; i++) {
        annotateServiceContext(serviceContexts[i]);
    }

}
 
开发者ID:NCIP,项目名称:cagrid2,代码行数:32,代码来源:ServiceMetadataAnnotator.java


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