public class FileResourceModelSource extends BaseFileResourceModelSource implements Configurable
BaseFileResourceModelSource to
provide an optionally editable Model source using a local file system path.| Modifier and Type | Class and Description |
|---|---|
static class |
FileResourceModelSource.Configuration |
framework, nodeSet| Modifier and Type | Method and Description |
|---|---|
void |
configure(FileResourceModelSource.Configuration configuration)
Configure the Source
|
void |
configure(java.util.Properties configs)
Configure the object with the configuration properties.
|
protected java.lang.String |
getDocumentFileExtension() |
protected long |
getLastModified() |
protected java.lang.String |
getResourceFormat() |
java.lang.String |
getSourceDescription() |
boolean |
hasData() |
boolean |
isDataWritable() |
protected boolean |
isSupportsLastModified() |
java.io.InputStream |
openFileDataInputStream() |
static INodeSet |
parseFile(java.io.File file,
Framework framework,
java.lang.String project)
Utility method to directly parse the nodes from a file
|
static INodeSet |
parseFile(java.io.File file,
java.lang.String format,
Framework framework,
java.lang.String project)
Utility method to directly parse the nodes from a file
|
protected boolean |
shouldGenerateServerNode() |
java.lang.String |
toString() |
long |
writeFileData(java.io.InputStream dataStream)
Write the file data from the inputstream to the backing store
|
getNodes, getNodes, getResourceFormatParser, getSourceType, getSyntaxMimeType, getWriteable, readData, writeData, writeFileDatapublic void configure(java.util.Properties configs)
throws ConfigurationException
Configurableconfigure in interface Configurableconfigs - the properties to useConfigurationException - if there is an invalid configurationpublic void configure(FileResourceModelSource.Configuration configuration) throws ConfigurationException
configuration - configurationConfigurationException - on config errorpublic long writeFileData(java.io.InputStream dataStream)
throws java.io.IOException
BaseFileResourceModelSourcewriteFileData in class BaseFileResourceModelSourcedataStream - input streamjava.io.IOExceptionpublic java.io.InputStream openFileDataInputStream()
throws java.io.IOException,
ResourceModelSourceException
openFileDataInputStream in class BaseFileResourceModelSourcejava.io.IOExceptionResourceModelSourceExceptionpublic boolean hasData()
hasData in interface WriteableModelSourceWriteableModelSource.readData(OutputStream) is expected to succeed.protected boolean isSupportsLastModified()
isSupportsLastModified in class BaseFileResourceModelSourceprotected long getLastModified()
getLastModified in class BaseFileResourceModelSourceprotected java.lang.String getResourceFormat()
getResourceFormat in class BaseFileResourceModelSourceprotected java.lang.String getDocumentFileExtension()
getDocumentFileExtension in class BaseFileResourceModelSourceBaseFileResourceModelSource.getResourceFormat() must be used.public java.lang.String getSourceDescription()
getSourceDescription in interface WriteableModelSourcepublic boolean isDataWritable()
isDataWritable in class BaseFileResourceModelSourceBaseFileResourceModelSource.writeData(InputStream)protected boolean shouldGenerateServerNode()
shouldGenerateServerNode in class BaseFileResourceModelSourcepublic static INodeSet parseFile(java.io.File file, Framework framework, java.lang.String project) throws ResourceModelSourceException, ConfigurationException
file - fileframework - fwkproject - project nameResourceModelSourceException - if an error occursConfigurationException - if a configuration error occurspublic static INodeSet parseFile(java.io.File file, java.lang.String format, Framework framework, java.lang.String project) throws ResourceModelSourceException, ConfigurationException
file - fileformat - specified formatframework - fwkproject - project nameResourceModelSourceException - if an error occursConfigurationException - if a configuration error occurspublic java.lang.String toString()
toString in class java.lang.Object