|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.core.scope.GCUBEScope
public abstract class GCUBEScope
Models a scope within a gCube infrastructure:
1) scopes are named, typed, and may be enclosed in another scopes. Three levels of nesting are possible:
the type of root scopes is INFRASTRUCTURE, the type of scopes below infrastructures is VO, and the type of scopes below that
is VRE.
2) scopes are generated from linear expressions of the form /[string]/[string]/[string], where each
separator introduces a level of scope and each string names the scope.
| Nested Class Summary | |
|---|---|
static class |
GCUBEScope.MalformedScopeExpressionException
Raised when parsing malformed scope expressions. |
static class |
GCUBEScope.ScopeExpression
Helper class to parse scope expressions. |
static class |
GCUBEScope.Type
Scope types * |
| Field Summary | |
|---|---|
protected static char |
pathSeparator
Scope separators used in linear syntax. |
protected ServiceMap |
serviceMap
The map of service endpoints associated with the scope. |
| Constructor Summary | |
|---|---|
protected |
GCUBEScope(String name)
Used internally to creates a new scope with a given name. |
| Method Summary | |
|---|---|
boolean |
equals(Object object)
|
GCUBEScope |
getEnclosingScope()
Returns the enclosing scope, if any. |
GCUBEScope |
getInfrastructure()
Returns the infrastructure of this scope. |
String |
getName()
Returns the name of the scope. |
static GCUBEScope |
getScope(String exp)
Returns a scope from its linear expression. |
abstract ServiceMap |
getServiceMap()
Returns the map of service endpoints associated with the scope. |
GCUBEScope.Type |
getType()
Returns the type of the scope. |
int |
hashCode()
|
boolean |
isEnclosedIn(GCUBEScope scope)
|
boolean |
isInfrastructure()
Indicates whether the scope is the whole infrastructure. |
void |
makeCurrent()
Used internally to creates a new scope with a given name. |
protected void |
setEnclosingScope(GCUBEScope enclosingScope)
Used internally to set the enclosing scope of the scope. |
void |
setServiceMap(ServiceMap map)
Sets the map of service endpoint associated with the scope. |
String |
toString()
Returns the linear expression of the scope. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static char pathSeparator
protected ServiceMap serviceMap
| Constructor Detail |
|---|
protected GCUBEScope(String name)
name - the name.| Method Detail |
|---|
public static GCUBEScope getScope(String exp)
throws GCUBEScope.MalformedScopeExpressionException
exp - the expressions.
GCUBEScope.MalformedScopeExpressionException - if the expression is malformed.public void makeCurrent()
name - the name.public GCUBEScope getInfrastructure()
public String getName()
public GCUBEScope getEnclosingScope()
null if the scope is the whole infrastructure.public boolean isInfrastructure()
true if it is, false otherwise.protected void setEnclosingScope(GCUBEScope enclosingScope)
enclosingScope - the enclosing scope.public GCUBEScope.Type getType()
public String toString()
toString in class Objectpublic boolean equals(Object object)
equals in class Objectpublic boolean isEnclosedIn(GCUBEScope scope)
public int hashCode()
hashCode in class Object
public abstract ServiceMap getServiceMap()
throws GCUBEScopeNotSupportedException
GCUBEScopeNotSupportedException - if no service map is associated with the scope.public void setServiceMap(ServiceMap map)
map - the service map.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||