Class: Shibkit::MetaMeta::Federation
- Inherits:
-
MetadataItem
- Object
- MetadataItem
- Shibkit::MetaMeta::Federation
- Defined in:
- lib/shibkit/meta_meta/federation.rb
Overview
Class to represent a Shibboleth Federation or collection of local metadata
Constant Summary collapse
- ROOT_ELEMENT =
Element and attribute used to select XML for new objects
'EntitiesDescriptor'
- TARGET_ATTR =
'Name'
- REQUIRED_QUACKS =
[:metadata_id, :federation_uri, :source_file]
Constants inherited from MetadataItem
Instance Attribute Summary collapse
-
#countries ⇒ Array
Country codes for areas served by the federation.
-
#description ⇒ String
Brief description of the federation or collection.
-
#display_name ⇒ Object
The human-readable display name of the Federation or collection of metadata.
-
#entities ⇒ Object
Array of entities within the federation or metadata collection.
-
#federation_uri ⇒ Object
(also: #uri)
The URI name of the federation (may be missing for local collections).
-
#groups ⇒ Object
Returns the value of attribute groups.
-
#homepage_url ⇒ String
URL of the federation or collection’s home page.
-
#languages ⇒ Array
Array of languages supported by the federation or collection.
-
#metadata_id ⇒ Object
The unique ID of the federation document (probably time/version based).
-
#name ⇒ String
The full name of the federation or collection.
-
#read_at ⇒ Object
readonly
Time the Federation metadata was parsed.
-
#refeds_url ⇒ String?
URL of the federation’s Refeds wiki entry.
-
#source_file ⇒ Object
Source file for this federation.
-
#support_email ⇒ String
Main contact email address for the federation.
-
#trustiness ⇒ Object
Returns the value of attribute trustiness.
-
#type ⇒ String
:federation for proper federations, :collection for simple collections of entities.
-
#valid_until ⇒ Object
Expiry date of the published metadata file.
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
#countries ⇒ Array
Returns country codes for areas served by the federation.
57 58 59 |
# File 'lib/shibkit/meta_meta/federation.rb', line 57 def countries @countries end |
#description ⇒ String
Returns Brief description of the federation or collection.
72 73 74 |
# File 'lib/shibkit/meta_meta/federation.rb', line 72 def description @description end |
#display_name ⇒ Object
The human-readable display name of the Federation or collection of metadata
40 41 42 |
# File 'lib/shibkit/meta_meta/federation.rb', line 40 def display_name @display_name end |
#entities ⇒ Object
Array of entities within the federation or metadata collection
75 76 77 |
# File 'lib/shibkit/meta_meta/federation.rb', line 75 def entities @entities end |
#federation_uri ⇒ Object Also known as: uri
The URI name of the federation (may be missing for local collections)
43 44 45 |
# File 'lib/shibkit/meta_meta/federation.rb', line 43 def federation_uri @federation_uri end |
#groups ⇒ Object
Returns the value of attribute groups.
79 80 81 |
# File 'lib/shibkit/meta_meta/federation.rb', line 79 def groups @groups end |
#homepage_url ⇒ String
Returns URL of the federation or collection’s home page.
63 64 65 |
# File 'lib/shibkit/meta_meta/federation.rb', line 63 def homepage_url @homepage_url end |
#languages ⇒ Array
Returns Array of languages supported by the federation or collection.
66 67 68 |
# File 'lib/shibkit/meta_meta/federation.rb', line 66 def languages @languages end |
#metadata_id ⇒ Object
The unique ID of the federation document (probably time/version based)
34 35 36 |
# File 'lib/shibkit/meta_meta/federation.rb', line 34 def @metadata_id end |
#name ⇒ String
Returns the full name of the federation or collection.
37 38 39 |
# File 'lib/shibkit/meta_meta/federation.rb', line 37 def name @name end |
#read_at ⇒ Object (readonly)
Time the Federation metadata was parsed
83 84 85 |
# File 'lib/shibkit/meta_meta/federation.rb', line 83 def read_at @read_at end |
#refeds_url ⇒ String?
Returns URL of the federation’s Refeds wiki entry.
60 61 62 |
# File 'lib/shibkit/meta_meta/federation.rb', line 60 def refeds_url @refeds_url end |
#source_file ⇒ Object
Source file for this federation
50 51 52 |
# File 'lib/shibkit/meta_meta/federation.rb', line 50 def source_file @source_file end |
#support_email ⇒ String
Returns Main contact email address for the federation.
69 70 71 |
# File 'lib/shibkit/meta_meta/federation.rb', line 69 def support_email @support_email end |
#trustiness ⇒ Object
Returns the value of attribute trustiness.
77 78 79 |
# File 'lib/shibkit/meta_meta/federation.rb', line 77 def trustiness @trustiness end |
#type ⇒ String
Returns :federation for proper federations, :collection for simple collections of entities.
54 55 56 |
# File 'lib/shibkit/meta_meta/federation.rb', line 54 def type @type end |
#valid_until ⇒ Object
Expiry date of the published metadata file
47 48 49 |
# File 'lib/shibkit/meta_meta/federation.rb', line 47 def valid_until @valid_until end |
Instance Method Details
#idps ⇒ Object
114 115 116 117 118 |
# File 'lib/shibkit/meta_meta/federation.rb', line 114 def idps return entities.select { |e| e.idp? } end |
#sps ⇒ Object
108 109 110 111 112 |
# File 'lib/shibkit/meta_meta/federation.rb', line 108 def sps return entities.select { |e| e.sp? } end |
#tags ⇒ Object
102 103 104 105 106 |
# File 'lib/shibkit/meta_meta/federation.rb', line 102 def return @tags.nil? ? [] : @tags end |
#tags=(tags) ⇒ Object
92 93 94 95 96 97 98 99 100 |
# File 'lib/shibkit/meta_meta/federation.rb', line 92 def () @tags = [].flatten.uniq if entities and ::Shibkit::MetaMeta.config.auto_tag? entities.each { |e| e. = e. << @tags } unless .empty? end end |
#to_s ⇒ Object
85 86 87 88 89 |
# File 'lib/shibkit/meta_meta/federation.rb', line 85 def to_s return uri end |