Package org.webharvest.definition
Class FileConfigSource
- java.lang.Object
-
- org.webharvest.definition.AbstractConfigSource
-
- org.webharvest.definition.FileConfigSource
-
- All Implemented Interfaces:
ConfigSource
,HasReader
public final class FileConfigSource extends AbstractConfigSource
Implementation ofConfigSource
that uses a file system as source of XML configurations.- Since:
- 2.1.0-SNAPSHOT
- Version:
- %I%, %G%
- Author:
- Robert Bala
- See Also:
ConfigSource
,File
,ConfigSource.Location
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.webharvest.definition.ConfigSource
ConfigSource.Location
-
-
Field Summary
-
Fields inherited from interface org.webharvest.definition.ConfigSource
UNDEFINED_LOCATION
-
-
Constructor Summary
Constructors Constructor Description FileConfigSource(File file)
Class constructor expectingFile
as configuration source.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigLocationVisitor.VisitableLocation
getLocation()
Gets the reference to physical location of configuration.Reader
getReader()
Gets theReader
for character stream.protected void
visit(ConfigLocationVisitor visitor)
Depending on ownedConfigSource.Location
allows the ancestor class to accept interceptedConfigLocationVisitor
.-
Methods inherited from class org.webharvest.definition.AbstractConfigSource
include
-
-
-
-
Method Detail
-
getReader
public Reader getReader() throws IOException
Gets theReader
for character stream.- Returns:
- stream
Reader
. - Throws:
IOException
-
getLocation
public ConfigLocationVisitor.VisitableLocation getLocation()
Gets the reference to physical location of configuration. (eg. URL or file path).- Returns:
- location of configuration.
-
visit
protected void visit(ConfigLocationVisitor visitor) throws IOException
Depending on ownedConfigSource.Location
allows the ancestor class to accept interceptedConfigLocationVisitor
.- Specified by:
visit
in classAbstractConfigSource
- Parameters:
visitor
- reference toConfigLocationVisitor
- Throws:
IOException
- in case of any problem with inclusion ofConfigSource
.
-
-