-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathWebpageRef.js
34 lines (33 loc) · 1.17 KB
/
WebpageRef.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { CHILDREN, TEXT, STRING } from 'substance'
import { RICH_TEXT_ANNOS } from './modelConstants'
import Reference from './Reference'
/*
<element-citation publication-type="webpage">
<day>10</day>
<month>05</month>
<uri>http://www.michaeleisen.org/blog/?p=1894</uri>
<date-in-citation iso-8601-date="1995-09-10">1995-09-10</date-in-citation>
<year>2016</year>
<person-group person-group-type="author">
<name>
<surname>Eisen</surname>
<given-names>M</given-names>
</name>
</person-group>
<source>it is NOT junk</source>
<article-title>The Imprinter of All Maladies</article-title>
</element-citation>
*/
export default class WebpageRef extends Reference {}
WebpageRef.schema = {
type: 'webpage-ref', // publication-type="webpage"
title: TEXT(...RICH_TEXT_ANNOS), // <article-title>
// E.g. website name, where the page appeared
containerTitle: STRING, // <source>
authors: CHILDREN('ref-contrib'), // <person-group person-group-type="author">
year: STRING, // <year>
month: STRING, // <month>
day: STRING, // <day>
accessedDate: STRING, // <date-in-citation iso-8601-date="1995-09-10">
uri: STRING // <uri>
}