public class SessionReader.ImportSupport extends java.lang.Object
SessionLayerImporter
when doing the import.| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
inZipPath
Path of the file inside the zip archive.
|
private java.util.List<SessionReader.LayerDependency> |
layerDependencies |
private int |
layerIndex |
private java.lang.String |
layerName |
| Constructor and Description |
|---|
ImportSupport(java.lang.String layerName,
int layerIndex,
java.util.List<SessionReader.LayerDependency> layerDependencies)
Constructs a new
ImportSupport. |
| Modifier and Type | Method and Description |
|---|---|
void |
addPostLayersTask(java.lang.Runnable task)
Add a task, e.g.
|
java.io.File |
getFile(java.lang.String uriStr)
Return a File for a URI from a .jos/.joz file.
|
java.io.InputStream |
getInputStream(java.lang.String uriStr)
Return an InputStream for a URI from a .jos/.joz file.
|
java.util.List<SessionReader.LayerDependency> |
getLayerDependencies()
Dependencies - maps the layer index to the importer of the given
layer.
|
int |
getLayerIndex()
Index of the layer that is currently imported.
|
java.lang.String |
getLayerName()
Name of the layer that is currently imported.
|
boolean |
isZip()
Determines if we are reading from a .joz file.
|
java.lang.String |
toString() |
private final java.lang.String layerName
private final int layerIndex
private final java.util.List<SessionReader.LayerDependency> layerDependencies
private java.lang.String inZipPath
public ImportSupport(java.lang.String layerName, int layerIndex, java.util.List<SessionReader.LayerDependency> layerDependencies)
ImportSupport.layerName - layer namelayerIndex - layer indexlayerDependencies - layer dependenciespublic void addPostLayersTask(java.lang.Runnable task)
task - task to run in EDTpublic java.io.InputStream getInputStream(java.lang.String uriStr) throws java.io.IOException
uriStr - URI as stringjava.io.IOException - Thrown when no Stream can be opened for the given URI, e.g. when the linked file has been deleted.public java.io.File getFile(java.lang.String uriStr) throws java.io.IOException
uriStr - the URI as stringjava.io.IOException - if any I/O error occurspublic boolean isZip()
true if we are reading from a .joz file, false otherwisepublic java.lang.String getLayerName()
public int getLayerIndex()
public java.util.List<SessionReader.LayerDependency> getLayerDependencies()
public java.lang.String toString()
toString in class java.lang.Object