public abstract class AbstractSourceFactory extends EncodedImpl implements ISourceFactory
| Modifier and Type | Field and Description |
|---|---|
protected static ICache<String,nu.xom.Document> |
cache
Cache of files.
|
protected static ICache<String,INamespaceInfo> |
namespace
Cache of namespace information.
|
DEFAULT_ENCODING, FEATURE_ENCODING| Constructor and Description |
|---|
AbstractSourceFactory() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
getEncodingclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEncodingprotected static ICache<String,INamespaceInfo> namespace
public void initialize()
IResetableinitialize in interface IResetablepublic ISource newSource(Object source) throws SourceException
ISourceFactorynewSource 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.Copyright © 2016. All rights reserved.