Exemple #1
0
 private MageTabDocumentSet getDocumentSet(MageTabFileSet mtfs) {
   try {
     MageTabDocumentSet mtds = MageTabParser.INSTANCE.parse(mtfs);
     return mtds;
   } catch (Exception ex) {
     throw new Error(ex);
   }
 }
  public MageTabDocumentSet selectRefFiles(Project project, CaArrayFileSet idfFileSet) {
    MageTabDocumentSet documentSet = null;
    final MageTabFileSet inputSet = getInputFileSet(project, idfFileSet);
    try {

      documentSet = MageTabParser.INSTANCE.parseDataFileNames(inputSet);
      handleSelectRefFilesResult(idfFileSet, this.translator.validate(documentSet, idfFileSet));
    } catch (final MageTabParsingException e) {
      updateFileStatus(idfFileSet, FileStatus.VALIDATION_ERRORS);
    } catch (final InvalidDataException e) {
      handleResult(idfFileSet, e.getValidationResult());
    }

    return documentSet;
  }
 public MageTabDocumentSet validateFiles(Project targetProject, CaArrayFileSet fileSet) {
   LOG.info("Validating MAGE-TAB document set");
   updateFileStatus(fileSet, FileStatus.VALIDATING);
   MageTabDocumentSet documentSet = null;
   final MageTabFileSet inputSet = getInputFileSet(targetProject, fileSet);
   try {
     updateFileStatus(fileSet, FileStatus.VALIDATED);
     documentSet = MageTabParser.INSTANCE.parse(inputSet);
     handleResult(fileSet, this.translator.validate(documentSet, fileSet));
   } catch (final MageTabParsingException e) {
     updateFileStatus(fileSet, FileStatus.VALIDATION_ERRORS);
   } catch (final InvalidDataException e) {
     handleResult(fileSet, e.getValidationResult());
   }
   this.searchDao.save(fileSet.getFiles());
   return documentSet;
 }
 /** {@inheritDoc} */
 @Override
 public MageTabDocumentSet importFiles(Project targetProject, CaArrayFileSet fileSet)
     throws MageTabParsingException {
   LOG.info("Importing MAGE-TAB document set");
   updateFileStatus(fileSet, FileStatus.IMPORTING);
   final MageTabFileSet inputSet = getInputFileSet(targetProject, fileSet);
   MageTabDocumentSet documentSet = null;
   try {
     documentSet = MageTabParser.INSTANCE.parse(inputSet);
     final CaArrayTranslationResult translationResult =
         this.translator.translate(documentSet, fileSet);
     save(targetProject, translationResult);
     updateFileStatus(fileSet, FileStatus.IMPORTED);
   } catch (final InvalidDataException e) {
     handleResult(fileSet, e.getValidationResult());
   }
   this.searchDao.save(fileSet.getFiles());
   return documentSet;
 }