org.specrunner.source.resource.positional.core
Class JSResource

java.lang.Object
  extended by org.specrunner.source.resource.core.AbstractResource
      extended by org.specrunner.source.resource.positional.core.AbstractResourcePositional
          extended by org.specrunner.source.resource.positional.core.AbstractResourceHeader
              extended by org.specrunner.source.resource.positional.core.JSResource
All Implemented Interfaces:
IResource, IResourcePositional, IPresentation

public class JSResource
extends AbstractResourceHeader

A JavaScript resource.

Author:
Thiago Santos

Constructor Summary
JSResource(ISource parent, String path, boolean classpath, EType type, Position position)
          Creates a JavaScript resource.
 
Method Summary
protected  File getFile(ISource output, String name)
          Get the file which represents the output resource.
protected  nu.xom.Element getHeaderTag()
          Get the element which represents the resource.
protected  nu.xom.Element getHeaderTag(ISource output, String name)
          Ges the element which represents the source provided extra information.
protected  String localName(ISource output, String name)
          Gets the local disk file name.
 
Methods inherited from class org.specrunner.source.resource.positional.core.AbstractResourceHeader
asNode, asString, equals, hashCode, toString, writeTo
 
Methods inherited from class org.specrunner.source.resource.positional.core.AbstractResourcePositional
getPosition, setPosition
 
Methods inherited from class org.specrunner.source.resource.core.AbstractResource
filterExisting, getParent, getResourcePath, getResourceURLs, getType, isClasspath, setClasspath, setParent, setResourcePath, setType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.specrunner.source.resource.IResource
getParent, getResourcePath, getType, isClasspath, setClasspath, setParent, setResourcePath, setType
 

Constructor Detail

JSResource

public JSResource(ISource parent,
                  String path,
                  boolean classpath,
                  EType type,
                  Position position)
Creates a JavaScript resource.

Parameters:
parent - The source parent.
path - The resource path.
classpath - The classpath flag.
type - The resource nature.
position - The resource position.
Method Detail

getHeaderTag

protected nu.xom.Element getHeaderTag()
Description copied from class: AbstractResourceHeader
Get the element which represents the resource.

Specified by:
getHeaderTag in class AbstractResourceHeader
Returns:
The corresponding element.

getHeaderTag

protected nu.xom.Element getHeaderTag(ISource output,
                                      String name)
Description copied from class: AbstractResourceHeader
Ges the element which represents the source provided extra information.

Specified by:
getHeaderTag in class AbstractResourceHeader
Parameters:
output - The output source.
name - The output name.
Returns:
The corresponding element.

getFile

protected File getFile(ISource output,
                       String name)
Description copied from class: AbstractResourceHeader
Get the file which represents the output resource.

Specified by:
getFile in class AbstractResourceHeader
Parameters:
output - The output source.
name - The name.
Returns:
The result file.

localName

protected String localName(ISource output,
                           String name)
Gets the local disk file name.

Parameters:
output - The output source.
name - The name.
Returns:
The name of local resource.


Copyright © 2014. All rights reserved.