org.gcube.common.scope.impl
Class ScopeBean

java.lang.Object
  extended by org.gcube.common.scope.impl.ScopeBean

public class ScopeBean
extends Object

A object model of a scope.

Author:
Fabio Simeoni

Nested Class Summary
static class ScopeBean.Type
          Scope types *
 
Field Summary
protected static String separator
          Scope separators used in linear syntax.
 
Constructor Summary
ScopeBean(String scope)
           
 
Method Summary
 ScopeBean enclosingScope()
          Returns the enclosing scope, if any.
 boolean equals(Object obj)
           
 int hashCode()
           
 boolean is(ScopeBean.Type type)
          Returns true if the scope has a given ScopeBean.Type.
 String name()
          Returns the name of the scope.
 String toString()
          Returns the linear expression of the scope.
 ScopeBean.Type type()
          Returns the ScopeBean.Type of the scope.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

separator

protected static String separator
Scope separators used in linear syntax.

Constructor Detail

ScopeBean

public ScopeBean(String scope)
          throws IllegalArgumentException
Throws:
IllegalArgumentException
Method Detail

name

public String name()
Returns the name of the scope.

Returns:
the name

is

public boolean is(ScopeBean.Type type)
Returns true if the scope has a given ScopeBean.Type.

Parameters:
type - the type
Returns:
true if the scope has the given type, false otherwise

type

public ScopeBean.Type type()
Returns the ScopeBean.Type of the scope.

Returns:
the type

enclosingScope

public ScopeBean enclosingScope()
Returns the enclosing scope, if any.

Returns:
the enclosing scope, or null if the scope is top-level

toString

public String toString()
Returns the linear expression of the scope.

Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2013. All Rights Reserved.