Module: SchemaOrg::Mixins::Article

Includes:
CreativeWork
Included in:
Article, AdvertiserContentArticle, NewsArticle, Report, SatiricalArticle, ScholarlyArticle, SocialMediaPosting, TechArticle
Defined in:
lib/schema_org/mixins/article.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from CreativeWork

#about, #about=, #abstract, #abstract=, #access_mode, #access_mode=, #access_mode_sufficient, #access_mode_sufficient=, #accessibility_api, #accessibility_api=, #accessibility_control, #accessibility_control=, #accessibility_feature, #accessibility_feature=, #accessibility_hazard, #accessibility_hazard=, #accessibility_summary, #accessibility_summary=, #accountable_person, #accountable_person=, #acquire_license_page, #acquire_license_page=, #aggregate_rating, #aggregate_rating=, #alternative_headline, #alternative_headline=, #archived_at, #archived_at=, #assesses, #assesses=, #associated_media, #associated_media=, #audience, #audience=, #audio, #audio=, #author, #author=, #award, #award=, #awards, #awards=, #character, #character=, #citation, #citation=, #comment, #comment=, #comment_count, #comment_count=, #conditions_of_access, #conditions_of_access=, #content_location, #content_location=, #content_rating, #content_rating=, #content_reference_time, #content_reference_time=, #contributor, #contributor=, #copyright_holder, #copyright_holder=, #copyright_notice, #copyright_notice=, #copyright_year, #copyright_year=, #correction, #correction=, #country_of_origin, #country_of_origin=, #creative_work_status, #creative_work_status=, #creator, #creator=, #credit_text, #credit_text=, #date_created, #date_created=, #date_modified, #date_modified=, #date_published, #date_published=, #digital_source_type, #digital_source_type=, #discussion_url, #discussion_url=, #display_location, #display_location=, #edit_eidr, #edit_eidr=, #editor, #editor=, #educational_alignment, #educational_alignment=, #educational_level, #educational_level=, #educational_use, #educational_use=, #encoding, #encoding=, #encoding_format, #encoding_format=, #encodings, #encodings=, #example_of_work, #example_of_work=, #expires, #expires=, #file_format, #file_format=, #funder, #funder=, #funding, #funding=, #genre, #genre=, #has_part, #has_part=, #headline, #headline=, #in_language, #in_language=, #interaction_statistic, #interaction_statistic=, #interactivity_type, #interactivity_type=, #interpreted_as_claim, #interpreted_as_claim=, #is_accessible_for_free, #is_accessible_for_free=, #is_based_on, #is_based_on=, #is_based_on_url, #is_based_on_url=, #is_family_friendly, #is_family_friendly=, #is_part_of, #is_part_of=, #keywords, #keywords=, #learning_resource_type, #learning_resource_type=, #license, #license=, #location_created, #location_created=, #main_entity, #main_entity=, #maintainer, #maintainer=, #material, #material=, #material_extent, #material_extent=, #mentions, #mentions=, #offers, #offers=, #pattern, #pattern=, #position, #position=, #producer, #producer=, #provider, #provider=, #publication, #publication=, #publisher, #publisher=, #publisher_imprint, #publisher_imprint=, #publishing_principles, #publishing_principles=, #recorded_at, #recorded_at=, #released_event, #released_event=, #review, #review=, #reviews, #reviews=, #schema_version, #schema_version=, #sd_date_published, #sd_date_published=, #sd_license, #sd_license=, #sd_publisher, #sd_publisher=, #size, #size=, #source_organization, #source_organization=, #spatial, #spatial=, #spatial_coverage, #spatial_coverage=, #sponsor, #sponsor=, #teaches, #teaches=, #temporal, #temporal=, #temporal_coverage, #temporal_coverage=, #text, #text=, #thumbnail, #thumbnail=, #thumbnail_url, #thumbnail_url=, #time_required, #time_required=, #translation_of_work, #translation_of_work=, #translator, #translator=, #typical_age_range, #typical_age_range=, #usage_info, #usage_info=, #version, #version=, #video, #video=, #work_example, #work_example=, #work_translation, #work_translation=

Methods included from Thing

#additional_type, #additional_type=, #alternate_name, #alternate_name=, #description, #description=, #disambiguating_description, #disambiguating_description=, #identifier, #identifier=, #image, #image=, #main_entity_of_page, #main_entity_of_page=, #name, #name=, #owner, #owner=, #potential_action, #potential_action=, #same_as, #same_as=, #subject_of, #subject_of=, #url, #url=

