Class: Puree::XMLExtractor::Project
Overview
Instance Method Summary
collapse
Methods inherited from Resource
#created, #get_data?, #locale, #modified, #uuid, #xpath_query
Methods inherited from Base
#xpath_query_for_multi_value, #xpath_query_for_single_value
Constructor Details
#initialize(xml:) ⇒ Project
Returns a new instance of Project.
9
10
11
12
|
# File 'lib/puree/xml_extractor/project.rb', line 9
def initialize(xml:)
super
@resource_type = :project
end
|
Instance Method Details
#acronym ⇒ String?
15
16
17
|
# File 'lib/puree/xml_extractor/project.rb', line 15
def acronym
xpath_query_for_single_value '/acronym'
end
|
#description ⇒ String?
20
21
22
|
# File 'lib/puree/xml_extractor/project.rb', line 20
def description
xpath_query_for_single_value '/description/localizedString'
end
|
25
26
27
28
|
# File 'lib/puree/xml_extractor/project.rb', line 25
def organisations
xpath_result = xpath_query '/organisations/association/organisation'
Puree::XMLExtractor::Shared. xpath_result
end
|
31
32
33
34
|
# File 'lib/puree/xml_extractor/project.rb', line 31
def owner
xpath_result = xpath_query '/owner'
Puree::XMLExtractor::Shared. xpath_result
end
|
42
43
44
|
# File 'lib/puree/xml_extractor/project.rb', line 42
def persons_external
persons 'external'
end
|
37
38
39
|
# File 'lib/puree/xml_extractor/project.rb', line 37
def persons_internal
persons 'internal'
end
|
47
48
49
|
# File 'lib/puree/xml_extractor/project.rb', line 47
def persons_other
persons 'other'
end
|
#status ⇒ String?
52
53
54
|
# File 'lib/puree/xml_extractor/project.rb', line 52
def status
xpath_query_for_single_value '/status/term/localizedString'
end
|
62
63
64
|
# File 'lib/puree/xml_extractor/project.rb', line 62
def temporal_actual
temporal_range '/startFinishDate/startDate', '/startFinishDate/endDate'
end
|
57
58
59
|
# File 'lib/puree/xml_extractor/project.rb', line 57
def temporal_expected
temporal_range '/expectedStartDate', '/expectedEndDate'
end
|
#title ⇒ String?
67
68
69
|
# File 'lib/puree/xml_extractor/project.rb', line 67
def title
xpath_query_for_single_value '/title/localizedString'
end
|
#type ⇒ String?
72
73
74
|
# File 'lib/puree/xml_extractor/project.rb', line 72
def type
xpath_query_for_single_value '/typeClassification/term/localizedString'
end
|
#url ⇒ String?
77
78
79
|
# File 'lib/puree/xml_extractor/project.rb', line 77
def url
xpath_query_for_single_value '/projectURL'
end
|