コード例 #1
0
ファイル: HdfGroup.java プロジェクト: nhauser/cdma
  @Override
  public List<IContainer> findAllContainerByPath(final String path) throws NoResultException {
    // Try to list all nodes matching the path
    // Transform path into a NexusNode array
    INode[] nodes = HdfPath.splitStringToNode(path);

    List<IContainer> result = findAllContainerByPath(nodes);

    return result;
  }
コード例 #2
0
ファイル: HdfGroup.java プロジェクト: nhauser/cdma
  @Override
  public IContainer findContainerByPath(final String path) throws NoResultException {
    // Split path into nodes
    String[] sNodes = HdfPath.splitStringPath(path);
    IContainer node = getRootGroup();

    // Try to open each node
    for (String shortName : sNodes) {
      if (!shortName.isEmpty() && node != null && node instanceof IGroup) {
        node = ((IGroup) node).getContainer(shortName);
      }
    }

    return node;
  }