Class: Shibkit::MetaMeta::Organisation

Inherits:
MetadataItem show all
Defined in:
lib/shibkit/meta_meta/organisation.rb

Overview

Class to represent the metadata of the organisation owning a Shibboleth entity

Constant Summary collapse

ROOT_ELEMENT =

Element and attribute used to select XML for new objects

'Organization'
TARGET_ATTR =
nil
REQUIRED_QUACKS =
[:name]

Constants inherited from MetadataItem

MetadataItem::NAMESPACES

Instance Attribute Summary collapse

Attributes inherited from MetadataItem

#read_at

Instance Method Summary collapse

Methods inherited from MetadataItem

#filter, #from_xml, #hashed_id, #initialize, #parsed_xml, #purge_xml, #source_xml, #textify_xml, #to_hash, #to_rdf, #to_xml

Constructor Details

This class inherits a constructor from Shibkit::MetaMeta::MetadataItem

Instance Attribute Details

#display_nameObject

The human-readable display name for the organisation



35
36
37
# File 'lib/shibkit/meta_meta/organisation.rb', line 35

def display_name
  @display_name
end

#nameObject

The name identifier for the organisation



32
33
34
# File 'lib/shibkit/meta_meta/organisation.rb', line 32

def name
  @name
end

#urlObject

The homepage URL for the organisation



38
39
40
# File 'lib/shibkit/meta_meta/organisation.rb', line 38

def url
  @url
end

Instance Method Details

#druidObject

Try to make a crude unique id for the organisation



41
42
43
44
45
46
# File 'lib/shibkit/meta_meta/organisation.rb', line 41

def druid 
  
  ## Derived, *relatively* unique ID.
  return display_name.strip.downcase.delete " .,-_'"
  
end

#to_sObject



48
49
50
51
52
# File 'lib/shibkit/meta_meta/organisation.rb', line 48

def to_s
  
  return display_name
  
end