|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jvnet.ws.wadl.ast.AbstractNode
org.jvnet.ws.wadl.ast.ResourceNode
public class ResourceNode
Represents a WADL resource.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.jvnet.ws.wadl.ast.AbstractNode |
|---|
AbstractNode.NodeVisitor |
| Constructor Summary | |
|---|---|
ResourceNode(Resource resource,
ResourceNode parent,
URI file,
ElementResolver idMap)
Create a new instance of ResourceNode and attach it as a child of an existing resource. |
|
ResourceNode(Resource resource,
ResourceTypeNode parent,
URI file,
ElementResolver idMap)
Create a new instance of ResourceNode and attach it as a child of an existing resource type. |
|
ResourceNode(URI baseURI,
Application app,
Resources resources)
Creates a new instance of ResourceNode. |
|
| Method Summary | |
|---|---|
ResourceNode |
addChild(Resource r,
URI file,
ElementResolver idMap)
Create a new resource and add it as a child. |
void |
addResourceType(ResourceTypeNode n)
Add a new base type for this resource - adds any methods, query or matrix parameters specified on the type to those specified for this resource. |
static String |
createClassNameFromBase(String base)
|
List<ResourceNode> |
getChildResources()
Get the child resources. |
String |
getClassName()
Convenience function for generating a suitable Java class name for this WADL resource. |
List<Doc> |
getDoc()
List of child documentation elements. |
List<Param> |
getHeaderParams()
Get a list of header parameters for this resource and its types. |
Locator |
getLocation()
|
List<Param> |
getMatrixParams()
Get a list of header parameters for this resource and its types. |
List<MethodNode> |
getMethods()
Get the method for this resource. |
ResourceNode |
getParentResource()
Get the parent resource. |
PathSegment |
getPathSegment()
Get the path segment for this resource. |
List<PathSegment> |
getPathSegments()
Get a list of path segments for this resource and its ancestors. |
List<Param> |
getQueryParams()
Get a list of query parameters for this resource and its types. |
List<ResourceTypeNode> |
getResourceTypes()
Get the types for this resource. |
String |
getUriTemplate()
|
void |
setClassName(String className)
Override the default generated class name. |
void |
visit(AbstractNode.NodeVisitor visitor)
Allow the provided parameter to visit the current node and any child nodes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceNode(URI baseURI,
Application app,
Resources resources)
app - the unmarshalled JAXB-generated application object.resources - the unmarshalled JAXB-generated resources object.
public ResourceNode(Resource resource,
ResourceNode parent,
URI file,
ElementResolver idMap)
throws InvalidWADLException
resource - the unmarshalled JAXB-generated resource object.parent - the parent resource to attach the new resource to.file - the URI of the WADL file that contains the resource element.idMap - a map of URI reference to WADL definition element.
InvalidWADLException - when WADL is invalid and cannot be processed.
public ResourceNode(Resource resource,
ResourceTypeNode parent,
URI file,
ElementResolver idMap)
throws InvalidWADLException
resource - the unmarshalled JAXB-generated resource object.parent - the parent resource to attach the new resource to.file - the URI of the WADL file that contains the resource element.idMap - a map of URI reference to WADL definition element.
InvalidWADLException - when WADL is invalid and cannot be processed.| Method Detail |
|---|
public static String createClassNameFromBase(String base)
public ResourceNode addChild(Resource r,
URI file,
ElementResolver idMap)
throws InvalidWADLException
r - the unmarshalled JAXB resource element.file - the URI of the WADL file that contains the resource element.idMap - a map of URI reference to WADL definition element.
InvalidWADLException - when WADL is invalid and cannot be processed.public String getClassName()
public String getUriTemplate()
public void setClassName(String className)
className - class name.public List<ResourceNode> getChildResources()
public PathSegment getPathSegment()
public List<MethodNode> getMethods()
public void addResourceType(ResourceTypeNode n)
n - the abstract resource type node to add.public List<ResourceTypeNode> getResourceTypes()
public ResourceNode getParentResource()
public List<PathSegment> getPathSegments()
public List<Param> getQueryParams()
public List<Param> getHeaderParams()
public List<Param> getMatrixParams()
public List<Doc> getDoc()
public Locator getLocation()
getLocation in class AbstractNodepublic void visit(AbstractNode.NodeVisitor visitor)
visit in class AbstractNodevisitor - NodeVisitor instance.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||