Class: Puree::XMLExtractor::Project
Overview
Instance Method Summary
collapse
Methods included from TypeMixin
#type
Methods included from TitleMixin
#title
#organisational_units
#identifiers
#external_organisations
Methods inherited from Resource
#created_at, #created_by, #id, #model, #modified_at, #modified_by, #previous_uuids, #uuid
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.
15
16
17
18
|
# File 'lib/puree/xml_extractor/project.rb', line 15
def initialize(xml)
super
setup_model :project
end
|
Instance Method Details
#acronym ⇒ String?
21
22
23
|
# File 'lib/puree/xml_extractor/project.rb', line 21
def acronym
xpath_query_for_single_value '/acronym'
end
|
#description ⇒ String?
26
27
28
|
# File 'lib/puree/xml_extractor/project.rb', line 26
def description
xpath_query_for_single_value '/descriptions/description'
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', '/participants/participant'
end
|
37
38
39
|
# File 'lib/puree/xml_extractor/project.rb', line 37
def persons_internal
persons 'internal', '/participants/participant'
end
|
47
48
49
|
# File 'lib/puree/xml_extractor/project.rb', line 47
def persons_other
persons 'other', '/participants/participant'
end
|
#status ⇒ String?
52
53
54
|
# File 'lib/puree/xml_extractor/project.rb', line 52
def status
xpath_query_for_single_value '/statuses/status'
end
|
57
58
59
|
# File 'lib/puree/xml_extractor/project.rb', line 57
def temporal
temporal_range '/period/startDate', '/period/endDate'
end
|
#url ⇒ String?
62
63
64
|
# File 'lib/puree/xml_extractor/project.rb', line 62
def url
xpath_query_for_single_value '/links/link/url'
end
|