1 | <?php |
||
13 | trait ArticleTrait |
||
14 | { |
||
15 | use CreativeWorkTrait; |
||
16 | |||
17 | private $_articleBody; |
||
18 | |||
19 | /** |
||
20 | * @return string |
||
21 | */ |
||
22 | public function getArticleBody() |
||
26 | |||
27 | /** |
||
28 | * The actual body of the article. |
||
29 | * |
||
30 | * @param string $articleBody |
||
31 | * @return Article|ArticleTrait |
||
32 | */ |
||
33 | public function setArticleBody($articleBody) |
||
38 | |||
39 | private $_articleSection; |
||
40 | |||
41 | /** |
||
42 | * @return string |
||
43 | */ |
||
44 | public function getArticleSection() |
||
48 | |||
49 | /** |
||
50 | * Articles may belong to one or more 'sections' in a magazine or newspaper, such as Sports, Lifestyle, etc. |
||
51 | * |
||
52 | * @param string $articleSection |
||
53 | * @return Article|ArticleTrait |
||
54 | */ |
||
55 | public function setArticleSection($articleSection) |
||
60 | |||
61 | private $_pageEnd; |
||
62 | |||
63 | /** |
||
64 | * @return int|string |
||
65 | */ |
||
66 | public function getPageEnd() |
||
70 | |||
71 | /** |
||
72 | * The page on which the work ends; for example "138" or "xvi". |
||
73 | * |
||
74 | * @param int|string $pageEnd |
||
75 | * @return Article|ArticleTrait |
||
76 | */ |
||
77 | public function setPageEnd($pageEnd) |
||
82 | |||
83 | private $_pageStart; |
||
84 | |||
85 | /** |
||
86 | * @return int|string |
||
87 | */ |
||
88 | public function getPageStart() |
||
92 | |||
93 | /** |
||
94 | * The page on which the work starts; for example "135" or "xiii". |
||
95 | * |
||
96 | * @param int|string $pageStart |
||
97 | * @return Article|ArticleTrait |
||
98 | */ |
||
99 | public function setPageStart($pageStart) |
||
104 | |||
105 | private $_pagination; |
||
106 | |||
107 | /** |
||
108 | * @return string |
||
109 | */ |
||
110 | public function getPagination() |
||
114 | |||
115 | /** |
||
116 | * Any description of pages that is not separated into pageStart and pageEnd; |
||
117 | * for example, "1-6, 9, 55" or "10-12, 46-49". |
||
118 | * |
||
119 | * @param string $pagination |
||
120 | * @return Article|ArticleTrait |
||
121 | */ |
||
122 | public function setPagination($pagination) |
||
127 | |||
128 | private $_speakable; |
||
129 | |||
130 | /** |
||
131 | * @return SpeakableSpecification|URL |
||
132 | */ |
||
133 | public function getSpeakable() |
||
137 | |||
138 | /** |
||
139 | * Indicates sections of a Web page that are particularly 'speakable' in the sense of being highlighted as being |
||
140 | * especially appropriate for text-to-speech conversion. Other sections of a page may also be usefully spoken in |
||
141 | * particular circumstances; the 'speakable' property serves to indicate the parts most likely |
||
142 | * to be generally useful for speech. |
||
143 | * |
||
144 | * The speakable property can be repeated an arbitrary number of times, |
||
145 | * with three kinds of possible 'content-locator' values: |
||
146 | * |
||
147 | * 1.) id-value URL references - uses id-value of an element in the page being annotated. The simplest use |
||
148 | * of speakable has (potentially relative) URL values, referencing identified sections of the document concerned. |
||
149 | * |
||
150 | * 2.) CSS Selectors - addresses content in the annotated page, eg. via class attribute. Use the cssSelector property. |
||
151 | * |
||
152 | * 3.) XPaths - addresses content via XPaths (assuming an XML view of the content). Use the xpath property. |
||
153 | * |
||
154 | * For more sophisticated markup of speakable sections beyond simple ID references, either CSS selectors |
||
155 | * or XPath expressions to pick out document section(s) as speakable. For this we define a supporting type, |
||
156 | * SpeakableSpecification which is defined to be a possible value of the speakable property. |
||
157 | * |
||
158 | * @param SpeakableSpecification|URL $speakable |
||
159 | * @return Article|ArticleTrait |
||
160 | */ |
||
161 | public function setSpeakable($speakable) |
||
166 | |||
167 | private $_wordCount; |
||
168 | |||
169 | /** |
||
170 | * @return int |
||
171 | */ |
||
172 | public function getWordCount() |
||
176 | |||
177 | /** |
||
178 | * The number of words in the text of the Article. |
||
179 | * |
||
180 | * @param int $wordCount |
||
181 | * @return Article|ArticleTrait |
||
182 | */ |
||
183 | public function setWordCount($wordCount) |
||
188 | } |