Class: Lbp::Expression
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
- #abbreviatedBy ⇒ Object
-
#abbreviates ⇒ Object
returns array of ResourceIdentifiers.
-
#canonical_manifestation ⇒ Object
returns a single manifestation ResourceIdentifier.
-
#canonical_manifestation? ⇒ Boolean
returns boolean.
-
#canonical_transcription ⇒ Object
cannonical transcriptions refers to the canonical trancription of the canonical manifestation.
-
#canonical_transcription? ⇒ Boolean
returns boolean.
- #canonical_translation ⇒ Object
- #canonical_translation? ⇒ Boolean
- #copiedBy ⇒ Object
- #copies ⇒ Object
-
#item_level_expression ⇒ Object
returns resource identifier.
-
#level ⇒ Object
returns resource integer.
-
#manifestations ⇒ Object
returns array of available manifestations as ResourceIdentifiers.
- #mentions ⇒ Object
-
#next ⇒ Object
returns resource identifier of next expression or nil.
-
#order_number ⇒ Object
returns integer.
-
#previous ⇒ Object
returns ResourceIdentifier or nil.
- #quotedBy ⇒ Object
- #quotes ⇒ Object
- #referencedBy ⇒ Object
- #references ⇒ Object
-
#status ⇒ Object
returns string.
-
#structure_type ⇒ Object
inherits initialization from Resource.
-
#top_level_expression ⇒ Object
returns resource identifier.
-
#translations ⇒ Object
translations are a subclass of manifestations for any kind of manifestation not in the original language note that this currently means the manifestations methods, will not grab translation-manifestations, these must be called with translations method.
Methods inherited from Resource
create, #description, find, #has_parts, #initialize, #is_part_of, #title, #type, #value, #values
Constructor Details
This class inherits a constructor from Lbp::Resource
Instance Method Details
#abbreviatedBy ⇒ Object
82 83 84 |
# File 'lib/lbp/expression.rb', line 82 def abbreviatedBy values("http://scta.info/property/abbreviatedBy") end |
#abbreviates ⇒ Object
returns array of ResourceIdentifiers
79 80 81 |
# File 'lib/lbp/expression.rb', line 79 def abbreviates # returns array of ResourceIdentifiers values("http://scta.info/property/abbreviates") end |
#canonical_manifestation ⇒ Object
returns a single manifestation ResourceIdentifier
19 20 21 |
# File 'lib/lbp/expression.rb', line 19 def canonical_manifestation # returns a single manifestation ResourceIdentifier value("http://scta.info/property/hasCanonicalManifestation") end |
#canonical_manifestation? ⇒ Boolean
returns boolean
22 23 24 |
# File 'lib/lbp/expression.rb', line 22 def canonical_manifestation? # returns boolean !canonical_manifestation.to_s.nil? end |
#canonical_transcription ⇒ Object
cannonical transcriptions refers to the canonical trancription of the canonical manifestation
38 39 40 41 42 43 |
# File 'lib/lbp/expression.rb', line 38 def canonical_transcription # returns single transcription as ResourceIdentifier manifestation = canonical_manifestation unless manifestation == nil return manifestation.resource.canonical_transcription end end |
#canonical_transcription? ⇒ Boolean
returns boolean
44 45 46 |
# File 'lib/lbp/expression.rb', line 44 def canonical_transcription? #returns boolean !canonical_transcription.nil? end |
#canonical_translation ⇒ Object
31 32 33 |
# File 'lib/lbp/expression.rb', line 31 def canonical_translation values("http://scta.info/property/hasCanonicalTranslation") end |
#canonical_translation? ⇒ Boolean
34 35 36 |
# File 'lib/lbp/expression.rb', line 34 def canonical_translation? !canonical_translation.to_s.nil? end |
#copiedBy ⇒ Object
94 95 96 |
# File 'lib/lbp/expression.rb', line 94 def copiedBy values("http://scta.info/property/copiedBy") end |
#copies ⇒ Object
91 92 93 |
# File 'lib/lbp/expression.rb', line 91 def copies values("http://scta.info/property/copies") end |
#item_level_expression ⇒ Object
returns resource identifier
69 70 71 72 |
# File 'lib/lbp/expression.rb', line 69 def item_level_expression # returns resource identifier #TODO make sure this can handle different structure types value("http://scta.info/property/isPartOfStructureItem") end |
#level ⇒ Object
returns resource integer
73 74 75 76 77 |
# File 'lib/lbp/expression.rb', line 73 def level # returns resource integer #same comment as earlier; this query does not actually return a uri, #but an litteral. We need to make sure the resource identifer can handle that value("http://scta.info/property/level").to_s.to_i end |
#manifestations ⇒ Object
returns array of available manifestations as ResourceIdentifiers
16 17 18 |
# File 'lib/lbp/expression.rb', line 16 def manifestations # returns array of available manifestations as ResourceIdentifiers values("http://scta.info/property/hasManifestation") end |
#mentions ⇒ Object
97 98 99 |
# File 'lib/lbp/expression.rb', line 97 def mentions values("http://scta.info/property/mentions") end |
#next ⇒ Object
returns resource identifier of next expression or nil
48 49 50 |
# File 'lib/lbp/expression.rb', line 48 def next # returns resource identifier of next expression or nil value("http://scta.info/property/next") end |
#order_number ⇒ Object
returns integer
54 55 56 57 58 59 60 61 |
# File 'lib/lbp/expression.rb', line 54 def order_number # returns integer ## TODO: consider changing property so that there is more symmetry here if structure_type.short_id == "structureBlock" value("http://scta.info/property/paragraphNumber").to_s.to_i else value("http://scta.info/property/totalOrderNumber").to_s.to_i end end |
#previous ⇒ Object
returns ResourceIdentifier or nil
51 52 53 |
# File 'lib/lbp/expression.rb', line 51 def previous #returns ResourceIdentifier or nil value("http://scta.info/property/previous") end |
#quotedBy ⇒ Object
103 104 105 |
# File 'lib/lbp/expression.rb', line 103 def quotedBy values("http://scta.info/property/quotedBy") end |
#quotes ⇒ Object
100 101 102 |
# File 'lib/lbp/expression.rb', line 100 def quotes values("http://scta.info/property/quotes") end |
#referencedBy ⇒ Object
88 89 90 |
# File 'lib/lbp/expression.rb', line 88 def referencedBy values("http://scta.info/property/referencedBy") end |
#references ⇒ Object
85 86 87 |
# File 'lib/lbp/expression.rb', line 85 def references values("http://scta.info/property/references") end |
#status ⇒ Object
returns string
62 63 64 |
# File 'lib/lbp/expression.rb', line 62 def status #returns string value("http://scta.info/property/status").to_s end |
#structure_type ⇒ Object
inherits initialization from Resource
13 14 15 |
# File 'lib/lbp/expression.rb', line 13 def structure_type #returns resource identifier value("http://scta.info/property/structureType") end |
#top_level_expression ⇒ Object
returns resource identifier
65 66 67 68 |
# File 'lib/lbp/expression.rb', line 65 def top_level_expression # returns resource identifier #TODO make sure this can handle different structure types value("http://scta.info/property/isPartOfTopLevelExpression") end |
#translations ⇒ Object
translations are a subclass of manifestations for any kind of manifestation not in the original language note that this currently means the manifestations methods, will not grab translation-manifestations, these must be called with translations method
28 29 30 |
# File 'lib/lbp/expression.rb', line 28 def translations values("http://scta.info/property/hasTranslation") end |