Class: JasperClient::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/jasper-client/jasper_client.rb

Overview

a Jasper Server resource.

A Jasperserver resource is a generic concept used to represent almost anything in a jasper server. It can be a file, an image, pre-run report output, a query, a report control, etc. We attempt to boil down the resource to something relatively consumable by application developers.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(soap) ⇒ Resource

Take a Nokogiri::XML object of a



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/jasper-client/jasper_client.rb', line 13

def initialize(soap)
  return unless soap.respond_to?(:search)
  
  @name = soap['name']
  @type = soap['wsType']
  @uri_string = soap['uriString']
  @label = soap.search('./label/node()').inner_text
  @description = soap.search('./description/node()').inner_text
  @createion_date = soap.search('./creation_date/node()').inner_text
  
  initialize_properties soap.search('./resourceProperty')
  initialize_resources soap.search('./resourceDescriptor')
end

Instance Attribute Details

#creation_dateObject (readonly)

Returns the value of attribute creation_date.



10
11
12
# File 'lib/jasper-client/jasper_client.rb', line 10

def creation_date
  @creation_date
end

#descriptionObject (readonly)

Returns the value of attribute description.



10
11
12
# File 'lib/jasper-client/jasper_client.rb', line 10

def description
  @description
end

#labelObject (readonly)

Returns the value of attribute label.



10
11
12
# File 'lib/jasper-client/jasper_client.rb', line 10

def label
  @label
end

#nameObject (readonly)

Returns the value of attribute name.



10
11
12
# File 'lib/jasper-client/jasper_client.rb', line 10

def name
  @name
end

#propertiesObject (readonly)

Returns the value of attribute properties.



10
11
12
# File 'lib/jasper-client/jasper_client.rb', line 10

def properties
  @properties
end

#resourcesObject (readonly)

Returns the value of attribute resources.



10
11
12
# File 'lib/jasper-client/jasper_client.rb', line 10

def resources
  @resources
end

#typeObject (readonly)

Returns the value of attribute type.



10
11
12
# File 'lib/jasper-client/jasper_client.rb', line 10

def type
  @type
end

#uri_stringObject (readonly)

Returns the value of attribute uri_string.



10
11
12
# File 'lib/jasper-client/jasper_client.rb', line 10

def uri_string
  @uri_string
end