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