Public Member Functions | Static Public Member Functions | Static Package Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
org.ros.namespace.GraphName Class Reference

List of all members.

Public Member Functions

boolean equals (Object obj)
GraphName getBasename ()
GraphName getParent ()
int hashCode ()
boolean isEmpty ()
boolean isGlobal ()
boolean isPrivate ()
boolean isRelative ()
boolean isRoot ()
GraphName join (GraphName other)
GraphName join (String other)
GraphName toGlobal ()
GraphName toRelative ()
String toString ()

Static Public Member Functions

static GraphName empty ()
static GraphName newAnonymous ()
static GraphName of (String name)
static GraphName root ()

Static Package Attributes

static final String ANONYMOUS_PREFIX = "anonymous_"

Private Member Functions

 GraphName (String name)

Static Private Member Functions

static String canonicalize (String name)

Private Attributes

final String name

Static Private Attributes

static AtomicInteger anonymousCounter = new AtomicInteger()
static final String ROOT = "/"
static final String SEPARATOR = "/"
static final Pattern VALID_GRAPH_NAME_PATTERN

Detailed Description

ROS graph resource name.

See also:
Names documentation
Author:
damonkohler@google.com (Damon Kohler)

Definition at line 34 of file GraphName.java.


Constructor & Destructor Documentation

org.ros.namespace.GraphName.GraphName ( String  name) [inline, private]

Definition at line 91 of file GraphName.java.


Member Function Documentation

static String org.ros.namespace.GraphName.canonicalize ( String  name) [inline, static, private]

Validate and convert the graph name into its canonical representation. Canonical representations have no trailing slashes and can be global, private, or relative.

Parameters:
name
Returns:
the canonical name for this GraphName

Definition at line 104 of file GraphName.java.

static GraphName org.ros.namespace.GraphName.empty ( ) [inline, static]
Returns:
an empty GraphName

Definition at line 76 of file GraphName.java.

boolean org.ros.namespace.GraphName.equals ( Object  obj) [inline]

Definition at line 298 of file GraphName.java.

Returns:
a GraphName without the leading parent namespace

Definition at line 217 of file GraphName.java.

Returns:
the parent of this GraphName in its canonical representation or an empty GraphName if there is no parent

Definition at line 197 of file GraphName.java.

Definition at line 293 of file GraphName.java.

Returns:
 true 
if this GraphName is empty,
 false 
otherwise

Definition at line 151 of file GraphName.java.

Is this a /global/name?

  • If node node1 in the global / namespace accesses the resource /bar, that will resolve to the name /bar.
  • If node node2 in the /wg/ namespace accesses the resource /foo, that will resolve to the name /foo.
  • If node node3 in the /wg/ namespace accesses the resource /foo/bar, that will resolve to the name /foo/bar.
Returns:
 true 
if this name is a global name,
 false 
otherwise

Definition at line 135 of file GraphName.java.

Is this a ~private/name?

  • If node node1 in the global / namespace accesses the resource ~bar, that will resolve to the name /node1/bar.
  • If node node2 in the /wg/ namespace accesses the resource ~foo, that will resolve to the name /wg/node2/foo.
  • If node node3 in the /wg/ namespace accesses the resource ~foo/bar, that will resolve to the name /wg/node3/foo/bar.
Returns:
 true 
if the name is a private name,
 false 
otherwise

Definition at line 171 of file GraphName.java.

Is this a relative/name?

  • If node node1 in the global / namespace accesses the resource ~bar, that will resolve to the name /node1/bar.
  • If node node2 in the /wg/ namespace accesses the resource ~foo, that will resolve to the name /wg/node2/foo.
  • If node node3 in the /wg/ namespace accesses the resource ~foo/bar, that will resolve to the name /wg/node3/foo/bar.
Returns:
true if the name is a relative name.

Definition at line 189 of file GraphName.java.

boolean org.ros.namespace.GraphName.isRoot ( ) [inline]
Returns:
 true 
if this GraphName represents the root namespace,
 false 
otherwise

Definition at line 143 of file GraphName.java.

Join this GraphName with another.

Parameters:
otherthe GraphName to join with, if other is global, this will return other
Returns:
a GraphName representing the concatenation of this GraphName and
 other 

Definition at line 267 of file GraphName.java.

GraphName org.ros.namespace.GraphName.join ( String  other) [inline]
See also:
join(GraphName)

Definition at line 283 of file GraphName.java.

Creates an anonymous GraphName.

Returns:
a new GraphName suitable for creating an anonymous node

Definition at line 62 of file GraphName.java.

static GraphName org.ros.namespace.GraphName.of ( String  name) [inline, static]

Returns a new GraphName of the specified name.

Parameters:
namethe name of this resource
Returns:
a new GraphName for name

Definition at line 87 of file GraphName.java.

static GraphName org.ros.namespace.GraphName.root ( ) [inline, static]
Returns:
a GraphName representing the root namespace

Definition at line 69 of file GraphName.java.

Convert name to a global name representation. This does not take any namespace into account; it simply adds in the global prefix "/" if missing.

Returns:
a global GraphName

Definition at line 248 of file GraphName.java.

Convert name to a relative name representation. This does not take any namespace into account; it simply strips any preceding characters for global or private name representation.

Returns:
a relative GraphName

Definition at line 235 of file GraphName.java.

Definition at line 288 of file GraphName.java.


Member Data Documentation

final String org.ros.namespace.GraphName.ANONYMOUS_PREFIX = "anonymous_" [static, package]

Definition at line 37 of file GraphName.java.

AtomicInteger org.ros.namespace.GraphName.anonymousCounter = new AtomicInteger() [static, private]

Definition at line 51 of file GraphName.java.

final String org.ros.namespace.GraphName.name [private]

Definition at line 53 of file GraphName.java.

final String org.ros.namespace.GraphName.ROOT = "/" [static, private]

Definition at line 39 of file GraphName.java.

final String org.ros.namespace.GraphName.SEPARATOR = "/" [static, private]

Definition at line 40 of file GraphName.java.

Initial value:
 Pattern
      .compile("^([\\~\\/A-Za-z][\\w_\\/]*)?$")

Graph names must match this pattern to be valid.

Note that empty graph names are considered valid.

Definition at line 48 of file GraphName.java.


The documentation for this class was generated from the following file:


rosjava_core
Author(s):
autogenerated on Wed Aug 26 2015 16:06:51