本文整理汇总了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;
}
}
}
示例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]);
}
}
示例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]);
}
}