Class: Shibkit::MetaMeta::Federation

Inherits:
MetadataItem show all
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

MetadataItem::NAMESPACES

Instance Attribute Summary collapse

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

#countriesArray

Returns country codes for areas served by the federation.

Returns:

  • (Array)

    country codes for areas served by the federation



57
58
59
# File 'lib/shibkit/meta_meta/federation.rb', line 57

def countries
  @countries
end

#descriptionString

Returns Brief description of the federation or collection.

Returns:

  • (String)

    Brief description of the federation or collection



72
73
74
# File 'lib/shibkit/meta_meta/federation.rb', line 72

def description
  @description
end

#display_nameObject

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

#entitiesObject

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_uriObject 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

#groupsObject

Returns the value of attribute groups.



79
80
81
# File 'lib/shibkit/meta_meta/federation.rb', line 79

def groups
  @groups
end

#homepage_urlString

Returns URL of the federation or collection’s home page.

Returns:

  • (String)

    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

#languagesArray

Returns Array of languages supported by the federation or collection.

Returns:

  • (Array)

    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_idObject

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

#nameString

Returns the full name of the federation or collection.

Returns:

  • (String)

    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_atObject (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_urlString?

Returns URL of the federation’s Refeds wiki entry.

Returns:

  • (String, nil)

    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_fileObject

Source file for this federation



50
51
52
# File 'lib/shibkit/meta_meta/federation.rb', line 50

def source_file
  @source_file
end

#support_emailString

Returns Main contact email address for the federation.

Returns:

  • (String)

    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

#trustinessObject

Returns the value of attribute trustiness.



77
78
79
# File 'lib/shibkit/meta_meta/federation.rb', line 77

def trustiness
  @trustiness
end

#typeString

Returns :federation for proper federations, :collection for simple collections of entities.

Returns:

  • (String)

    :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_untilObject

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

#idpsObject



114
115
116
117
118
# File 'lib/shibkit/meta_meta/federation.rb', line 114

def idps
  
  return entities.select { |e| e.idp? }
  
end

#spsObject



108
109
110
111
112
# File 'lib/shibkit/meta_meta/federation.rb', line 108

def sps
  
  return entities.select { |e| e.sp? }
  
end

#tagsObject



102
103
104
105
106
# File 'lib/shibkit/meta_meta/federation.rb', line 102

def tags
  
  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=(tags)
  
  @tags = [tags].flatten.uniq
  
  if entities and ::Shibkit::MetaMeta.config.auto_tag?
    entities.each { |e| e.tags = e.tags << @tags } unless tags.empty?
  end
  
end

#to_sObject



85
86
87
88
89
# File 'lib/shibkit/meta_meta/federation.rb', line 85

def to_s
  
  return uri
  
end