|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.andromda.core.common.ResourceWriter
public class ResourceWriter
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.
| Constructor Summary | |
|---|---|
ResourceWriter()
|
|
| Method Summary | |
|---|---|
long |
getWrittenCount()
Gets the number of currently written resources over the course of this instance's history. |
static ResourceWriter |
instance()
Gets the shared ResourceWriter instance. |
boolean |
isHistoryBefore(long time)
Checks to see if the history is before the given time. |
void |
resetHistory(java.lang.String modelUri)
Resets the a history file, to write the history writeHistory() must be called. |
void |
setEncoding(java.lang.String encoding)
Sets the encoding to which all output written from this class will be written. |
void |
writeHistory()
Writes the output history to disk. |
void |
writeStringToFile(java.lang.String string,
java.io.File file)
Writes the string to the file specified by the fileLocation argument. |
void |
writeStringToFile(java.lang.String string,
java.io.File file,
java.lang.String namespace)
Writes the string to the file specified by the fileLocation argument. |
void |
writeStringToFile(java.lang.String string,
java.lang.String fileLocation)
Writes the string to the file specified by the fileLocation argument. |
void |
writeStringToFile(java.lang.String string,
java.lang.String fileLocation,
java.lang.String namespace)
Writes the string to the file specified by the fileLocation argument. |
void |
writeUrlToFile(java.net.URL url,
java.lang.String fileLocation)
Writes the URL contents to a file specified by the fileLocation argument. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceWriter()
| Method Detail |
|---|
public static ResourceWriter instance()
public void writeStringToFile(java.lang.String string,
java.io.File file,
java.lang.String namespace)
throws java.io.IOException
string - the string to write to the filefile - the file to which to write.namespace - the current namespace for which this resource is being
written.
java.io.IOException
public void writeStringToFile(java.lang.String string,
java.lang.String fileLocation)
throws java.io.IOException
string - the string to write to the filefileLocation - the location of the file which to write.
java.io.IOException
public void writeStringToFile(java.lang.String string,
java.io.File file)
throws java.io.IOException
string - the string to write to the filefile - the file which to write.
java.io.IOException
public void writeStringToFile(java.lang.String string,
java.lang.String fileLocation,
java.lang.String namespace)
throws java.io.IOException
string - the string to write to the filefileLocation - the location of the file which to write.namespace - the current namespace for which this resource is being
written.
java.io.IOException
public void writeUrlToFile(java.net.URL url,
java.lang.String fileLocation)
throws java.io.IOException
url - the URL to readfileLocation - the location which to write.
java.io.IOExceptionpublic void setEncoding(java.lang.String encoding)
encoding - the encoding type (UTF-8, ISO-8859-1, etc).public void resetHistory(java.lang.String modelUri)
writeHistory() must be called.
modelUri - used to construct the file name from the modelUri where the history is storedpublic long getWrittenCount()
public void writeHistory()
throws java.io.IOException
java.io.IOExceptionpublic boolean isHistoryBefore(long time)
time.
time - the time in milliseconds to check against.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||