Class Method Details

.schema_property_definitionsObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/schema_org/mixins/article.rb', line 11

def self.schema_property_definitions
  {
    article_body: {
      schema_name: "articleBody",
      schema_url: "https://schema.org/articleBody",
      comment_lines: ["The actual body of the article."].freeze,
      ranges: ["Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    article_section: {
      schema_name: "articleSection",
      schema_url: "https://schema.org/articleSection",
      comment_lines: ["Articles may belong to one or more 'sections' in a magazine or newspaper, such as Sports, Lifestyle, etc."].freeze,
      ranges: ["Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    backstory: {
      schema_name: "backstory",
      schema_url: "https://schema.org/backstory",
      comment_lines: ["For an [[Article]], typically a [[NewsArticle]], the backstory property provides a textual summary giving a brief explanation of why and how an article was created. In a journalistic setting this could include information about reporting process, methods, interviews, data sources, etc."].freeze,
      ranges: ["CreativeWork", "Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    page_end: {
      schema_name: "pageEnd",
      schema_url: "https://schema.org/pageEnd",
      comment_lines: ["The page on which the work ends; for example \"138\" or \"xvi\"."].freeze,
      ranges: ["Integer", "Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    page_start: {
      schema_name: "pageStart",
      schema_url: "https://schema.org/pageStart",
      comment_lines: ["The page on which the work starts; for example \"135\" or \"xiii\"."].freeze,
      ranges: ["Integer", "Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    pagination: {
      schema_name: "pagination",
      schema_url: "https://schema.org/pagination",
      comment_lines: ["Any description of pages that is not separated into pageStart and pageEnd; for example, \"1-6, 9, 55\" or \"10-12, 46-49\"."].freeze,
      ranges: ["Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    speakable: {
      schema_name: "speakable",
      schema_url: "https://schema.org/speakable",
      comment_lines: ["Indicates sections of a Web page that are particularly 'speakable' in the sense of being highlighted as being especially appropriate for text-to-speech conversion. Other sections of a page may also be usefully spoken in particular circumstances; the 'speakable' property serves to indicate the parts most likely to be generally useful for speech.", "", "The *speakable* property can be repeated an arbitrary number of times, with three kinds of possible 'content-locator' values:", "", "1.) *id-value* URL references - uses *id-value* of an element in the page being annotated. The simplest use of *speakable* has (potentially relative) URL values, referencing identified sections of the document concerned.", "", "2.) CSS Selectors - addresses content in the annotated page, e.g. via class attribute. Use the [[cssSelector]] property.", "", "3.)  XPaths - addresses content via XPaths (assuming an XML view of the content). Use the [[xpath]] property.", "", "", "For more sophisticated markup of speakable sections beyond simple ID references, either CSS selectors or XPath expressions to pick out document section(s) as speakable. For this", "we define a supporting type, [[SpeakableSpecification]]  which is defined to be a possible value of the *speakable* property."].freeze,
      ranges: ["SpeakableSpecification", "URL"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    word_count: {
      schema_name: "wordCount",
      schema_url: "https://schema.org/wordCount",
      comment_lines: ["The number of words in the text of the CreativeWork such as an Article, Book, etc."].freeze,
      ranges: ["Integer"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze
  }.freeze
end

Instance Method Details

#article_bodyObject

The actual body of the article.



97
98
99
# File 'lib/schema_org/mixins/article.rb', line 97

def article_body
  read_property(:article_body)
end

#article_body=(value) ⇒ Object

The actual body of the article.



102
103
104
# File 'lib/schema_org/mixins/article.rb', line 102

def article_body=(value)
  write_property(:article_body, value)
end

#article_sectionObject

Articles may belong to one or more 'sections' in a magazine or newspaper, such as Sports, Lifestyle, etc.



107
108
109
# File 'lib/schema_org/mixins/article.rb', line 107

def article_section
  read_property(:article_section)
end

#article_section=(value) ⇒ Object

Articles may belong to one or more 'sections' in a magazine or newspaper, such as Sports, Lifestyle, etc.



112
113
114
# File 'lib/schema_org/mixins/article.rb', line 112

def article_section=(value)
  write_property(:article_section, value)
end

#backstoryObject

For an [[Article]], typically a [[NewsArticle]], the backstory property provides a textual summary giving a brief explanation of why and how an article was created. In a journalistic setting this could include information about reporting process, methods, interviews, data sources, etc.



117
118
119
# File 'lib/schema_org/mixins/article.rb', line 117

def backstory
  read_property(:backstory)
end

#backstory=(value) ⇒ Object

For an [[Article]], typically a [[NewsArticle]], the backstory property provides a textual summary giving a brief explanation of why and how an article was created. In a journalistic setting this could include information about reporting process, methods, interviews, data sources, etc.



122
123
124
# File 'lib/schema_org/mixins/article.rb', line 122

def backstory=(value)
  write_property(:backstory, value)
end

#page_endObject

The page on which the work ends; for example "138" or "xvi".



127
128
129
# File 'lib/schema_org/mixins/article.rb', line 127

def page_end
  read_property(:page_end)
end

#page_end=(value) ⇒ Object

The page on which the work ends; for example "138" or "xvi".



132
133
134
# File 'lib/schema_org/mixins/article.rb', line 132

def page_end=(value)
  write_property(:page_end, value)
end

#page_startObject

The page on which the work starts; for example "135" or "xiii".



137
138
139
# File 'lib/schema_org/mixins/article.rb', line 137

def page_start
  read_property(:page_start)
end

#page_start=(value) ⇒ Object

The page on which the work starts; for example "135" or "xiii".



142
143
144
# File 'lib/schema_org/mixins/article.rb', line 142

def page_start=(value)
  write_property(:page_start, value)
end

#paginationObject

Any description of pages that is not separated into pageStart and pageEnd; for example, "1-6, 9, 55" or "10-12, 46-49".



147
148
149
# File 'lib/schema_org/mixins/article.rb', line 147

def pagination
  read_property(:pagination)
end

#pagination=(value) ⇒ Object

Any description of pages that is not separated into pageStart and pageEnd; for example, "1-6, 9, 55" or "10-12, 46-49".



152
153
154
# File 'lib/schema_org/mixins/article.rb', line 152

def pagination=(value)
  write_property(:pagination, value)
end

#speakableObject

Indicates sections of a Web page that are particularly 'speakable' in the sense of being highlighted as being especially appropriate for text-to-speech conversion. Other sections of a page may also be usefully spoken in particular circumstances; the 'speakable' property serves to indicate the parts most likely to be generally useful for speech.

The speakable property can be repeated an arbitrary number of times, with three kinds of possible 'content-locator' values:

1.) id-value URL references - uses id-value of an element in the page being annotated. The simplest use of speakable has (potentially relative) URL values, referencing identified sections of the document concerned.

2.) CSS Selectors - addresses content in the annotated page, e.g. via class attribute. Use the [[cssSelector]] property.

3.) XPaths - addresses content via XPaths (assuming an XML view of the content). Use the [[xpath]] property.

For more sophisticated markup of speakable sections beyond simple ID references, either CSS selectors or XPath expressions to pick out document section(s) as speakable. For this we define a supporting type, [[SpeakableSpecification]] which is defined to be a possible value of the speakable property.



169
170
171
# File 'lib/schema_org/mixins/article.rb', line 169

def speakable
  read_property(:speakable)
end

#speakable=(value) ⇒ Object

Indicates sections of a Web page that are particularly 'speakable' in the sense of being highlighted as being especially appropriate for text-to-speech conversion. Other sections of a page may also be usefully spoken in particular circumstances; the 'speakable' property serves to indicate the parts most likely to be generally useful for speech.

The speakable property can be repeated an arbitrary number of times, with three kinds of possible 'content-locator' values:

1.) id-value URL references - uses id-value of an element in the page being annotated. The simplest use of speakable has (potentially relative) URL values, referencing identified sections of the document concerned.

2.) CSS Selectors - addresses content in the annotated page, e.g. via class attribute. Use the [[cssSelector]] property.

3.) XPaths - addresses content via XPaths (assuming an XML view of the content). Use the [[xpath]] property.

For more sophisticated markup of speakable sections beyond simple ID references, either CSS selectors or XPath expressions to pick out document section(s) as speakable. For this we define a supporting type, [[SpeakableSpecification]] which is defined to be a possible value of the speakable property.



186
187
188
# File 'lib/schema_org/mixins/article.rb', line 186

def speakable=(value)
  write_property(:speakable, value)
end

#word_countObject

The number of words in the text of the CreativeWork such as an Article, Book, etc.



191
192
193
# File 'lib/schema_org/mixins/article.rb', line 191

def word_count
  read_property(:word_count)
end

#word_count=(value) ⇒ Object

The number of words in the text of the CreativeWork such as an Article, Book, etc.



196
197
198
# File 'lib/schema_org/mixins/article.rb', line 196

def word_count=(value)
  write_property(:word_count, value)
end