Class: Identifier::Global::WebOfScience
- Inherits:
-
Identifier::Global
- Object
- Identifier
- Identifier::Global
- Identifier::Global::WebOfScience
- Defined in:
- app/models/identifier/global/web_of_science.rb
Overview
Web of Science ID - https://www.webofknowledge.com/
Direct Known Subclasses
Constant Summary collapse
- NAMESPACES =
%w{WOS ZOOREC}.freeze
- URI_BASE =
'https://gateway.webofknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcApp=Publons&SrcAuth=Publons_CEL&DestLinkType=FullRecord&DestApp=WOS_CPL&KeyUT='.freeze
Constants included from SoftValidation
SoftValidation::ANCESTORS_WITH_SOFT_VALIDATIONS
Instance Attribute Summary
Attributes inherited from Identifier::Global
Instance Method Summary collapse
- #namespace_format ⇒ Object private
- #source_use_only ⇒ Object private
-
#upcase_identifier ⇒ Object
private
lowercased IDs do seem to resolve correctly but it seems preferable to standardize them all to uppercase https://gateway.webofknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcApp=Publons&SrcAuth=Publons_CEL&DestLinkType=FullRecord&DestApp=WOS_CPL&KeyUT=WOS:a1953uA43400007.
- #uri ⇒ Object
Methods inherited from Identifier::Global
#build_cached, #dwc_occurrences, #is_global?, #sv_resolves?
Methods included from SoftValidation
#clear_soft_validations, #fix_for, #fix_soft_validations, #soft_fixed?, #soft_valid?, #soft_validate, #soft_validated?, #soft_validations, #soft_validators
Instance Method Details
#namespace_format ⇒ Object (private)
18 19 20 |
# File 'app/models/identifier/global/web_of_science.rb', line 18 def namespace_format errors.add(:identifier, 'Identifier is not prefixed with an recognized "namespace".') unless identifier =~ /^WOS:([A-Za-z\d]{15})$/ end |
#source_use_only ⇒ Object (private)
22 23 24 |
# File 'app/models/identifier/global/web_of_science.rb', line 22 def source_use_only errors.add(:identifier_object_type, 'is not a Source') if identifier_object_type.present? && identifier_object_type != 'Source' end |
#upcase_identifier ⇒ Object (private)
lowercased IDs do seem to resolve correctly but it seems preferable to standardize them all to uppercase https://gateway.webofknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcApp=Publons&SrcAuth=Publons_CEL&DestLinkType=FullRecord&DestApp=WOS_CPL&KeyUT=WOS:a1953uA43400007
28 29 30 |
# File 'app/models/identifier/global/web_of_science.rb', line 28 def upcase_identifier self.identifier = identifier.upcase unless identifier.nil? end |
#uri ⇒ Object
12 13 14 |
# File 'app/models/identifier/global/web_of_science.rb', line 12 def uri URI_BASE + identifier end |