Package com.powsybl.afs.ext.base
Class ImportedCase
- java.lang.Object
-
- com.powsybl.afs.AbstractNodeBase<ProjectFolder>
-
- com.powsybl.afs.ProjectNode
-
- com.powsybl.afs.ProjectFile
-
- com.powsybl.afs.ext.base.ImportedCase
-
- All Implemented Interfaces:
ProjectCase
public class ImportedCase extends ProjectFile implements ProjectCase
A type ofProjectFile
which represents aNetwork
imported to the project, and provides methods to get theNetwork
object or query it with a script.- Author:
- Geoffroy Jamgotchian
-
-
Field Summary
Fields Modifier and Type Field Description static String
PSEUDO_CLASS
static int
VERSION
-
Fields inherited from class com.powsybl.afs.ProjectNode
folder, project
-
Fields inherited from class com.powsybl.afs.AbstractNodeBase
codeVersion, info, storage
-
-
Constructor Summary
Constructors Constructor Description ImportedCase(ProjectFileCreationContext context, com.powsybl.iidm.import_.ImportersLoader importersLoader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(ProjectCaseListener l)
com.powsybl.commons.datasource.ReadOnlyDataSource
getDataSource()
com.powsybl.iidm.import_.Importer
getImporter()
com.powsybl.iidm.network.Network
getNetwork()
com.powsybl.iidm.network.Network
getNetwork(List<com.powsybl.iidm.network.NetworkListener> listeners)
Get the network and add a listeners on it in order to listen changes due to virtual case script application.Properties
getParameters()
protected void
invalidate()
void
invalidateNetworkCache()
String
queryNetwork(ScriptType scriptType, String scriptContent)
void
removeListener(ProjectCaseListener l)
-
Methods inherited from class com.powsybl.afs.ProjectFile
addListener, createLogger, getDependencies, getDependencies, getDependencies, hasDeepDependency, hasDeepDependency, isFolder, mandatoryDependenciesAreMissing, removeDependencies, removeListener, replaceDependency, setDependencies, startTask, stopTask
-
Methods inherited from class com.powsybl.afs.ProjectNode
delete, findService, getBackwardDependencies, getFileSystem, getParent, getPath, getProject
-
Methods inherited from class com.powsybl.afs.AbstractNodeBase
archive, archive, archive, archive, archive, getChildInfo, getCodeVersion, getCreationDate, getDescription, getId, getModificationDate, getName, getParentInfo, getVersion, isAheadOfVersion, isAncestorOf, moveTo, rename, setDescription, toString, unarchive, unarchive
-
-
-
-
Field Detail
-
PSEUDO_CLASS
public static final String PSEUDO_CLASS
- See Also:
- Constant Field Values
-
VERSION
public static final int VERSION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ImportedCase
public ImportedCase(ProjectFileCreationContext context, com.powsybl.iidm.import_.ImportersLoader importersLoader)
-
-
Method Detail
-
getDataSource
public com.powsybl.commons.datasource.ReadOnlyDataSource getDataSource()
-
getParameters
public Properties getParameters()
-
getImporter
public com.powsybl.iidm.import_.Importer getImporter()
-
queryNetwork
public String queryNetwork(ScriptType scriptType, String scriptContent)
- Specified by:
queryNetwork
in interfaceProjectCase
-
getNetwork
public com.powsybl.iidm.network.Network getNetwork()
- Specified by:
getNetwork
in interfaceProjectCase
-
getNetwork
public com.powsybl.iidm.network.Network getNetwork(List<com.powsybl.iidm.network.NetworkListener> listeners)
Description copied from interface:ProjectCase
Get the network and add a listeners on it in order to listen changes due to virtual case script application. The listeners will not be removed from the network at the end of the network loading, so the user of this method must make sure to handle it on its own. The contract of being notified may not be honored by all implementations (see remote service cache : listeners will not be added to the network). The user must check with the cache implementation he will use.- Specified by:
getNetwork
in interfaceProjectCase
-
invalidateNetworkCache
public void invalidateNetworkCache()
- Specified by:
invalidateNetworkCache
in interfaceProjectCase
-
invalidate
protected void invalidate()
- Overrides:
invalidate
in classProjectNode
-
addListener
public void addListener(ProjectCaseListener l)
- Specified by:
addListener
in interfaceProjectCase
-
removeListener
public void removeListener(ProjectCaseListener l)
- Specified by:
removeListener
in interfaceProjectCase
-
-