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


Java FaultHelper.setDescription方法代码示例

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


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

示例1: getApplicationServiceForUMLProjectIdentifier

import gov.nih.nci.cagrid.common.FaultHelper; //导入方法依赖的package包/类
private ApplicationService getApplicationServiceForUMLProjectIdentifier(UMLProjectIdentifer umlProjectIdentifer)
    throws InvalidUMLProjectIndentifier, MMSGeneralException {

    SourceDescriptor desc = getSourceDescriptorForUMLProjectIdentifier(umlProjectIdentifer);
    if (desc == null) {
        InvalidUMLProjectIndentifier fault = new InvalidUMLProjectIndentifier();
        FaultHelper helper = new FaultHelper(fault);
        helper
            .setDescription("The source ("
                + umlProjectIdentifer.getSourceIdentifier()
                + ") specified in the UMLProjectIdentifier is not supported.  View the ModelSourceMetadata for supported sources.");
        throw (InvalidUMLProjectIndentifier) helper.getFault();
    }

    return getApplicationService(desc.getIdentifier());
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:17,代码来源:CaDSRMMSImpl.java

示例2: generateDomainModelForPackages

import gov.nih.nci.cagrid.common.FaultHelper; //导入方法依赖的package包/类
public gov.nih.nci.cagrid.metadata.dataservice.DomainModel generateDomainModelForPackages(org.cagrid.mms.domain.UMLProjectIdentifer umlProjectIdentifer,java.lang.String[] packageNames) throws RemoteException, org.cagrid.mms.stubs.types.InvalidUMLProjectIndentifier {

        if (umlProjectIdentifer == null) {
            InvalidUMLProjectIndentifier fault = new InvalidUMLProjectIndentifier();
            FaultHelper helper = new FaultHelper(fault);
            helper.setDescription("A null UMLProjectIdentifier cannot be used!");
            throw (InvalidUMLProjectIndentifier) helper.getFault();
        }

        Collection<String> packages = new ArrayList<String>();
        if (packageNames != null) {
            for (String pkg : packageNames) {
                packages.add(pkg);
            }
        }

        try {
            return getMms().generateDomainModelForPackages(umlProjectIdentifer, packages);
        } catch (MMSGeneralException e) {
            // TODO: replace with typed exception?
            throw new RemoteException(e.getMessage(), e);
        }
    }
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:MetadataModelServiceImpl.java

示例3: generateDomainModelForClasses

import gov.nih.nci.cagrid.common.FaultHelper; //导入方法依赖的package包/类
public gov.nih.nci.cagrid.metadata.dataservice.DomainModel generateDomainModelForClasses(org.cagrid.mms.domain.UMLProjectIdentifer umlProjectIdentifer,java.lang.String[] fullyQualifiedClassNames) throws RemoteException, org.cagrid.mms.stubs.types.InvalidUMLProjectIndentifier {

        if (umlProjectIdentifer == null) {
            InvalidUMLProjectIndentifier fault = new InvalidUMLProjectIndentifier();
            FaultHelper helper = new FaultHelper(fault);
            helper.setDescription("A null UMLProjectIdentifier cannot be used!");
            throw (InvalidUMLProjectIndentifier) helper.getFault();
        }

        Collection<String> classes = new ArrayList<String>();
        if (fullyQualifiedClassNames != null) {
            for (String className : fullyQualifiedClassNames) {
                classes.add(className);
            }
        }

        try {
            return getMms().generateDomainModelForClasses(umlProjectIdentifer, classes);
        } catch (MMSGeneralException e) {
            // TODO: replace with typed exception?
            throw new RemoteException(e.getMessage(), e);
        }
    }
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:24,代码来源:MetadataModelServiceImpl.java

示例4: getAggregateResults

import gov.nih.nci.cagrid.common.FaultHelper; //导入方法依赖的package包/类
public org.cagrid.cql2.results.CQLQueryResults getAggregateResults() throws RemoteException,
    gov.nih.nci.cagrid.fqp.stubs.types.FederatedQueryProcessingFault,
    gov.nih.nci.cagrid.fqp.results.stubs.types.ProcessingNotCompleteFault,
    gov.nih.nci.cagrid.fqp.results.stubs.types.InternalErrorFault {
    FederatedQueryResultsRetrievalResource resource = getResource();
    testForErrors(resource);
    DCQLQueryResultsCollection dcqlResults = resource.getResults();
    CQLQueryResults cqlResults = null;
    try {
        cqlResults = DCQL2Aggregator.aggregateDCQLResults(dcqlResults, 
            resource.getQuery().getTargetObject().getName(), resource.getQuery().getQueryModifier());
    } catch (FederatedQueryProcessingException e) {
        FaultHelper helper = new FaultHelper(new FederatedQueryProcessingFault());
        helper.setDescription(e.getMessage());
        helper.addFaultCause(e);
        throw (FederatedQueryProcessingFault) helper.getFault();
    }
    return cqlResults;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:20,代码来源:FederatedQueryResultsRetrievalImpl.java

示例5: createProjectPrototypeFromIdentifier

import gov.nih.nci.cagrid.common.FaultHelper; //导入方法依赖的package包/类
private Project createProjectPrototypeFromIdentifier(UMLProjectIdentifer umlProjectIdentifer)
    throws InvalidUMLProjectIndentifier {
    // create the prototype
    Project prototype = new Project();
    prototype.setVersion(umlProjectIdentifer.getVersion());
    // TODO is this what I want to map identifier too (or could I map it to
    // either short or long name)
    prototype.setShortName(umlProjectIdentifer.getIdentifier());

    // process any additional source properties
    Property[] props = umlProjectIdentifer.getAdditionalSourceProperty();
    if (props != null) {
        for (Property prop : props) {
            String name = prop.getName();
            String value = prop.get_value();
            if (name.equals(SOURCE_PROPERTY_PUBLIC_ID)) {
                prototype.setPublicID(Long.valueOf(value));
            } else if (name.equals(SOURCE_PROPERTY_LONG_NAME)) {
                prototype.setLongName(value);
            } else if (name.equals(SOURCE_PROPERTY_GME_NAMESPACE)) {
                prototype.setGmeNamespace(value);
            } else {
                InvalidUMLProjectIndentifier fault = new InvalidUMLProjectIndentifier();
                FaultHelper helper = new FaultHelper(fault);
                helper
                    .setDescription("The source property("
                        + name
                        + ") specified in the UMLProjectIdentifier is not supported.  View the ModelSourceMetadata for supported source property.");
                throw (InvalidUMLProjectIndentifier) helper.getFault();
            }
        }
    }
    return prototype;
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:35,代码来源:CaDSRMMSImpl.java

示例6: generateDomainModelForProject

import gov.nih.nci.cagrid.common.FaultHelper; //导入方法依赖的package包/类
public gov.nih.nci.cagrid.metadata.dataservice.DomainModel generateDomainModelForProject(org.cagrid.mms.domain.UMLProjectIdentifer umlProjectIdentifer) throws RemoteException, org.cagrid.mms.stubs.types.InvalidUMLProjectIndentifier {
    if (umlProjectIdentifer == null) {
        InvalidUMLProjectIndentifier fault = new InvalidUMLProjectIndentifier();
        FaultHelper helper = new FaultHelper(fault);
        helper.setDescription("A null UMLProjectIdentifier cannot be used!");
        throw (InvalidUMLProjectIndentifier) helper.getFault();
    }

    try {
        return getMms().generateDomainModelForProject(umlProjectIdentifer);
    } catch (MMSGeneralException e) {
        // TODO: replace with typed exception?
        throw new RemoteException(e.getMessage(), e);
    }
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:16,代码来源:MetadataModelServiceImpl.java

示例7: generateDomainModelForClassesWithExcludes

import gov.nih.nci.cagrid.common.FaultHelper; //导入方法依赖的package包/类
public gov.nih.nci.cagrid.metadata.dataservice.DomainModel generateDomainModelForClassesWithExcludes(org.cagrid.mms.domain.UMLProjectIdentifer umlProjectIdentifer,java.lang.String[] fullyQualifiedClassNames,org.cagrid.mms.domain.UMLAssociationExclude[] umlAssociationExclude) throws RemoteException, org.cagrid.mms.stubs.types.InvalidUMLProjectIndentifier {

        if (umlProjectIdentifer == null) {
            InvalidUMLProjectIndentifier fault = new InvalidUMLProjectIndentifier();
            FaultHelper helper = new FaultHelper(fault);
            helper.setDescription("A null UMLProjectIdentifier cannot be used!");
            throw (InvalidUMLProjectIndentifier) helper.getFault();
        }

        Collection<String> classes = new ArrayList<String>();
        if (fullyQualifiedClassNames != null) {
            for (String className : fullyQualifiedClassNames) {
                classes.add(className);
            }
        }

        Collection<UMLAssociationExclude> excludes = new ArrayList<UMLAssociationExclude>();
        if (umlAssociationExclude != null) {
            for (UMLAssociationExclude exclude : umlAssociationExclude) {
                excludes.add(exclude);
            }
        }

        try {
            return getMms().generateDomainModelForClassesWithExcludes(umlProjectIdentifer, classes, excludes);
        } catch (MMSGeneralException e) {
            // TODO: replace with typed exception?
            throw new RemoteException(e.getMessage(), e);
        }
    }
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:31,代码来源:MetadataModelServiceImpl.java

示例8: getTypedException

import gov.nih.nci.cagrid.common.FaultHelper; //导入方法依赖的package包/类
/**
 * Helper method to easily and consistently create a typed exception
 * 
 * @param cause
 * @param fault
 * @return
 * @throws IllegalAccessException 
 * @throws InstantiationException 
 */
@SuppressWarnings("unchecked")
protected <T extends BaseFaultType> T getTypedException(Exception cause, T faultType) {
    FaultHelper helper = new FaultHelper(faultType);
    helper.addFaultCause(cause);
    helper.setDescription(cause.getClass().getSimpleName() + " -- " + cause.getMessage());
    return (T) helper.getFault();
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:17,代码来源:BaseDataServiceImpl.java


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