rif-cs 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,59 +1,61 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <registryObject group="test group">
3
- <key>a key</key>
4
- <originatingSource>tomato</originatingSource>
5
- <activity dateModified="2012-06-13 14:00:00 UTC" type="program">
6
- <identifiers type="uri">http://example.com</identifiers>
7
- <identifiers type="local">123</identifiers>
8
- <name dateFrom="" dateTo="" type="primary" xml:lang="">
9
- <namePart type="">Testing of software</namePart>
10
- </name>
11
- <location dateFrom="2012-06-13 14:00:00 UTC" dateTo="" type="">
12
- <address>
13
- <electronic type="email">
14
- <value>joe@example.com</value>
15
- </electronic>
16
- <electronic type="uri">
17
- <value>http://example.com/people/a key</value>
18
- <arg required="false" type="" use="">placeholder</arg>
19
- </electronic>
20
- <physical type="postalAddress" xml:lang="">
21
- <addressPart type="country">Austrlia</addressPart>
22
- </physical>
23
- <physical type="" xml:lang="">
24
- <addressPart type="telephoneNumber">+61 2 9123 4567</addressPart>
25
- </physical>
26
- </address>
27
- </location>
28
- <coverage>
29
- <spatial type="gml" xml:lang="">&lt;gmlPoint gmlid="p21" srsName="http://www.opengis.net/def/crs/EPSG/0/4326"&gt;&lt;gmlcoordinates&gt;45.67, 88.56&lt;/gmlcoordinates&gt;&lt;/gmlPoint&gt;</spatial>
30
- <temporal>
31
- <date dateFormat="UTC" type="dateFrom">2012-06-13 14:00:00 UTC</date>
32
- <date dateFormat="UTC" type="dateTo">2013-06-13 14:00:00 UTC</date>
33
- <text>Self destructs in 1 year</text>
34
- </temporal>
35
- </coverage>
36
- <descriptions type="brief" xmllang="">An activity</descriptions>
37
- <descriptions type="full">Not just any activity</descriptions>
38
- <existenceDates>
39
- <startDate dateFormat="UTC">2012-06-13 14:00:00 UTC</startDate>
40
- <endDate dateFormat=""></endDate>
41
- </existenceDates>
42
- <relatedObject>
43
- <key>b party</key>
44
- <relation type="hasAssociationWith">
45
- <description>Supervisor</description>
46
- </relation>
47
- </relatedObject>
48
- <relatedObject>
49
- <key>some group</key>
50
- <relation type="isMemberOf"/>
51
- </relatedObject>
52
- <rights>
53
- <rightsStatement rightsUri="http://www.intersect.org.au/policies">Copyright 2012 Intersect Australia Ltd.</rightsStatement>
54
- <licence rightsUri="http://creativecommons.org/licenses/by/3.0">Attribution (CC BY)</licence>
55
- <accessRights rightsUri="">Available to all without restriction</accessRights>
56
- </rights>
57
- <subject termIdentifier="" type="anzsrc-for" xml:lang="">123456</subject>
58
- </activity>
59
- </registryObject>
2
+ <registryObjects xsi:schemaLocation="http://ands.org.au/standards/rif-cs/registryObjects http://services.ands.org.au/documentation/rifcs/1.3/schema/registryObjects.xsd">
3
+ <registryObject group="test group">
4
+ <key>a key</key>
5
+ <originatingSource>tomato</originatingSource>
6
+ <activity dateModified="2012-06-13 14:00:00 UTC" type="program">
7
+ <identifiers type="uri">http://example.com</identifiers>
8
+ <identifiers type="local">123</identifiers>
9
+ <name dateFrom="" dateTo="" type="primary" xml:lang="">
10
+ <namePart type="">Testing of software</namePart>
11
+ </name>
12
+ <location dateFrom="2012-06-13 14:00:00 UTC" dateTo="" type="">
13
+ <address>
14
+ <electronic type="email">
15
+ <value>joe@example.com</value>
16
+ </electronic>
17
+ <electronic type="uri">
18
+ <value>http://example.com/people/a key</value>
19
+ <arg required="false" type="" use="">placeholder</arg>
20
+ </electronic>
21
+ <physical type="postalAddress" xml:lang="">
22
+ <addressPart type="country">Austrlia</addressPart>
23
+ </physical>
24
+ <physical type="" xml:lang="">
25
+ <addressPart type="telephoneNumber">+61 2 9123 4567</addressPart>
26
+ </physical>
27
+ </address>
28
+ </location>
29
+ <coverage>
30
+ <spatial type="gml" xml:lang="">&lt;gmlPoint gmlid="p21" srsName="http://www.opengis.net/def/crs/EPSG/0/4326"&gt;&lt;gmlcoordinates&gt;45.67, 88.56&lt;/gmlcoordinates&gt;&lt;/gmlPoint&gt;</spatial>
31
+ <temporal>
32
+ <date dateFormat="UTC" type="dateFrom">2012-06-13 14:00:00 UTC</date>
33
+ <date dateFormat="UTC" type="dateTo">2013-06-13 14:00:00 UTC</date>
34
+ <text>Self destructs in 1 year</text>
35
+ </temporal>
36
+ </coverage>
37
+ <descriptions type="brief" xmllang="">An activity</descriptions>
38
+ <descriptions type="full">Not just any activity</descriptions>
39
+ <existenceDates>
40
+ <startDate dateFormat="UTC">2012-06-13 14:00:00 UTC</startDate>
41
+ <endDate dateFormat="UTC">2013-06-13 14:00:00 UTC</endDate>
42
+ </existenceDates>
43
+ <relatedObject>
44
+ <key>b party</key>
45
+ <relation type="hasAssociationWith">
46
+ <description>Supervisor</description>
47
+ </relation>
48
+ </relatedObject>
49
+ <relatedObject>
50
+ <key>some group</key>
51
+ <relation type="isMemberOf"/>
52
+ </relatedObject>
53
+ <rights>
54
+ <rightsStatement rightsUri="http://www.intersect.org.au/policies">Copyright 2012 Intersect Australia Ltd.</rightsStatement>
55
+ <licence rightsUri="http://creativecommons.org/licenses/by/3.0">Attribution (CC BY)</licence>
56
+ <accessRights rightsUri="">Available to all without restriction</accessRights>
57
+ </rights>
58
+ <subject termIdentifier="" type="anzsrc-for" xml:lang="">123456</subject>
59
+ </activity>
60
+ </registryObject>
61
+ </registryObjects>
@@ -1,73 +1,75 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <registryObject group="test group">
3
- <key>a key</key>
4
- <originatingSource>tomato</originatingSource>
5
- <collection dateModified="2012-06-13 14:00:00 UTC" type="dataset" dateAccessioned="2012-06-13 14:00:00 UTC">
6
- <identifiers type="uri">http://example.com</identifiers>
7
- <identifiers type="local">123</identifiers>
8
- <name dateFrom="" dateTo="" type="primary" xml:lang="">
9
- <namePart type="title">Dr</namePart>
10
- <namePart type="given">John</namePart>
11
- <namePart type="family">Doe</namePart>
12
- </name>
13
- <location dateFrom="2012-06-13 14:00:00 UTC" dateTo="" type="">
14
- <address>
15
- <electronic type="email">
16
- <value>joe@example.com</value>
17
- </electronic>
18
- <electronic type="uri">
19
- <value>http://example.com/people/a key</value>
20
- <arg required="false" type="" use="">placeholder</arg>
21
- </electronic>
22
- <physical type="postalAddress" xml:lang="">
23
- <addressPart type="country">Austrlia</addressPart>
24
- </physical>
25
- <physical type="" xml:lang="">
26
- <addressPart type="telephoneNumber">+61 2 9123 4567</addressPart>
27
- </physical>
28
- </address>
29
- </location>
30
- <coverage>
31
- <spatial type="gml" xml:lang="">&lt;gmlPoint gmlid="p21" srsName="http://www.opengis.net/def/crs/EPSG/0/4326"&gt;&lt;gmlcoordinates&gt;45.67, 88.56&lt;/gmlcoordinates&gt;&lt;/gmlPoint&gt;</spatial>
32
- <temporal>
33
- <date dateFormat="UTC" type="dateFrom">2012-06-13 14:00:00 UTC</date>
34
- <date dateFormat="UTC" type="dateTo">2013-06-13 14:00:00 UTC</date>
35
- <text>Self destructs in 1 year</text>
36
- </temporal>
37
- </coverage>
38
- <relatedObject>
39
- <key>b party</key>
40
- <relation type="hasAssociationWith">
41
- <description>owner</description>
42
- </relation>
43
- </relatedObject>
44
- <relatedObject>
45
- <key>some group</key>
46
- <relation type="isMemberOf"/>
47
- </relatedObject>
48
- <subject termIdentifier="" type="anzsrc-for" xml:lang="">123456</subject>
49
- <descriptions type="brief" xmllang="">A researcher</descriptions>
50
- <descriptions type="full">Not just any researcher</descriptions>
51
- <rights>
52
- <rightsStatement rightsUri="http://www.intersect.org.au/policies">Copyright 2012 Intersect Australia Ltd.</rightsStatement>
53
- <licence rightsUri="http://creativecommons.org/licenses/by/3.0">Attribution (CC BY)</licence>
54
- <accessRights rightsUri="">Available to all without restriction</accessRights>
55
- </rights>
56
- <fullCitation style="Harvard">Australian Bureau of Agricultural and Resource Economics 2001, Aquaculture development in Australia: a review of key economic issues, ABARE, Canberra.</fullCitation>
57
- <citationMetadata>
58
- <identifier type="isbn">1234</identifier>
59
- <contributor seq="">
2
+ <registryObjects xsi:schemaLocation="http://ands.org.au/standards/rif-cs/registryObjects http://services.ands.org.au/documentation/rifcs/1.3/schema/registryObjects.xsd">
3
+ <registryObject group="test group">
4
+ <key>a key</key>
5
+ <originatingSource>tomato</originatingSource>
6
+ <collection dateModified="2012-06-13 14:00:00 UTC" type="dataset" dateAccessioned="2012-06-13 14:00:00 UTC">
7
+ <identifiers type="uri">http://example.com</identifiers>
8
+ <identifiers type="local">123</identifiers>
9
+ <name dateFrom="" dateTo="" type="primary" xml:lang="">
60
10
  <namePart type="title">Dr</namePart>
