org.specrunner.source.core
Class SourceFactoryHtml
java.lang.Object
org.specrunner.source.core.EncodedImpl
org.specrunner.source.core.AbstractSourceFactory
org.specrunner.source.core.SourceFactoryHtml
- All Implemented Interfaces:
- Serializable, IEncoded, ISourceFactory, IResetable
public class SourceFactoryHtml
- extends AbstractSourceFactory
The default implementation. Uses a NekoHTML parser under XOM to read the
specification. The use of NekoHTML allows using less rigid XML/HTML documents
which are fixed by NekoHTML on reading time.
The settings of NekoHTML makes the XML attributes name be in lower case. This
poses a restriction on attribute names of plugins, instead of defining in a
IPlugin implementation PluginX an attribute named
loadOnStart, use loadonstart in small caps.
- Author:
- Thiago Santos
- See Also:
- Serialized Form
|
Method Summary |
protected nu.xom.Document |
fromTarget(URI uri,
String target,
String encoding)
Load file from source. |
protected nu.xom.Document |
load(Reader reader)
Load a source from either an InputStream or a Reader. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SourceFactoryHtml
public SourceFactoryHtml()
fromTarget
protected nu.xom.Document fromTarget(URI uri,
String target,
String encoding)
throws SourceException
- Description copied from class:
AbstractSourceFactory
- Load file from source.
- Specified by:
fromTarget in class AbstractSourceFactory
- Parameters:
uri - The source URI.target - The source name.encoding - The encoding.
- Returns:
- The document.
- Throws:
SourceException - On load errors.
load
protected nu.xom.Document load(Reader reader)
throws SourceException
- Load a source from either an InputStream or a Reader.
- Parameters:
reader - InputStream.
- Returns:
- The source.
- Throws:
SourceException - On load error.
Copyright © 2014. All rights reserved.