Class: Locabulary::Items::AdministrativeUnit
- Defined in:
- lib/locabulary/items/administrative_unit.rb
Overview
Responsible for exposing the data structure logic of the Administrative Units
Constant Summary collapse
- NON_DEPARTMENTAL_SLUG =
"Non-Departmental".freeze
- HUMAN_FRIENDLY_HIERARCHY_DELIMITER =
NOTE: The whitespace characters are “thin spaces”, U+200A
' — '.freeze
Constants inherited from Base
Instance Attribute Summary collapse
-
#affiliation ⇒ Object
readonly
- String, nil
-
For centers and institutes, there is often an affiliation to another administrative unit.
-
#classification ⇒ Object
readonly
- String, nil
-
The type of administrative unit in the hierarchy (e.g. College, Department, University, etc.).
-
#grouping ⇒ Object
readonly
- String, nil
-
A larger concept that ties units together; “The Humanities” is a grouping for the following: * “University of Notre Dame::College of Arts and Letters::Africana Studies” * “University of Notre Dame::College of Arts and Letters::American Studies”.
-
#homepage ⇒ Object
readonly
- String
-
What is the URL of the homepage.
Attributes inherited from Base
#activated_on, #deactivated_on, #default_presentation_sequence, #deposit_label, #description, #predicate_name, #term_label, #term_uri
Instance Method Summary collapse
Methods inherited from Base
#<=>, #add_child, #attribute_names, #children, hierarchy_delimiter, #hierarchy_facet_label, #initialize, #parent_slugs, #parent_term_label, #presentation_sequence, #root_slug, #selectable?, #slugs, #to_h, #to_persistence_format_for_fedora
Constructor Details
This class inherits a constructor from Locabulary::Items::Base
Instance Attribute Details
#affiliation ⇒ Object
- String, nil
-
For centers and institutes, there is often an affiliation to another administrative unit.
}
41 42 43 |
# File 'lib/locabulary/items/administrative_unit.rb', line 41 def affiliation @affiliation end |
#classification ⇒ Object
- String, nil
-
The type of administrative unit in the hierarchy (e.g. College, Department, University, etc.)
23 24 25 |
# File 'lib/locabulary/items/administrative_unit.rb', line 23 def classification @classification end |
#grouping ⇒ Object
- String, nil
-
A larger concept that ties units together; “The Humanities” is a grouping for the following:
* "University of Notre Dame::College of Arts and Letters::Africana Studies"
* "University of Notre Dame::College of Arts and Letters::American Studies"
28 29 30 |
# File 'lib/locabulary/items/administrative_unit.rb', line 28 def grouping @grouping end |
#homepage ⇒ Object
- String
-
What is the URL of the homepage. Please note the term_uri is reserved for something that is more resolvable by machines.
And while the homepage may look resolvable, it is not as meaningful for longterm preservation.
20 21 22 |
# File 'lib/locabulary/items/administrative_unit.rb', line 20 def homepage @homepage end |
Instance Method Details
#selectable_label ⇒ Object
52 53 54 55 56 57 58 |
# File 'lib/locabulary/items/administrative_unit.rb', line 52 def selectable_label if slugs[-1] == NON_DEPARTMENTAL_SLUG slugs[-2..-1].join(HUMAN_FRIENDLY_HIERARCHY_DELIMITER) else slugs[-1] end end |