Class: DeploymentPlan
Instance Attribute Summary collapse
Instance Method Summary
collapse
#has_condition?, #has_question?, #question, #question_answered?
Constructor Details
#initialize(node, repository) ⇒ DeploymentPlan
Returns a new instance of DeploymentPlan.
8
9
10
|
# File 'lib/models/deployment_plan.rb', line 8
def initialize(node, repository)
@query = NodeQuery.new(node, repository)
end
|
Instance Attribute Details
#query ⇒ Object
Returns the value of attribute query.
4
5
6
|
# File 'lib/models/deployment_plan.rb', line 4
def query
@query
end
|
Instance Method Details
#arguments ⇒ Object
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/models/deployment_plan.rb', line 21
def arguments
node = query.value(LV.arguments)
arg_query = NodeQuery.new(node, query.repository)
if arg_query.value_exists?(RDFV.first)
RDF::List.new(node, query.repository)
else
arg_query.predicates_and_objects
end
end
|
#capabilities ⇒ Object
38
39
40
41
42
43
|
# File 'lib/models/deployment_plan.rb', line 38
def capabilities
list = RDF::List.new(query.value(LV.capabilities), query.repository)
list.map do |node|
Capability.new(node, query.repository)
end
end
|
#deployment_plans ⇒ Object
32
33
34
35
36
|
# File 'lib/models/deployment_plan.rb', line 32
def deployment_plans
query.values(LV.hasDeploymentPlan).map do |node|
DeploymentPlan.new(node, query.repository)
end
end
|
#description ⇒ Object
12
13
14
|
# File 'lib/models/deployment_plan.rb', line 12
def description
query.value(LV.description)
end
|
#host ⇒ Object
16
17
18
19
|
# File 'lib/models/deployment_plan.rb', line 16
def host
nil unless query.value_exists?(LV.host)
EcosystemHost.new(query.value(LV.host), query.repository)
end
|