public class FileResourceModelSource extends java.lang.Object implements ResourceModelSource, Configurable
Modifier and Type | Class and Description |
---|---|
static class |
FileResourceModelSource.Configuration |
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 ResourceFormatParser |
createParser(java.io.File file,
java.lang.String format)
Create a NodeFileParser given the project and the source file, using the predetermined format
|
INodeSet |
getNodes() |
INodeSet |
getNodes(java.io.File nodesFile,
java.lang.String format)
Returns a
INodeSet object conatining the nodes config data. |
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
|
static INodeSet |
parseFile(java.lang.String file,
Framework framework,
java.lang.String project)
Utility method to directly parse the nodes from a file
|
java.lang.String |
toString() |
public void configure(java.util.Properties configs) throws ConfigurationException
Configurable
configure
in interface Configurable
configs
- the properties to useConfigurationException
- if there is an invalid configurationpublic void configure(FileResourceModelSource.Configuration configuration) throws ConfigurationException
ConfigurationException
public INodeSet getNodes() throws ResourceModelSourceException
getNodes
in interface ResourceModelSource
ResourceModelSourceException
public INodeSet getNodes(java.io.File nodesFile, java.lang.String format) throws ResourceModelSourceException
INodeSet
object conatining the nodes config data.nodesFile
- the source fileformat
- INodeSet
ResourceModelSourceException
protected ResourceFormatParser createParser(java.io.File file, java.lang.String format) throws ResourceModelSourceException
file
- the nodes resource fileResourceModelSourceException
public static INodeSet parseFile(java.lang.String file, Framework framework, java.lang.String project) throws ResourceModelSourceException, ConfigurationException
public static INodeSet parseFile(java.io.File file, Framework framework, java.lang.String project) throws ResourceModelSourceException, ConfigurationException
public static INodeSet parseFile(java.io.File file, java.lang.String format, Framework framework, java.lang.String project) throws ResourceModelSourceException, ConfigurationException
public java.lang.String toString()
toString
in class java.lang.Object