|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is used to write/save an asset in a storage format independent way. Any persisting of the asset should be done throught this interface. This interface is not intended to be implemented by clients.
Field Summary | |
static String |
BUNDLED_WRITER_FORMAT
Specifies that the asset should be in a bundled storage format. |
static String |
PATH_SEPERATOR
Specifies the path seperator. |
Method Summary | |
IAssetWriterStatus |
addFile(InputStream theInputStream,
String theRelativePath,
IProgressMonitor theProgressMonitor)
Add a stream to the asset. |
IAssetWriterStatus |
addFile(String theSourceFilePath,
String theRelativePath)
Add a file to the asset. |
IAssetWriterStatus |
addFolder(String theRelativePath)
Create a new folder in the asset. |
IStatus |
close()
Closes the writer. |
String |
getAssetPath()
Get the asset's path. |
IStatus |
open(String theAssetPath,
boolean shouldOverwriteExisting)
Opens the writer. |
void |
setManifest(EObject theManifest)
Sets the primary manifest for the asset. |
boolean |
shouldOverwriteExisting()
Indicates whether or not the writer should overwrite resouces that already exist in the target location. |
Field Detail |
public static final String PATH_SEPERATOR
public static final String BUNDLED_WRITER_FORMAT
Method Detail |
public String getAssetPath()
public boolean shouldOverwriteExisting()
true
if the writer should overwrite existing
resoucespublic void setManifest(EObject theManifest)
theManifest
should be the EMF object that represents the
manifest. The writer should serialize the object into a physical manifest
and add it to the asset. Note: This should not occur until all
resources have been added to the asset. If done prior there is the
potential for the manifest to have invalid references. Only the asset
writer can construct and return an accurate reference for insertion in
the manifest.
theManifest
- the EMF object representing the manifest
IllegalArgumentException
- if theManifest
is null
EObject
public IAssetWriterStatus addFile(InputStream theInputStream, String theRelativePath, IProgressMonitor theProgressMonitor)
theInputStream
- the stream that will be addedtheRelativePath
- the path relative to the root of the asset.theProgressMonitor
- optionally tracks progress of the file being added. This
parameter can be null
public IAssetWriterStatus addFile(String theSourceFilePath, String theRelativePath)
theSourceFilePath
- the path of the file that will be addedtheRelativePath
- the path of the file relative to the root of the asset.
public IAssetWriterStatus addFolder(String theRelativePath)
theRelativePath
- the path of the folder relative to the root of the asset.
public IStatus open(String theAssetPath, boolean shouldOverwriteExisting)
theAssetPath
- The format is writer specific, for instance a file path for
file based assets.shouldOverwriteExisting
- indicates if existing resources should be overwritten
public IStatus close()
|
IBM Rational Software Modeler Release 6.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2004. All rights reserved.