001/*-
002 * Copyright 2016 Diamond Light Source Ltd.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the Eclipse Public License v1.0
006 * which accompanies this distribution, and is available at
007 * http://www.eclipse.org/legal/epl-v10.html
008 */
009package org.eclipse.january.dataset;
010
011import java.util.Map;
012
013/**
014 * This class provides access to remote data which
015 * may consist of more than one remote dataset. It
016 * provides meta information about the contents of
017 * the remote data which can be used to determine
018 * which remote dataset to open. It provides a convenience
019 * method for creating a remote dataset which must
020 * be connected when it is returned but must be disconnected
021 * or its parent IRemoteData disconnected at some point
022 * later to close the connection with the server.
023 */
024public interface IRemoteData extends IFileConnection {
025
026        /**
027         * Map of path to collection of attributes at that path.
028         * @return NeXus meta-data objects in most instances.
029         * @throws Exception
030         */
031        public Map<String, Object> getTree()  throws Exception;
032        
033        /**
034         * Create a remote dataset looking at the dataset path named.
035         * connect() before use and disconnect() after use must be performed.
036         * 
037         * @param datasetPath
038         * @return IRemoteDataset
039         * @throws Exception
040         */
041        public IDatasetConnector createRemoteDataset(String datasetPath) throws Exception;
042}