|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.specrunner.source.core.EncodedImpl
org.specrunner.source.core.AbstractSourceFactory
public abstract class AbstractSourceFactory
Abstraction to readers.
| Field Summary | |
|---|---|
protected static ICache<String,nu.xom.Document> |
cache
Cache of files. |
protected static ICache<String,INamespaceInfo> |
namespace
Cache of namespace information. |
| Fields inherited from interface org.specrunner.source.IEncoded |
|---|
DEFAULT_ENCODING, FEATURE_ENCODING |
| Constructor Summary | |
|---|---|
AbstractSourceFactory()
|
|
| Method Summary | |
|---|---|
protected nu.xom.Document |
addDoctype(nu.xom.Document document)
Adds the XHTML Doctype to the document if none is specified. |
protected String |
cleanTarget(String target)
Clean the target name. |
protected abstract nu.xom.Document |
fromTarget(URI uri,
String target,
String encoding)
Load file from source. |
void |
initialize()
Initialize something. |
protected boolean |
isFile(URI uri,
String target)
Check if a target is file. |
ISource |
newSource(Object source)
Creates a source from a String. |
| Methods inherited from class org.specrunner.source.core.EncodedImpl |
|---|
getEncoding |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.specrunner.source.IEncoded |
|---|
getEncoding |
| Field Detail |
|---|
protected static ICache<String,nu.xom.Document> cache
protected static ICache<String,INamespaceInfo> namespace
| Constructor Detail |
|---|
public AbstractSourceFactory()
| Method Detail |
|---|
public void initialize()
IResetable
initialize in interface IResetable
public ISource newSource(Object source)
throws SourceException
ISourceFactory
newSource in interface ISourceFactorysource - The source of specification.
SourceException - On creation errors.
protected abstract nu.xom.Document fromTarget(URI uri,
String target,
String encoding)
throws SourceException
uri - The source URI.target - The source name.encoding - The encoding.
SourceException - On load errors.
protected boolean isFile(URI uri,
String target)
uri - A URI.target - The target.
protected String cleanTarget(String target)
throws SourceException
target - The target.
SourceException - On cleanup errors.protected nu.xom.Document addDoctype(nu.xom.Document document)
document - The document.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||