Interface AppStorage

    • Method Detail

      • getFileSystemName

        String getFileSystemName()
      • isRemote

        boolean isRemote()
      • createRootNodeIfNotExists

        NodeInfo createRootNodeIfNotExists​(String name,
                                           String nodePseudoClass)
        Returns the root node of the tree, creating it if it does not exist.
      • createNode

        NodeInfo createNode​(String parentNodeId,
                            String name,
                            String nodePseudoClass,
                            String description,
                            int version,
                            NodeGenericMetadata genericMetadata)
        Creates a new node in the tree under a parent node. Returns NodeInfo corresponding to the newly created node. The new node is by default inconsistent, setConsistent(String nodeId) method should explicitly be called to set it consistent.
      • setMetadata

        default void setMetadata​(String nodeId,
                                 NodeGenericMetadata genericMetadata)
        Update a node metadata
        Parameters:
        nodeId - id of the node
        genericMetadata - new metadata that will override previous ones
      • isWritable

        boolean isWritable​(String nodeId)
      • isConsistent

        default boolean isConsistent​(String nodeId)
        Return true if the node with ID nodeId is consistent, otherwise it returns false .
      • getNodeInfo

        NodeInfo getNodeInfo​(String nodeId)
        Gets NodeInfo object for the node with ID nodeId.
      • setDescription

        void setDescription​(String nodeId,
                            String description)
      • setConsistent

        default void setConsistent​(String nodeId)
        mark the node with ID nodeId as consistent node.
      • updateModificationTime

        void updateModificationTime​(String nodeId)
      • getChildNodes

        List<NodeInfo> getChildNodes​(String nodeId)
        Gets NodeInfo for consistent child nodes of the node with ID nodeId.
      • getInconsistentNodes

        default List<NodeInfo> getInconsistentNodes()
        Gets NodeInfo for all inconsistent nodes.
      • getChildNode

        Optional<NodeInfo> getChildNode​(String nodeId,
                                        String name)
        Gets NodeInfo for child node with name name of the node with ID nodeId, empty if such a node does not exist or node is inconsistent.
      • getParentNode

        Optional<NodeInfo> getParentNode​(String nodeId)
        Gets NodeInfo for parent node of the node with ID nodeId, empty if such a node does not exist or inconsistent.
      • setParentNode

        void setParentNode​(String nodeId,
                           String newParentNodeId)
        Sets new parent node for the node with ID nodeId.
      • deleteNode

        String deleteNode​(String nodeId)
        Deletes the node with ID nodeId.
      • renameNode

        default void renameNode​(String nodeId,
                                String name)
        Rename the node with ID nodeId
      • readBinaryData

        Optional<InputStream> readBinaryData​(String nodeId,
                                             String name)
        Reads data associated to the node with ID nodeId. A node may have several data blobs associated to it, with different names. The parameters name specifies which of those data is requested.
      • writeBinaryData

        OutputStream writeBinaryData​(String nodeId,
                                     String name)
        Returns an OutputStream to write data associated to the node with ID nodeId. A node may have several data blobs associated to it, with different names.
      • dataExists

        boolean dataExists​(String nodeId,
                           String name)
        Returns true if data named name associated with the node with ID nodeId exists.
      • getDataNames

        Set<String> getDataNames​(String nodeId)
        Returns the lists of names of data associated to the node with ID nodeId.
      • removeData

        boolean removeData​(String nodeId,
                           String name)
        Removes the data blob named name associated with the node with ID nodeId.
      • createTimeSeries

        void createTimeSeries​(String nodeId,
                              com.powsybl.timeseries.TimeSeriesMetadata metadata)
        Creates a time series associated with node with ID nodeId.
      • getTimeSeriesNames

        Set<String> getTimeSeriesNames​(String nodeId)
        Returns names of all time series associated with node with ID nodeId.
      • timeSeriesExists

        boolean timeSeriesExists​(String nodeId,
                                 String timeSeriesName)
        Returns true if a time series named timeSeriesName associated with the node with ID nodeId exists.
      • getTimeSeriesMetadata

        List<com.powsybl.timeseries.TimeSeriesMetadata> getTimeSeriesMetadata​(String nodeId,
                                                                              Set<String> timeSeriesNames)
        Returns metadata of time series associated with node with ID nodeId and with name in timeSeriesNames.
      • getTimeSeriesDataVersions

        Set<Integer> getTimeSeriesDataVersions​(String nodeId)
        Gets versions of time series data associated with node with ID nodeId.
      • getTimeSeriesDataVersions

        Set<Integer> getTimeSeriesDataVersions​(String nodeId,
                                               String timeSeriesName)
        Gets versions of data for the time series with name timeSeriesName associated with node with ID nodeId.
      • getDoubleTimeSeriesData

        Map<String,​List<com.powsybl.timeseries.DoubleDataChunk>> getDoubleTimeSeriesData​(String nodeId,
                                                                                               Set<String> timeSeriesNames,
                                                                                               int version)
        Gets data (double) for the time series with names timeSeriesNames associated with node with ID nodeId.
      • addDoubleTimeSeriesData

        void addDoubleTimeSeriesData​(String nodeId,
                                     int version,
                                     String timeSeriesName,
                                     List<com.powsybl.timeseries.DoubleDataChunk> chunks)
        Adds data (double) to the time series with names timeSeriesNames associated with node with ID nodeId.
      • getStringTimeSeriesData

        Map<String,​List<com.powsybl.timeseries.StringDataChunk>> getStringTimeSeriesData​(String nodeId,
                                                                                               Set<String> timeSeriesNames,
                                                                                               int version)
        Gets data (string) for the time series with names timeSeriesNames associated with node with ID nodeId.
      • addStringTimeSeriesData

        void addStringTimeSeriesData​(String nodeId,
                                     int version,
                                     String timeSeriesName,
                                     List<com.powsybl.timeseries.StringDataChunk> chunks)
        Adds data (string) to the time series with names timeSeriesNames associated with node with ID nodeId.
      • clearTimeSeries

        void clearTimeSeries​(String nodeId)
        Deletes time series associated with node with ID nodeId
      • addDependency

        void addDependency​(String nodeId,
                           String name,
                           String toNodeId)
        Adds a dependency from node with ID nodeId to node with ID toNodeId. The dependency will be associated with the specified name.
      • getDependencies

        Set<NodeInfo> getDependencies​(String nodeId,
                                      String name)
        Gets NodeInfo objects for dependencies of node with ID nodeId, and associated to the dependency name name.
      • getDependencies

        Set<NodeDependency> getDependencies​(String nodeId)
        Gets all dependencies (NodeDependency objects) of node with ID nodeId.
      • getBackwardDependencies

        Set<NodeInfo> getBackwardDependencies​(String nodeId)
        Gets NodeInfo objects of nodes which depend on the node with ID nodeId.
      • removeDependency

        void removeDependency​(String nodeId,
                              String name,
                              String toNodeId)
        Removes a dependency named name from node with ID nodeId to node with ID toNodeId.
      • getEventsBus

        EventsBus getEventsBus()
        Get the events store.
      • flush

        void flush()
        Flush any changes to underlying storage.
      • isClosed

        boolean isClosed()
        Check if storage is closed.
      • close

        void close()
        Closes any resource associated with this storage.
        Specified by:
        close in interface AutoCloseable
      • getSupportedFileSystemChecks

        default List<String> getSupportedFileSystemChecks()
        The list of supported file system checks.