61
- <namePart type="given">Jane</namePart>
11
+ <namePart type="given">John</namePart>
62
12
  <namePart type="family">Doe</namePart>
63
- </contributor>
64
- <title>Aquaculture development in Australia: a review of key economic issues</title>
65
- <edition>1st</edition>
66
- <publisher>ABARE</publisher>
67
- <placePublished>Canberra</placePublished>
68
- <date type="publicationDate">2012-06-14</date>
69
- <url>http://example.com</url>
70
- <context>local</context>
71
- </citationMetadata>
72
- </collection>
73
- </registryObject>
13
+ </name>
14
+ <location dateFrom="2012-06-13 14:00:00 UTC" dateTo="" type="">
15
+ <address>
16
+ <electronic type="email">
17
+ <value>joe@example.com</value>
18
+ </electronic>
19
+ <electronic type="uri">
20
+ <value>http://example.com/people/a key</value>
21
+ <arg required="false" type="" use="">placeholder</arg>
22
+ </electronic>
23
+ <physical type="postalAddress" xml:lang="">
24
+ <addressPart type="country">Austrlia</addressPart>
25
+ </physical>
26
+ <physical type="" xml:lang="">
27
+ <addressPart type="telephoneNumber">+61 2 9123 4567</addressPart>
28
+ </physical>
29
+ </address>
30
+ </location>
31
+ <coverage>
32
+ <spatial type="gml" xml:lang="">&lt;gmlPoint gmlid="p21" srsName="http://www.opengis.net/def/crs/EPSG/0/4326"&gt;&lt;gmlcoordinates&gt;45.67, 88.56&lt;/gmlcoordinates&gt;&lt;/gmlPoint&gt;</spatial>
33
+ <temporal>
34
+ <date dateFormat="UTC" type="dateFrom">2012-06-13 14:00:00 UTC</date>
35
+ <date dateFormat="UTC" type="dateTo">2013-06-13 14:00:00 UTC</date>
36
+ <text>Self destructs in 1 year</text>
37
+ </temporal>
38
+ </coverage>
39
+ <relatedObject>
40
+ <key>b party</key>
41
+ <relation type="hasAssociationWith">
42
+ <description>owner</description>
43
+ </relation>
44
+ </relatedObject>
45
+ <relatedObject>
46
+ <key>some group</key>
47
+ <relation type="isMemberOf"/>
48
+ </relatedObject>
49
+ <subject termIdentifier="" type="anzsrc-for" xml:lang="">123456</subject>
50
+ <descriptions type="brief" xmllang="">A researcher</descriptions>
51
+ <descriptions type="full">Not just any researcher</descriptions>
52
+ <rights>
53
+ <rightsStatement rightsUri="http://www.intersect.org.au/policies">Copyright 2012 Intersect Australia Ltd.</rightsStatement>
54
+ <licence rightsUri="http://creativecommons.org/licenses/by/3.0">Attribution (CC BY)</licence>
55
+ <accessRights rightsUri="">Available to all without restriction</accessRights>
56
+ </rights>
57
+ <fullCitation style="Harvard">Australian Bureau of Agricultural and Resource Economics 2001, Aquaculture development in Australia: a review of key economic issues, ABARE, Canberra.</fullCitation>
58
+ <citationMetadata>
59
+ <identifier type="isbn">1234</identifier>
60
+ <contributor seq="">
61
+ <namePart type="title">Dr</namePart>
62
+ <namePart type="given">Jane</namePart>
63
+ <namePart type="family">Doe</namePart>
64
+ </contributor>
65
+ <title>Aquaculture development in Australia: a review of key economic issues</title>
66
+ <edition>1st</edition>
67
+ <publisher>ABARE</publisher>
68
+ <placePublished>Canberra</placePublished>
69
+ <date type="publicationDate">2012-06-14</date>
70
+ <url>http://example.com</url>
71
+ <context>local</context>
72
+ </citationMetadata>
73
+ </collection>
74
+ </registryObject>
75
+ </registryObjects>
data/spec/files/party.xml CHANGED
@@ -1,61 +1,63 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <registryObject group="test group">
3
- <key>a key</key>
4
- <originatingSource>tomato</originatingSource>
5
- <party dateModified="2012-06-13 14:00:00 UTC" type="person">
6
- <identifiers type="uri">http://example.com</identifiers>
7
- <identifiers type="local">123</identifiers>
8
- <name dateFrom="" dateTo="" type="primary" xml:lang="">
9
- <namePart type="title">Dr</namePart>
10
- <namePart type="given">John</namePart>
11
- <namePart type="family">Doe</namePart>
12
- </name>
13
- <location dateFrom="2012-06-13 14:00:00 UTC" dateTo="" type="">
14
- <address>
15
- <electronic type="email">
16
- <value>joe@example.com</value>
17
- </electronic>
18
- <electronic type="uri">
19
- <value>http://example.com/people/a key</value>
20
- <arg required="false" type="" use="">placeholder</arg>
21
- </electronic>
22
- <physical type="postalAddress" xml:lang="">
23
- <addressPart type="country">Austrlia</addressPart>
24
- </physical>
25
- <physical type="" xml:lang="">
26
- <addressPart type="telephoneNumber">+61 2 9123 4567</addressPart>
27
- </physical>
28
- </address>
29
- </location>
30
- <coverage>
31
- <spatial type="gml" xml:lang="">&lt;gmlPoint gmlid="p21" srsName="http://www.opengis.net/def/crs/EPSG/0/4326"&gt;&lt;gmlcoordinates&gt;45.67, 88.56&lt;/gmlcoordinates&gt;&lt;/gmlPoint&gt;</spatial>
32
- <temporal>
33
- <date dateFormat="UTC" type="dateFrom">2012-06-13 14:00:00 UTC</date>
34
- <date dateFormat="UTC" type="dateTo">2013-06-13 14:00:00 UTC</date>
35
- <text>Self destructs in 1 year</text>
36
- </temporal>
37
- </coverage>
38
- <descriptions type="brief" xmllang="">A researcher</descriptions>
39
- <descriptions type="full">Not just any researcher</descriptions>
40
- <existenceDates>
41
- <startDate dateFormat="UTC">2012-06-13 14:00:00 UTC</startDate>
42
- <endDate dateFormat=""></endDate>
43
- </existenceDates>
44
- <relatedObject>
45
- <key>b party</key>
46
- <relation type="hasAssociationWith">
47
- <description>Supervisor</description>
48
- </relation>
49
- </relatedObject>
50
- <relatedObject>
51
- <key>some group</key>
52
- <relation type="isMemberOf"/>
53
- </relatedObject>
54
- <rights>
55
- <rightsStatement rightsUri="http://www.intersect.org.au/policies">Copyright 2012 Intersect Australia Ltd.</rightsStatement>
56
- <licence rightsUri="http://creativecommons.org/licenses/by/3.0">Attribution (CC BY)</licence>
57
- <accessRights rightsUri="">Available to all without restriction</accessRights>
58
- </rights>
59
- <subject termIdentifier="" type="anzsrc-for" xml:lang="">123456</subject>
60
- </party>
61
- </registryObject>
2
+ <registryObjects xsi:schemaLocation="http://ands.org.au/standards/rif-cs/registryObjects http://services.ands.org.au/documentation/rifcs/1.3/schema/registryObjects.xsd">
3
+ <registryObject group="test group">
4
+ <key>a key</key>
5
+ <originatingSource>tomato</originatingSource>
6
+ <party dateModified="2012-06-13 14:00:00 UTC" type="person">
7
+ <identifiers type="uri">http://example.com</identifiers>
8
+ <identifiers type="local">123</identifiers>
9
+ <name dateFrom="" dateTo="" type="primary" xml:lang="">
10
+ <namePart type="title">Dr</namePart>
11
+ <namePart type="given">John</namePart>
12
+ <namePart type="family">Doe</namePart>
13
+ </name>
14
+ <location dateFrom="2012-06-13 14:00:00 UTC" dateTo="" type="">
15
+ <address>
16
+ <electronic type="email">
17
+ <value>joe@example.com</value>
18
+ </electronic>
19
+ <electronic type="uri">
20
+ <value>http://example.com/people/a key</value>
21
+ <arg required="false" type="" use="">placeholder</arg>
22
+ </electronic>
23
+ <physical type="postalAddress" xml:lang="">
24
+ <addressPart type="country">Austrlia</addressPart>
25
+ </physical>
26
+ <physical type="" xml:lang="">
27
+ <addressPart type="telephoneNumber">+61 2 9123 4567</addressPart>
28
+ </physical>
29
+ </address>
30
+ </location>
31
+ <coverage>
32
+ <spatial type="gml" xml:lang="">&lt;gmlPoint gmlid="p21" srsName="http://www.opengis.net/def/crs/EPSG/0/4326"&gt;&lt;gmlcoordinates&gt;45.67, 88.56&lt;/gmlcoordinates&gt;&lt;/gmlPoint&gt;</spatial>
33
+ <temporal>
34
+ <date dateFormat="UTC" type="dateFrom">2012-06-13 14:00:00 UTC</date>
35
+ <date dateFormat="UTC" type="dateTo">2013-06-13 14:00:00 UTC</date>
36
+ <text>Self destructs in 1 year</text>
37
+ </temporal>
38
+ </coverage>
39
+ <descriptions type="brief" xmllang="">A researcher</descriptions>
40
+ <descriptions type="full">Not just any researcher</descriptions>
41
+ <existenceDates>
42
+ <startDate dateFormat="UTC">2012-06-13 14:00:00 UTC</startDate>
43
+ <endDate dateFormat="UTC">2013-06-13 14:00:00 UTC</endDate>
44
+ </existenceDates>
45
+ <relatedObject>
46
+ <key>b party</key>
47
+ <relation type="hasAssociationWith">
48
+ <description>Supervisor</description>
49
+ </relation>
50
+ </relatedObject>
51
+ <relatedObject>
52
+ <key>some group</key>
53
+ <relation type="isMemberOf"/>
54
+ </relatedObject>
55
+ <rights>
56
+ <rightsStatement rightsUri="http://www.intersect.org.au/policies">Copyright 2012 Intersect Australia Ltd.</rightsStatement>
57
+ <licence rightsUri="http://creativecommons.org/licenses/by/3.0">Attribution (CC BY)</licence>
58
+ <accessRights rightsUri="">Available to all without restriction</accessRights>
59
+ </rights>
60
+ <subject termIdentifier="" type="anzsrc-for" xml:lang="">123456</subject>
61
+ </party>
62
+ </registryObject>
63
+ </registryObjects>
@@ -1,63 +1,65 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <registryObject group="Intersect Australia">
3
- <key>service key</key>
4
- <originatingSource>http://www.intersect.org.au</originatingSource>
5
- <service dateModified="2012-06-13 14:00:00 UTC" type="create">
6
- <identifiers type="local">hdl:1959.4/004_311</identifiers>
7
- <name dateFrom="2012-06-14 00:00:00 +1000" dateTo="2013-06-14 00:00:00 +1000" type="create" xml:lang="">
8
- <namePart type="">Autolab PGSTAT 12 Potentiostat</namePart>
9
- </name>
10
- <location dateFrom="" dateTo="" type="">
11
- <address>
12
- <electronic type="email">
13
- <value>joe@example.com</value>
14
- </electronic>
15
- <physical type="postalAddress" xml:lang="">
16
- <addressPart type="country">Austrlia</addressPart>
17
- </physical>
18
- <physical type="" xml:lang="">
19
- <addressPart type="telephoneNumber">+61 2 9123 4567</addressPart>
20
- </physical>
21
- </address>
22
- <spatial type="gml" xml:lang="">&lt;gmlPoint gmlid="p21" srsName="http://www.opengis.net/def/crs/EPSG/0/4326"&gt;&lt;gmlcoordinates&gt;45.67, 88.56&lt;/gmlcoordinates&gt;&lt;/gmlPoint&gt;</spatial>
23
- </location>
24
- <coverage>
25
- <spatial type="gml" xml:lang="">&lt;gmlPoint gmlid="p21" srsName="http://www.opengis.net/def/crs/EPSG/0/4326"&gt;&lt;gmlcoordinates&gt;45.67, 88.56&lt;/gmlcoordinates&gt;&lt;/gmlPoint&gt;</spatial>
26
- <temporal>
27
- <date dateFormat="UTC" type="dateFrom">2012-06-13 14:00:00 UTC</date>
28
- <date dateFormat="UTC" type="dateTo">2013-06-13 14:00:00 UTC</date>
29
- <text>Self destructs in 1 year</text>
30
- </temporal>
31
- </coverage>
32
- <relatedObject>
33
- <key>http://nla.gov.au/nla.party-593921</key>
34
- <relation type="hasAssociationWith"/>
35
- </relatedObject>
36
- <relatedObject>
37
- <key>some group</key>
38
- <relation type="isPresentedBy"/>
39
- </relatedObject>
40
- <descriptions type="deliverymethod">offline</descriptions>
41
- <descriptions type="full">General-purpose potentiostat.</descriptions>
42
- <accessPolicies>http://example.com/policy</accessPolicies>
43
- <rights>
44
- <rightsStatement rightsUri="http://www.intersect.org.au/policies">Copyright 2012 Intersect Australia Ltd.</rightsStatement>
45
- <licence rightsUri="http://creativecommons.org/licenses/by/3.0">Attribution (CC BY)</licence>
46
- <accessRights rightsUri="">Available to all without restriction</accessRights>
47
- </rights>
48
- <existenceDates>
49
- <startDate dateFormat="UTC">2012-06-13 14:00:00 UTC</startDate>
50
- <endDate dateFormat=""></endDate>
51
- </existenceDates>
52
- <relatedInfo type="website">
53
- <identifier type="uri">http://example.com/personalsites/foo</identifier>
54
- <title>This person's blog</title>
55
- <notes>Another blog</notes>
56
- </relatedInfo>
57
- <relatedInfo type="publication">
58
- <identifier type="isbn">111</identifier>
59
- <title>The Ordering of Things</title>
60
- <notes>Not available</notes>
61
- </relatedInfo>
62
- </service>
63
- </registryObject>
2
+ <registryObjects xsi:schemaLocation="http://ands.org.au/standards/rif-cs/registryObjects http://services.ands.org.au/documentation/rifcs/1.3/schema/registryObjects.xsd">
3
+ <registryObject group="Intersect Australia">
4
+ <key>service key</key>
5
+ <originatingSource>http://www.intersect.org.au</originatingSource>
6
+ <service dateModified="2012-06-13 14:00:00 UTC" type="create">
7
+ <identifiers type="local">hdl:1959.4/004_311</identifiers>
8
+ <name dateFrom="2012-06-14 00:00:00 +1000" dateTo="2013-06-14 00:00:00 +1000" type="create" xml:lang="">
9
+ <namePart type="">Autolab PGSTAT 12 Potentiostat</namePart>
10
+ </name>
11
+ <location dateFrom="" dateTo="" type="">
12
+ <address>
13
+ <electronic type="email">
14
+ <value>joe@example.com</value>
15
+ </electronic>
16
+ <physical type="postalAddress" xml:lang="">
17
+ <addressPart type="country">Austrlia</addressPart>
18
+ </physical>
19
+ <physical type="" xml:lang="">
20
+ <addressPart type="telephoneNumber">+61 2 9123 4567</addressPart>
21
+ </physical>
22
+ </address>
23
+ <spatial type="gml" xml:lang="">&lt;gmlPoint gmlid="p21" srsName="http://www.opengis.net/def/crs/EPSG/0/4326"&gt;&lt;gmlcoordinates&gt;45.67, 88.56&lt;/gmlcoordinates&gt;&lt;/gmlPoint&gt;</spatial>
24
+ </location>
25
+ <coverage>
26
+ <spatial type="gml" xml:lang="">&lt;gmlPoint gmlid="p21" srsName="http://www.opengis.net/def/crs/EPSG/0/4326"&gt;&lt;gmlcoordinates&gt;45.67, 88.56&lt;/gmlcoordinates&gt;&lt;/gmlPoint&gt;</spatial>
27
+ <temporal>
28
+ <date dateFormat="UTC" type="dateFrom">2012-06-13 14:00:00 UTC</date>
29
+ <date dateFormat="UTC" type="dateTo">2013-06-13 14:00:00 UTC</date>
30
+ <text>Self destructs in 1 year</text>
31
+ </temporal>
32
+ </coverage>
33
+ <relatedObject>
34
+ <key>http://nla.gov.au/nla.party-593921</key>
35
+ <relation type="hasAssociationWith"/>
36
+ </relatedObject>
37
+ <relatedObject>
38
+ <key>some group</key>
39
+ <relation type="isPresentedBy"/>
40
+ </relatedObject>
41
+ <descriptions type="deliverymethod">offline</descriptions>
42
+ <descriptions type="full">General-purpose potentiostat.</descriptions>
43
+ <accessPolicies>http://example.com/policy</accessPolicies>
44
+ <rights>
45
+ <rightsStatement rightsUri="http://www.intersect.org.au/policies">Copyright 2012 Intersect Australia Ltd.</rightsStatement>
46
+ <licence rightsUri="http://creativecommons.org/licenses/by/3.0">Attribution (CC BY)</licence>
47
+ <accessRights rightsUri="">Available to all without restriction</accessRights>
48
+ </rights>
49
+ <existenceDates>
50
+ <startDate dateFormat="UTC">2012-06-13 14:00:00 UTC</startDate>
51
+ <endDate dateFormat="UTC">2013-06-13 14:00:00 UTC</endDate>
52
+ </existenceDates>
53
+ <relatedInfo type="website">
54
+ <identifier type="uri">http://example.com/personalsites/foo</identifier>
55
+ <title>This person's blog</title>
56
+ <notes>Another blog</notes>
57
+ </relatedInfo>
58
+ <relatedInfo type="publication">
59
+ <identifier type="isbn">111</identifier>
60
+ <title>The Ordering of Things</title>
61
+ <notes>Not available</notes>
62
+ </relatedInfo>
63
+ </service>
64
+ </registryObject>
65
+ </registryObjects>
@@ -0,0 +1,23 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
+
3
+ def tests(record_type)
4
+
5
+ record = Object.const_get("#{record_type}Example").new
6
+
7
+ it "should give a RIF-CS XML #{record_type} record for a model" do
8
+ expected = Nokogiri::XML(IO.read(File.join(File.dirname(__FILE__), 'files', "#{record_type.downcase}.xml"))).at_xpath('//registryObject').to_xml.gsub(/^\s{2}/, '')
9
+ record = Object.const_get("#{record_type}Example").new
10
+ record.to_registry_node.doc.root.to_xml(:indent => 2).should eq(expected)
11
+ end
12
+
13
+ it "should give a #{record_type} record wrapped in a registryObjects tag" do
14
+ expected = IO.read(File.join(File.dirname(__FILE__), 'files', "#{record_type.downcase}.xml"))
15
+ record.to_rif.should == expected
16
+ end
17
+ end
18
+
19
+ %w{Activity Collection Party Service}.each do |record|
20
+ describe "RIFCS::#{record}" do
21
+ tests(record)
22
+ end
23
+ end
data/spec/spec_helper.rb CHANGED
@@ -2,6 +2,7 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
2
  $LOAD_PATH.unshift(File.dirname(__FILE__))
3
3
  require 'rspec'
4
4
  require 'rif-cs'
5
+ require 'example_models'
5
6
 
6
7
  # Requires supporting files with custom matchers and macros, etc,
7
8
  # in ./support/ and its subdirectories.