org.specrunner.source
Interface ISource

All Superinterfaces:
IEncoded
All Known Implementing Classes:
SourceImpl

public interface ISource
extends IEncoded

Stand for the source of specifications.

Author:
Thiago Santos

Field Summary
 
Fields inherited from interface org.specrunner.source.IEncoded
DEFAULT_ENCODING, FEATURE_ENCODING
 
Method Summary
 nu.xom.Document getDocument()
          The specification document.
 ISourceFactory getFactory()
          The source factory.
 File getFile()
          The source reference as a java.io.File instance.
 IResourceManager getManager()
          A resource manager.
 INamespaceInfo getNamespaceInfo()
          Get meta-information associated to namespace.
 List<nu.xom.Element> getScenarios()
          The specification scenarios.
 String getString()
          The source reference as String.
 URI getURI()
          The source reference as a java.net.URI instance.
 String relative(ISource other)
          Returns the reference as a relative String.
 ISource resolve(ISource other)
          The relative source resolved.
 
Methods inherited from interface org.specrunner.source.IEncoded
getEncoding
 

Method Detail

getString

String getString()
The source reference as String.

Returns:
The source as String.

getFile

File getFile()
The source reference as a java.io.File instance.

Returns:
A file, if possible, otherwise null, if a File representation do not exist.

getURI

URI getURI()
The source reference as a java.net.URI instance.

Returns:
A uri, if possible, otherwise null, if a URI representation do not exist.

relative

String relative(ISource other)
Returns the reference as a relative String.

Parameters:
other - The reference to be compared.
Returns:
The relative reference as String.

resolve

ISource resolve(ISource other)
                throws SourceException
The relative source resolved.

Parameters:
other - The reference to be opened.
Returns:
The relative reference.
Throws:
SourceException - On creation errors.

getFactory

ISourceFactory getFactory()
The source factory.

Returns:
The source factory used to create the source.

getManager

IResourceManager getManager()
A resource manager. Responsible for handling JavaScripts, CSS, etc, related to the specification.

Returns:
The resource reference.

getDocument

nu.xom.Document getDocument()
                            throws SourceException
The specification document.

Returns:
The specification as document.
Throws:
SourceException - On creation error.

getNamespaceInfo

INamespaceInfo getNamespaceInfo()
                                throws SourceException
Get meta-information associated to namespace.

Returns:
The info object.
Throws:
SourceException - On namespace info reading.

getScenarios

List<nu.xom.Element> getScenarios()
                                  throws SourceException
The specification scenarios.

Returns:
The specification as document.
Throws:
SourceException - On creation error.


Copyright © 2014. All rights reserved.