Search in sources :

Example 1 with DataGridRule

use of com.emc.metalnx.core.domain.entity.DataGridRule in project metalnx-web by irods-contrib.

the class RuleServiceImpl method execIlluminaMetadataRule.

@Override
public void execIlluminaMetadataRule(DataGridResource dgResc, String targetPath, String objPath) throws DataGridRuleException, DataGridConnectionRefusedException {
    if (!DataGridCoreUtils.isIllumina(objPath))
        return;
    logger.info("Illumina Rule called");
    String destResc = dgResc.getName();
    String host = dgResc.getHost();
    boolean declareOutputParams = false;
    DataGridRule tarRule = new DataGridRule(DataGridRule.TAR_RULE, host, declareOutputParams);
    tarRule.setInputRuleParams(objPath, targetPath, destResc);
    tarRule.setOutputRuleParams("Status");
    DataGridRule illuminaRule = new DataGridRule(DataGridRule.ILLUMINA_RULE, host, declareOutputParams);
    illuminaRule.setInputRuleParams(objPath, destResc);
    executeRule(tarRule.toString());
    executeRule(illuminaRule.toString());
}
Also used : DataGridRule(com.emc.metalnx.core.domain.entity.DataGridRule)

Example 2 with DataGridRule

use of com.emc.metalnx.core.domain.entity.DataGridRule in project metalnx-web by irods-contrib.

the class RuleServiceImpl method execReplDataObjRule.

@Override
public void execReplDataObjRule(String destResc, String path, boolean inAdminMode) throws DataGridRuleException, DataGridConnectionRefusedException {
    logger.info("Get Replication Rule called");
    String flags = String.format("destRescName=%s%s", destResc, inAdminMode ? "++++irodsAdmin=" : "");
    DataGridResource dgResc = rs.find(destResc);
    DataGridRule rule = new DataGridRule(DataGridRule.REPL_DATA_OBJ_RULE, dgResc.getHost());
    rule.setInputRuleParams(path, flags, "null");
    executeRule(rule.toString());
}
Also used : DataGridRule(com.emc.metalnx.core.domain.entity.DataGridRule) DataGridResource(com.emc.metalnx.core.domain.entity.DataGridResource)

Example 3 with DataGridRule

use of com.emc.metalnx.core.domain.entity.DataGridRule in project metalnx-web by irods-contrib.

the class RuleServiceImpl method execBamCramMetadataRule.

@Override
public void execBamCramMetadataRule(String host, String objPath, String filePath) throws DataGridRuleException, DataGridConnectionRefusedException {
    if (!DataGridCoreUtils.isBamOrCram(objPath))
        return;
    logger.info("Get BAM/CRAM Rule called");
    DataGridRule rule = new DataGridRule(DataGridRule.BAM_CRAM_RULE, host);
    rule.setInputRuleParams(objPath, filePath);
    executeRule(rule.toString());
}
Also used : DataGridRule(com.emc.metalnx.core.domain.entity.DataGridRule)

Example 4 with DataGridRule

use of com.emc.metalnx.core.domain.entity.DataGridRule in project metalnx-web by irods-contrib.

the class RuleServiceImpl method execVCFMetadataRule.

@Override
public void execVCFMetadataRule(String host, String objPath, String filePath) throws DataGridRuleException, DataGridConnectionRefusedException {
    if (!DataGridCoreUtils.isVCFFile(objPath))
        return;
    DataGridRule rule = new DataGridRule(DataGridRule.VCF_RULE, host);
    rule.setInputRuleParams(objPath, filePath);
    executeRule(rule.toString());
}
Also used : DataGridRule(com.emc.metalnx.core.domain.entity.DataGridRule)

Example 5 with DataGridRule

use of com.emc.metalnx.core.domain.entity.DataGridRule in project metalnx-web by irods-contrib.

the class RuleServiceImpl method execGetMSIsRule.

@Override
public List<String> execGetMSIsRule(String host) throws DataGridConnectionRefusedException, DataGridRuleException {
    logger.info("Get Microservices Rule called");
    DataGridRule rule = new DataGridRule(DataGridRule.GET_MSIS_RULE, host);
    rule.setOutputRuleParams("msis");
    logger.debug(rule.toString());
    return DataGridCoreUtils.getMSIsAsList((String) executeRule(rule.toString()).get("*msis").getResultObject());
}
Also used : DataGridRule(com.emc.metalnx.core.domain.entity.DataGridRule)

Aggregations

DataGridRule (com.emc.metalnx.core.domain.entity.DataGridRule)16 Test (org.junit.Test)5 DataGridResource (com.emc.metalnx.core.domain.entity.DataGridResource)2 DataGridCollectionAndDataObject (com.emc.metalnx.core.domain.entity.DataGridCollectionAndDataObject)1