public abstract class AbstractResource extends Object implements IResource
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractResource(ISource parent,
String resourcePath,
boolean classpath,
EType type)
Partial constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addNode(nu.xom.Node node)
Add a node representation.
|
protected List<URL> |
filterExisting(List<URL> urls)
Filter only available resources.
|
List<nu.xom.Node> |
getNodes()
Return node representations of resources after
writeTo method
call. |
ISource |
getParent()
The reference parent.
|
String |
getResourcePath()
The resource path, relative to classpath.
|
protected List<URL> |
getResourceURLs()
Gets the list of URL resources.
|
EType |
getType()
The resource type.
|
boolean |
isClasspath()
The resource is relative to classpath?
|
void |
setClasspath(boolean classpath)
Set the classpath context.
|
void |
setParent(ISource parent)
Change the resource parent.
|
void |
setResourcePath(String resourcePath)
Set the resource path.
|
void |
setType(EType type)
Resource type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasNode, asStringpublic ISource getParent()
IResourcepublic void setParent(ISource parent)
IResourcepublic String getResourcePath()
IResourcegetResourcePath in interface IResourcepublic void setResourcePath(String resourcePath)
IResourcesetResourcePath in interface IResourceresourcePath - The resource path.public boolean isClasspath()
IResourceisClasspath in interface IResourcepublic void setClasspath(boolean classpath)
IResourcesetClasspath in interface IResourceclasspath - true, for classpath relative, false, otherwise.public List<nu.xom.Node> getNodes()
IResourcewriteTo method
call.public void addNode(nu.xom.Node node)
IResourceprotected List<URL> getResourceURLs() throws ResourceException
ResourceException - On resource listing errors.protected List<URL> filterExisting(List<URL> urls) throws ResourceException
urls - List of resource URLs.ResourceException - On file locaCopyright © 2016. All rights reserved.