| java.lang.Object org.andromda.core.common.ResourceWriter
ResourceWriter | public class ResourceWriter (Code) | | Used for writing resources for the framework. Also keeps histories of
previous resources generated so that we can avoid regenerating if the
generated resources are current.
author: Chad Brandon |
getWrittenCount | public long getWrittenCount()(Code) | | Gets the number of currently written resources over the course of this instance's history.
the number of written resources. |
instance | public static ResourceWriter instance()(Code) | | Gets the shared ResourceWriter instance. Normally you'll want to retrieve
the instance through this method.
the shared instance. |
isHistoryBefore | public boolean isHistoryBefore(long time)(Code) | | Checks to see if the history is before the given time .
Parameters: time - the time in milliseconds to check against. true/false |
resetHistory | public void resetHistory(String modelUri)(Code) | | Resets the a history file, to write the history
ResourceWriter.writeHistory() must be called.
Parameters: modelUri - used to construct the file name from the modelUri where the history is stored |
setEncoding | public void setEncoding(String encoding)(Code) | | Sets the encoding to which all output written from this class will be
written.
Parameters: encoding - the encoding type (UTF-8, ISO-8859-1, etc). |
writeStringToFile | public void writeStringToFile(String string, File file, String namespace) throws IOException(Code) | | Writes the string to the file specified by the fileLocation argument.
Parameters: string - the string to write to the file Parameters: file - the file to which to write. Parameters: namespace - the current namespace for which this resource is beingwritten. throws: IOException - |
writeStringToFile | public void writeStringToFile(String string, String fileLocation) throws IOException(Code) | | Writes the string to the file specified by the fileLocation argument.
Parameters: string - the string to write to the file Parameters: fileLocation - the location of the file which to write. |
writeStringToFile | public void writeStringToFile(String string, File file) throws IOException(Code) | | Writes the string to the file specified by the fileLocation argument.
Parameters: string - the string to write to the file Parameters: file - the file which to write. |
writeStringToFile | public void writeStringToFile(String string, String fileLocation, String namespace) throws IOException(Code) | | Writes the string to the file specified by the fileLocation argument.
Parameters: string - the string to write to the file Parameters: fileLocation - the location of the file which to write. Parameters: namespace - the current namespace for which this resource is beingwritten. throws: IOException - |
writeUrlToFile | public void writeUrlToFile(URL url, String fileLocation) throws IOException(Code) | | Writes the URL contents to a file specified by the fileLocation argument.
Parameters: url - the URL to read Parameters: fileLocation - the location which to write. |
|
|