public class Script extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
EXTENSION
Default file extension for script.
|
| Constructor and Description |
|---|
Script()
Make a new script with a given identifier.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(BtrpElement el)
Add a VM or a node to the script.
|
boolean |
add(Collection<BtrpElement> elems)
Add a collection of nodes or elements.
|
boolean |
addConstraint(SatConstraint c)
Add a constraint to a script.
|
void |
addExportable(String name,
BtrpOperand e,
Set<String> scopes)
Add an external operand that can be accessed from several given scopes.
|
boolean |
canImport(String label,
String namespace)
Indicates whether a namespace can import an exported variable or not.
|
String |
fullyQualifiedSymbolName(String name)
Get the fully qualified name of a symbol.
|
Set<SatConstraint> |
getConstraints()
Get the constraints declared in the script.
|
List<Script> |
getDependencies()
Get the direct dependencies of this script.
|
Set<String> |
getExported()
Get the set of exported operands label.
|
BtrpOperand |
getImportable(String label)
Get the exported variable.
|
BtrpOperand |
getImportable(String label,
String namespace)
Get the exported operand from its label.
|
List<BtrpOperand> |
getImportables(String ns)
Get all the operand a given script can import
|
String |
getlocalName()
Get the local name of the script.
|
String |
getNamespace()
Get the namespace the script belongs to
|
Set<Node> |
getNodes()
Get the VMs declared in the script.
|
Set<VM> |
getVMs()
Get the VMs declared in the script.
|
String |
id()
Get the unique string identifier of the script.
|
String |
prettyDependencies()
Textual representation for the dependencies.
|
void |
setFullyQualifiedName(String n)
Set the fully qualified name of the script.
|
String |
toString() |
public static final String EXTENSION
public void setFullyQualifiedName(String n)
n - the fully qualified namepublic String getNamespace()
nullpublic String getlocalName()
public String id()
public Set<VM> getVMs()
public Set<Node> getNodes()
public boolean addConstraint(SatConstraint c)
c - the constrainttrue iff the constraint has been addedpublic Set<SatConstraint> getConstraints()
public boolean add(Collection<BtrpElement> elems)
elems - the elements to addtrue iff at least one element has been addedpublic boolean add(BtrpElement el)
el - the element to addtrue if the was was addedpublic List<BtrpOperand> getImportables(String ns)
ns - the script namespacepublic BtrpOperand getImportable(String label, String namespace)
label - the operand labelnamespace - the namespace of the script that ask for this operand.nullpublic BtrpOperand getImportable(String label)
label - the label that denotes the variablenull if the label does not point to a variable or if the variable as some restrictions
wrt. its accesspublic boolean canImport(String label, String namespace)
label - the label to importnamespace - the namespace of the script asking for the variabletrue if the variable can be imported. false otherwise}public void addExportable(String name, BtrpOperand e, Set<String> scopes)
name - the name of the exported operande - the operand to addscopes - the namespaces of the scripts that can use this variable. null to allow anyonepublic String fullyQualifiedSymbolName(String name)
name - the symbol namepublic Set<String> getExported()
public List<Script> getDependencies()
public String prettyDependencies()
Copyright © 2016 University of Nice-Sophia Antipolis. All Rights Reserved.