com.wles.util
Class RuleParser.Resource

java.lang.Object
  extended bycom.wles.util.RuleParser.QualifiedElement
      extended bycom.wles.util.RuleParser.Resource
Enclosing class:
RuleParser

public static class RuleParser.Resource
extends RuleParser.QualifiedElement

Class for representing a resource.


Field Summary
static java.lang.String DELIM
          Resource delimiter.
static java.lang.String MAPI_QUALIFIER
           
static java.lang.String MAPI_ROOT
           
static java.lang.String QUALIFIER
          Resource qualifier.
static java.lang.String ROOT
          Root resource.
 
Constructor Summary
RuleParser.Resource(java.lang.String value)
          Constructs a resource form a named value.
 
Method Summary
 java.lang.String[] getElements()
          Gets the elements contained in the Resource i.e. breaks it up by the slashes
 RuleParser.Resource[] getLineage()
          Gets an array of all resources from this one to the root order starts with this one and works up to root
 RuleParser.Resource getParent()
          Gets the parent resource, or null if this is the root.
 boolean isDecendant(RuleParser.Resource ancestor)
          Tests if supplied node is an ancestor of this resource i.e. this node is a child/decentant of supplied node.
 boolean isRoot()
          Tests if this is the root resource.
 java.lang.String toString()
          Returns a report of information on the resource structure.
 void validate()
          Validate that the internal string is a syntatically correct resource name.
 
Methods inherited from class com.wles.util.RuleParser.QualifiedElement
equals, getName, getQualifiedName, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DELIM

public static final java.lang.String DELIM
Resource delimiter.

See Also:
Constant Field Values

MAPI_QUALIFIER

public static final java.lang.String MAPI_QUALIFIER
See Also:
Constant Field Values

MAPI_ROOT

public static final java.lang.String MAPI_ROOT
See Also:
Constant Field Values

QUALIFIER

public static final java.lang.String QUALIFIER
Resource qualifier.

See Also:
Constant Field Values

ROOT

public static final java.lang.String ROOT
Root resource.

See Also:
Constant Field Values
Constructor Detail

RuleParser.Resource

public RuleParser.Resource(java.lang.String value)
                    throws RuleParser.ParsingException
Constructs a resource form a named value.

Method Detail

getElements

public java.lang.String[] getElements()
                               throws RuleParser.ParsingException
Gets the elements contained in the Resource i.e. breaks it up by the slashes

Throws:
RuleParser.ParsingException

getLineage

public RuleParser.Resource[] getLineage()
                                 throws RuleParser.ParsingException
Gets an array of all resources from this one to the root order starts with this one and works up to root

Throws:
RuleParser.ParsingException

getParent

public RuleParser.Resource getParent()
                              throws RuleParser.ParsingException
Gets the parent resource, or null if this is the root.

Throws:
RuleParser.ParsingException

isDecendant

public boolean isDecendant(RuleParser.Resource ancestor)
                    throws RuleParser.ParsingException
Tests if supplied node is an ancestor of this resource i.e. this node is a child/decentant of supplied node.

Throws:
RuleParser.ParsingException

isRoot

public boolean isRoot()
Tests if this is the root resource.


toString

public java.lang.String toString()
Returns a report of information on the resource structure.

Overrides:
toString in class RuleParser.QualifiedElement

validate

public void validate()
              throws RuleParser.ParsingException
Validate that the internal string is a syntatically correct resource name.

Specified by:
validate in class RuleParser.QualifiedElement
Throws:
RuleParser.ParsingException


Copyright © 2004-2008, Oracle and/or its affiliates. All rights reserved.