Exemple #1
0
 @Override
 public synchronized List<IDataItem> getDataItemList() {
   try {
     if ((!isFakeGroup()) && (!isAcquisitionGroup()) && (itemList.isEmpty())) {
       analyzeEdfFile();
     }
   } catch (Exception e) {
     itemList.clear();
   }
   ArrayList<IDataItem> itemList = new ArrayList<IDataItem>();
   itemList.addAll(this.itemList);
   return itemList;
 }
Exemple #2
0
 protected EdfGroup(EdfDataset dataset, File file) {
   super();
   this.dataset = dataset;
   this.referenceFile = file;
   this.groupList = new ArrayList<EdfGroup>();
   this.itemList = new ArrayList<EdfDataItem>();
   this.groupList = new ArrayList<EdfGroup>();
   this.objectList = new ArrayList<AbstractObject>();
   if (referenceFile != null) {
     setName(referenceFile.getName());
   }
   analyzeEdfFile();
   getGroupList();
 }
Exemple #3
0
  @Override
  public List<IContainer> findAllContainerByPath(String path) throws NoResultException {

    if (!analyzed) {
      analyzeEdfFile();
    }
    List<IContainer> list = new ArrayList<IContainer>();
    IGroup root = getRootGroup();

    // Try to list all nodes matching the path
    // Transform path into a NexusNode array
    INode[] nodes = DefaultPath.splitStringToNode(path);

    // Call recursive method
    int level = 0;
    if (PATH_SEPARATOR.equals(path)) {
      list.add(root);
    } else {
      list = findAllContainer(root, nodes, level);
    }

    return list;
  }
Exemple #4
0
 public static void main(String[] args) {
   EdfGroup group =
       new EdfGroup(new File("/home/viguier/NeXusFiles/EDF/test_264/test_264_test_im_00.edf"));
   group.analyzeEdfFile();
 }