sdu_smart 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sdu_smart/annotation.rb +26 -0
- data/lib/sdu_smart/derivation.rb +27 -0
- data/lib/sdu_smart/entity.rb +1 -7
- data/lib/sdu_smart/provision.rb +7 -1
- data/lib/sdu_smart/rdf/namespaces/dcat_namespace.rb +12 -0
- data/lib/sdu_smart/rdf/namespaces/prov_namespace.rb +12 -0
- data/lib/sdu_smart/rdf/namespaces/skosxl_namespace.rb +12 -0
- data/lib/sdu_smart/rdf/namespaces.rb +3 -0
- data/lib/sdu_smart/selector.rb +22 -0
- data/lib/sdu_smart/specific_resource.rb +43 -0
- data/lib/sdu_smart/taxonomy/bindingness_type.rb +4 -17
- data/lib/sdu_smart/taxonomy/concept.rb +37 -0
- data/lib/sdu_smart/taxonomy/part_of_speech_type.rb +4 -17
- data/lib/sdu_smart/taxonomy/provision_supplement_type.rb +4 -17
- data/lib/sdu_smart/taxonomy/provision_type.rb +4 -17
- data/lib/sdu_smart/taxonomy/publication_component_type.rb +4 -17
- data/lib/sdu_smart/taxonomy/publication_document_type.rb +8 -21
- data/lib/sdu_smart/taxonomy/term_form_type.rb +4 -17
- data/lib/sdu_smart/taxonomy.rb +1 -0
- data/lib/sdu_smart/term.rb +14 -5
- data/lib/sdu_smart/term_entry.rb +45 -1
- data/lib/sdu_smart/version.rb +1 -1
- data/lib/sdu_smart.rb +4 -0
- metadata +9 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c901b4efaae75a23a307899d5aaab016b04d04aa15f6f2e4f55c38305b2912d2
|
|
4
|
+
data.tar.gz: 87c1489ca3feeb083e7c94d0bf6f00d841f3d691ae8c3453b3c92ac2e9b11786
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b48bb126015cf95863cb7df17cb75cb705c852a13aa9e331a7c7dfae7b56f1eb9e0b92d2577ad44fc196fa378b8752e8cace1acc842645f1680bee16672cc2dc
|
|
7
|
+
data.tar.gz: 6eee243941a9eb098b398209c7e8b72462fdc1099ce90b1e48d32d886bbb884232ded81a239bda5768677efcf9dff65d3f80d9ef6d958657e6d9b0898f70aef3
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SduSmart
|
|
4
|
+
class Annotation < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :has_target, :string
|
|
7
|
+
attribute :has_body, :string
|
|
8
|
+
|
|
9
|
+
rdf do
|
|
10
|
+
namespace SduSmart::Rdf::Namespaces::SmartNamespace,
|
|
11
|
+
SduSmart::Rdf::Namespaces::OaNamespace
|
|
12
|
+
|
|
13
|
+
subject { |m| "https://w3id.org/standards/smart/ontologies/core/#{m.id}" }
|
|
14
|
+
|
|
15
|
+
type "oa:Annotation"
|
|
16
|
+
|
|
17
|
+
predicate :hasTarget,
|
|
18
|
+
namespace: SduSmart::Rdf::Namespaces::OaNamespace,
|
|
19
|
+
to: :has_target
|
|
20
|
+
|
|
21
|
+
predicate :hasBody,
|
|
22
|
+
namespace: SduSmart::Rdf::Namespaces::OaNamespace,
|
|
23
|
+
to: :has_body
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SduSmart
|
|
4
|
+
class Derivation < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :entity, :string
|
|
7
|
+
attribute :change_note, :string
|
|
8
|
+
|
|
9
|
+
rdf do
|
|
10
|
+
namespace SduSmart::Rdf::Namespaces::SmartNamespace,
|
|
11
|
+
SduSmart::Rdf::Namespaces::ProvNamespace,
|
|
12
|
+
Lutaml::Rdf::Namespaces::SkosNamespace
|
|
13
|
+
|
|
14
|
+
subject { |m| "https://w3id.org/standards/smart/ontologies/core/#{m.id}" }
|
|
15
|
+
|
|
16
|
+
type "prov:Derivation"
|
|
17
|
+
|
|
18
|
+
predicate :entity,
|
|
19
|
+
namespace: SduSmart::Rdf::Namespaces::ProvNamespace,
|
|
20
|
+
to: :entity
|
|
21
|
+
|
|
22
|
+
predicate :changeNote,
|
|
23
|
+
namespace: Lutaml::Rdf::Namespaces::SkosNamespace,
|
|
24
|
+
to: :change_note
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
data/lib/sdu_smart/entity.rb
CHANGED
|
@@ -5,17 +5,11 @@ module SduSmart
|
|
|
5
5
|
attribute :id, :string
|
|
6
6
|
|
|
7
7
|
rdf do
|
|
8
|
-
namespace SduSmart::Rdf::Namespaces::SmartNamespace
|
|
9
|
-
Lutaml::Rdf::Namespaces::DctermsNamespace,
|
|
10
|
-
Lutaml::Rdf::Namespaces::SkosNamespace
|
|
8
|
+
namespace SduSmart::Rdf::Namespaces::SmartNamespace
|
|
11
9
|
|
|
12
10
|
subject { |m| "https://w3id.org/standards/smart/ontologies/core/#{m.id}" }
|
|
13
11
|
|
|
14
12
|
type "smart:Entity"
|
|
15
|
-
|
|
16
|
-
predicate :title,
|
|
17
|
-
namespace: Lutaml::Rdf::Namespaces::DctermsNamespace,
|
|
18
|
-
to: :id
|
|
19
13
|
end
|
|
20
14
|
end
|
|
21
15
|
end
|
data/lib/sdu_smart/provision.rb
CHANGED
|
@@ -16,10 +16,12 @@ module SduSmart
|
|
|
16
16
|
attribute :publication_component_type, :string
|
|
17
17
|
attribute :is_part_of, :string
|
|
18
18
|
attribute :has_supplement, :string, collection: true
|
|
19
|
+
attribute :distribution, :string, collection: true
|
|
19
20
|
|
|
20
21
|
rdf do
|
|
21
22
|
namespace SduSmart::Rdf::Namespaces::SmartNamespace,
|
|
22
|
-
Lutaml::Rdf::Namespaces::DctermsNamespace
|
|
23
|
+
Lutaml::Rdf::Namespaces::DctermsNamespace,
|
|
24
|
+
SduSmart::Rdf::Namespaces::DcatNamespace
|
|
23
25
|
|
|
24
26
|
subject { |m| "https://w3id.org/standards/smart/ontologies/core/#{m.id}" }
|
|
25
27
|
|
|
@@ -44,6 +46,10 @@ module SduSmart
|
|
|
44
46
|
predicate :hasSupplement,
|
|
45
47
|
namespace: SduSmart::Rdf::Namespaces::SmartNamespace,
|
|
46
48
|
to: :has_supplement
|
|
49
|
+
|
|
50
|
+
predicate :distribution,
|
|
51
|
+
namespace: SduSmart::Rdf::Namespaces::DcatNamespace,
|
|
52
|
+
to: :distribution
|
|
47
53
|
end
|
|
48
54
|
end
|
|
49
55
|
end
|
|
@@ -6,6 +6,9 @@ module SduSmart
|
|
|
6
6
|
autoload :SmartNamespace, "#{__dir__}/namespaces/smart_namespace"
|
|
7
7
|
autoload :OaNamespace, "#{__dir__}/namespaces/oa_namespace"
|
|
8
8
|
autoload :IsoIec80000Namespace, "#{__dir__}/namespaces/isoiec80000_namespace"
|
|
9
|
+
autoload :DcatNamespace, "#{__dir__}/namespaces/dcat_namespace"
|
|
10
|
+
autoload :ProvNamespace, "#{__dir__}/namespaces/prov_namespace"
|
|
11
|
+
autoload :SkosXlNamespace, "#{__dir__}/namespaces/skosxl_namespace"
|
|
9
12
|
end
|
|
10
13
|
end
|
|
11
14
|
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SduSmart
|
|
4
|
+
class Selector < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :value, :string
|
|
7
|
+
|
|
8
|
+
rdf do
|
|
9
|
+
namespace SduSmart::Rdf::Namespaces::SmartNamespace,
|
|
10
|
+
SduSmart::Rdf::Namespaces::OaNamespace,
|
|
11
|
+
Lutaml::Rdf::Namespaces::RdfNamespace
|
|
12
|
+
|
|
13
|
+
subject { |m| "https://w3id.org/standards/smart/ontologies/core/#{m.id}" }
|
|
14
|
+
|
|
15
|
+
type "oa:Selector"
|
|
16
|
+
|
|
17
|
+
predicate :value,
|
|
18
|
+
namespace: Lutaml::Rdf::Namespaces::RdfNamespace,
|
|
19
|
+
to: :value
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SduSmart
|
|
4
|
+
class SpecificResource < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :has_source, :string
|
|
7
|
+
attribute :has_selector, :string
|
|
8
|
+
attribute :is_successor_of, :string
|
|
9
|
+
attribute :value, :string
|
|
10
|
+
attribute :format, :string
|
|
11
|
+
|
|
12
|
+
rdf do
|
|
13
|
+
namespace SduSmart::Rdf::Namespaces::SmartNamespace,
|
|
14
|
+
SduSmart::Rdf::Namespaces::OaNamespace,
|
|
15
|
+
Lutaml::Rdf::Namespaces::DctermsNamespace,
|
|
16
|
+
Lutaml::Rdf::Namespaces::RdfNamespace
|
|
17
|
+
|
|
18
|
+
subject { |m| "https://w3id.org/standards/smart/ontologies/core/#{m.id}" }
|
|
19
|
+
|
|
20
|
+
type "oa:SpecificResource"
|
|
21
|
+
|
|
22
|
+
predicate :hasSource,
|
|
23
|
+
namespace: SduSmart::Rdf::Namespaces::OaNamespace,
|
|
24
|
+
to: :has_source
|
|
25
|
+
|
|
26
|
+
predicate :hasSelector,
|
|
27
|
+
namespace: SduSmart::Rdf::Namespaces::OaNamespace,
|
|
28
|
+
to: :has_selector
|
|
29
|
+
|
|
30
|
+
predicate :isSuccessorOf,
|
|
31
|
+
namespace: SduSmart::Rdf::Namespaces::SmartNamespace,
|
|
32
|
+
to: :is_successor_of
|
|
33
|
+
|
|
34
|
+
predicate :value,
|
|
35
|
+
namespace: Lutaml::Rdf::Namespaces::RdfNamespace,
|
|
36
|
+
to: :value
|
|
37
|
+
|
|
38
|
+
predicate :format,
|
|
39
|
+
namespace: Lutaml::Rdf::Namespaces::DctermsNamespace,
|
|
40
|
+
to: :format
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -2,23 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
module SduSmart
|
|
4
4
|
module Taxonomy
|
|
5
|
-
class BindingnessType <
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
rdf do
|
|
11
|
-
namespace SduSmart::Rdf::Namespaces::SmartNamespace,
|
|
12
|
-
Lutaml::Rdf::Namespaces::SkosNamespace
|
|
13
|
-
|
|
14
|
-
subject { |m| "https://w3id.org/standards/smart/taxonomies/bindingness-type/#{m.label}" }
|
|
15
|
-
|
|
16
|
-
type "smart:BindingnessType"
|
|
17
|
-
|
|
18
|
-
predicate :prefLabel,
|
|
19
|
-
namespace: Lutaml::Rdf::Namespaces::SkosNamespace,
|
|
20
|
-
to: :label
|
|
21
|
-
end
|
|
5
|
+
class BindingnessType < Concept
|
|
6
|
+
taxonomy "BindingnessType",
|
|
7
|
+
values: %w[normative informative],
|
|
8
|
+
subject_path: "bindingness-type"
|
|
22
9
|
end
|
|
23
10
|
end
|
|
24
11
|
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SduSmart
|
|
4
|
+
module Taxonomy
|
|
5
|
+
class Concept < Lutaml::Model::Serializable
|
|
6
|
+
attribute :label, :string
|
|
7
|
+
|
|
8
|
+
class << self
|
|
9
|
+
def taxonomy(rdf_type, values:, subject_path:)
|
|
10
|
+
const_set(:VALUES, values.freeze)
|
|
11
|
+
|
|
12
|
+
rdf do
|
|
13
|
+
namespace SduSmart::Rdf::Namespaces::SmartNamespace,
|
|
14
|
+
Lutaml::Rdf::Namespaces::SkosNamespace
|
|
15
|
+
|
|
16
|
+
subject { |m| "https://w3id.org/standards/smart/taxonomies/#{subject_path}/#{m.label}" }
|
|
17
|
+
|
|
18
|
+
type "smart:#{rdf_type}"
|
|
19
|
+
|
|
20
|
+
predicate :prefLabel,
|
|
21
|
+
namespace: Lutaml::Rdf::Namespaces::SkosNamespace,
|
|
22
|
+
to: :label
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def fetch(label)
|
|
27
|
+
unless self::VALUES.include?(label)
|
|
28
|
+
raise ArgumentError, "#{name}: invalid value '#{label}'. Valid: #{self::VALUES.join(', ')}"
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
new(label: label)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -2,23 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
module SduSmart
|
|
4
4
|
module Taxonomy
|
|
5
|
-
class PartOfSpeechType <
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
rdf do
|
|
11
|
-
namespace SduSmart::Rdf::Namespaces::SmartNamespace,
|
|
12
|
-
Lutaml::Rdf::Namespaces::SkosNamespace
|
|
13
|
-
|
|
14
|
-
subject { |m| "https://w3id.org/standards/smart/taxonomies/part-of-speech-type/#{m.label}" }
|
|
15
|
-
|
|
16
|
-
type "smart:PartOfSpeechType"
|
|
17
|
-
|
|
18
|
-
predicate :prefLabel,
|
|
19
|
-
namespace: Lutaml::Rdf::Namespaces::SkosNamespace,
|
|
20
|
-
to: :label
|
|
21
|
-
end
|
|
5
|
+
class PartOfSpeechType < Concept
|
|
6
|
+
taxonomy "PartOfSpeechType",
|
|
7
|
+
values: %w[adjective adverb noun verb],
|
|
8
|
+
subject_path: "part-of-speech-type"
|
|
22
9
|
end
|
|
23
10
|
end
|
|
24
11
|
end
|
|
@@ -2,23 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
module SduSmart
|
|
4
4
|
module Taxonomy
|
|
5
|
-
class ProvisionSupplementType <
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
rdf do
|
|
11
|
-
namespace SduSmart::Rdf::Namespaces::SmartNamespace,
|
|
12
|
-
Lutaml::Rdf::Namespaces::SkosNamespace
|
|
13
|
-
|
|
14
|
-
subject { |m| "https://w3id.org/standards/smart/taxonomies/provision-supplement-type/#{m.label}" }
|
|
15
|
-
|
|
16
|
-
type "smart:ProvisionSupplementType"
|
|
17
|
-
|
|
18
|
-
predicate :prefLabel,
|
|
19
|
-
namespace: Lutaml::Rdf::Namespaces::SkosNamespace,
|
|
20
|
-
to: :label
|
|
21
|
-
end
|
|
5
|
+
class ProvisionSupplementType < Concept
|
|
6
|
+
taxonomy "ProvisionSupplementType",
|
|
7
|
+
values: %w[example footnote note],
|
|
8
|
+
subject_path: "provision-supplement-type"
|
|
22
9
|
end
|
|
23
10
|
end
|
|
24
11
|
end
|
|
@@ -2,23 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
module SduSmart
|
|
4
4
|
module Taxonomy
|
|
5
|
-
class ProvisionType <
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
rdf do
|
|
11
|
-
namespace SduSmart::Rdf::Namespaces::SmartNamespace,
|
|
12
|
-
Lutaml::Rdf::Namespaces::SkosNamespace
|
|
13
|
-
|
|
14
|
-
subject { |m| "https://w3id.org/standards/smart/taxonomies/provision-type/#{m.label}" }
|
|
15
|
-
|
|
16
|
-
type "smart:ProvisionType"
|
|
17
|
-
|
|
18
|
-
predicate :prefLabel,
|
|
19
|
-
namespace: Lutaml::Rdf::Namespaces::SkosNamespace,
|
|
20
|
-
to: :label
|
|
21
|
-
end
|
|
5
|
+
class ProvisionType < Concept
|
|
6
|
+
taxonomy "ProvisionType",
|
|
7
|
+
values: %w[governingProvision assertionalProvision],
|
|
8
|
+
subject_path: "provision-type"
|
|
22
9
|
end
|
|
23
10
|
end
|
|
24
11
|
end
|
|
@@ -2,23 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
module SduSmart
|
|
4
4
|
module Taxonomy
|
|
5
|
-
class PublicationComponentType <
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
rdf do
|
|
11
|
-
namespace SduSmart::Rdf::Namespaces::SmartNamespace,
|
|
12
|
-
Lutaml::Rdf::Namespaces::SkosNamespace
|
|
13
|
-
|
|
14
|
-
subject { |m| "https://w3id.org/standards/smart/taxonomies/publication-component-type/#{m.label}" }
|
|
15
|
-
|
|
16
|
-
type "smart:PublicationComponentType"
|
|
17
|
-
|
|
18
|
-
predicate :prefLabel,
|
|
19
|
-
namespace: Lutaml::Rdf::Namespaces::SkosNamespace,
|
|
20
|
-
to: :label
|
|
21
|
-
end
|
|
5
|
+
class PublicationComponentType < Concept
|
|
6
|
+
taxonomy "PublicationComponentType",
|
|
7
|
+
values: %w[code figure mathematicalFormula table textual],
|
|
8
|
+
subject_path: "publication-component-type"
|
|
22
9
|
end
|
|
23
10
|
end
|
|
24
11
|
end
|
|
@@ -2,27 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
module SduSmart
|
|
4
4
|
module Taxonomy
|
|
5
|
-
class PublicationDocumentType <
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
rdf do
|
|
15
|
-
namespace SduSmart::Rdf::Namespaces::SmartNamespace,
|
|
16
|
-
Lutaml::Rdf::Namespaces::SkosNamespace
|
|
17
|
-
|
|
18
|
-
subject { |m| "https://w3id.org/standards/smart/taxonomies/publication-type/#{m.label}" }
|
|
19
|
-
|
|
20
|
-
type "smart:PublicationDocumentType"
|
|
21
|
-
|
|
22
|
-
predicate :prefLabel,
|
|
23
|
-
namespace: Lutaml::Rdf::Namespaces::SkosNamespace,
|
|
24
|
-
to: :label
|
|
25
|
-
end
|
|
5
|
+
class PublicationDocumentType < Concept
|
|
6
|
+
taxonomy "PublicationDocumentType",
|
|
7
|
+
values: %w[
|
|
8
|
+
guide publiclyAvailableSpecification technicalReport
|
|
9
|
+
technicalSpecification normativeDocument standard
|
|
10
|
+
internationalStandard
|
|
11
|
+
],
|
|
12
|
+
subject_path: "publication-type"
|
|
26
13
|
end
|
|
27
14
|
end
|
|
28
15
|
end
|
|
@@ -2,23 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
module SduSmart
|
|
4
4
|
module Taxonomy
|
|
5
|
-
class TermFormType <
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
rdf do
|
|
11
|
-
namespace SduSmart::Rdf::Namespaces::SmartNamespace,
|
|
12
|
-
Lutaml::Rdf::Namespaces::SkosNamespace
|
|
13
|
-
|
|
14
|
-
subject { |m| "https://w3id.org/standards/smart/taxonomies/term-form-type/#{m.label}" }
|
|
15
|
-
|
|
16
|
-
type "smart:TermFormType"
|
|
17
|
-
|
|
18
|
-
predicate :prefLabel,
|
|
19
|
-
namespace: Lutaml::Rdf::Namespaces::SkosNamespace,
|
|
20
|
-
to: :label
|
|
21
|
-
end
|
|
5
|
+
class TermFormType < Concept
|
|
6
|
+
taxonomy "TermFormType",
|
|
7
|
+
values: %w[abbreviation acronym equation formula fullForm symbol variant],
|
|
8
|
+
subject_path: "term-form-type"
|
|
22
9
|
end
|
|
23
10
|
end
|
|
24
11
|
end
|
data/lib/sdu_smart/taxonomy.rb
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module SduSmart
|
|
4
4
|
module Taxonomy
|
|
5
|
+
autoload :Concept, "#{__dir__}/taxonomy/concept"
|
|
5
6
|
autoload :BindingnessType, "#{__dir__}/taxonomy/bindingness_type"
|
|
6
7
|
autoload :ProvisionType, "#{__dir__}/taxonomy/provision_type"
|
|
7
8
|
autoload :PublicationComponentType, "#{__dir__}/taxonomy/publication_component_type"
|
data/lib/sdu_smart/term.rb
CHANGED
|
@@ -3,16 +3,18 @@
|
|
|
3
3
|
module SduSmart
|
|
4
4
|
class Term < Entity
|
|
5
5
|
attribute :pronunciation, :string
|
|
6
|
-
attribute :used_in_country, :string
|
|
6
|
+
attribute :used_in_country, :string, collection: true
|
|
7
7
|
attribute :part_of_speech_type, :string
|
|
8
8
|
attribute :term_form_type, :string
|
|
9
|
+
attribute :literal_form, :string
|
|
9
10
|
|
|
10
11
|
rdf do
|
|
11
|
-
namespace SduSmart::Rdf::Namespaces::SmartNamespace
|
|
12
|
+
namespace SduSmart::Rdf::Namespaces::SmartNamespace,
|
|
13
|
+
SduSmart::Rdf::Namespaces::SkosXlNamespace
|
|
12
14
|
|
|
13
15
|
subject { |m| "https://w3id.org/standards/smart/ontologies/core/#{m.id}" }
|
|
14
16
|
|
|
15
|
-
type "smart:Term"
|
|
17
|
+
type ["smart:Term", "skosxl:Label"]
|
|
16
18
|
|
|
17
19
|
predicate :pronunciation,
|
|
18
20
|
namespace: SduSmart::Rdf::Namespaces::SmartNamespace,
|
|
@@ -24,11 +26,18 @@ module SduSmart
|
|
|
24
26
|
|
|
25
27
|
predicate :hasPartOfSpeechType,
|
|
26
28
|
namespace: SduSmart::Rdf::Namespaces::SmartNamespace,
|
|
27
|
-
to: :part_of_speech_type
|
|
29
|
+
to: :part_of_speech_type,
|
|
30
|
+
uri_reference: true
|
|
28
31
|
|
|
29
32
|
predicate :hasTermFormType,
|
|
30
33
|
namespace: SduSmart::Rdf::Namespaces::SmartNamespace,
|
|
31
|
-
to: :term_form_type
|
|
34
|
+
to: :term_form_type,
|
|
35
|
+
uri_reference: true
|
|
36
|
+
|
|
37
|
+
predicate :literalForm,
|
|
38
|
+
namespace: SduSmart::Rdf::Namespaces::SkosXlNamespace,
|
|
39
|
+
to: :literal_form,
|
|
40
|
+
lang_tagged: true
|
|
32
41
|
end
|
|
33
42
|
end
|
|
34
43
|
end
|
data/lib/sdu_smart/term_entry.rb
CHANGED
|
@@ -4,10 +4,20 @@ module SduSmart
|
|
|
4
4
|
class TermEntry < Entity
|
|
5
5
|
attribute :bindingness_type, :string
|
|
6
6
|
attribute :is_part_of, :string
|
|
7
|
+
attribute :definition, :string
|
|
8
|
+
attribute :identifier, :string
|
|
9
|
+
attribute :scope_note, :string
|
|
10
|
+
attribute :deprecated_label, :string, collection: true
|
|
11
|
+
attribute :pref_label, :string, collection: true
|
|
12
|
+
attribute :alt_label, :string, collection: true
|
|
13
|
+
attribute :qualified_derivation, :string, collection: true
|
|
7
14
|
|
|
8
15
|
rdf do
|
|
9
16
|
namespace SduSmart::Rdf::Namespaces::SmartNamespace,
|
|
10
|
-
Lutaml::Rdf::Namespaces::DctermsNamespace
|
|
17
|
+
Lutaml::Rdf::Namespaces::DctermsNamespace,
|
|
18
|
+
Lutaml::Rdf::Namespaces::SkosNamespace,
|
|
19
|
+
SduSmart::Rdf::Namespaces::SkosXlNamespace,
|
|
20
|
+
SduSmart::Rdf::Namespaces::ProvNamespace
|
|
11
21
|
|
|
12
22
|
subject { |m| "https://w3id.org/standards/smart/ontologies/core/#{m.id}" }
|
|
13
23
|
|
|
@@ -20,6 +30,40 @@ module SduSmart
|
|
|
20
30
|
predicate :isPartOf,
|
|
21
31
|
namespace: Lutaml::Rdf::Namespaces::DctermsNamespace,
|
|
22
32
|
to: :is_part_of
|
|
33
|
+
|
|
34
|
+
predicate :definition,
|
|
35
|
+
namespace: Lutaml::Rdf::Namespaces::SkosNamespace,
|
|
36
|
+
to: :definition,
|
|
37
|
+
lang_tagged: true
|
|
38
|
+
|
|
39
|
+
predicate :identifier,
|
|
40
|
+
namespace: Lutaml::Rdf::Namespaces::DctermsNamespace,
|
|
41
|
+
to: :identifier
|
|
42
|
+
|
|
43
|
+
predicate :scopeNote,
|
|
44
|
+
namespace: Lutaml::Rdf::Namespaces::SkosNamespace,
|
|
45
|
+
to: :scope_note,
|
|
46
|
+
lang_tagged: true
|
|
47
|
+
|
|
48
|
+
predicate :deprecatedLabel,
|
|
49
|
+
namespace: SduSmart::Rdf::Namespaces::SmartNamespace,
|
|
50
|
+
to: :deprecated_label,
|
|
51
|
+
uri_reference: true
|
|
52
|
+
|
|
53
|
+
predicate :prefLabel,
|
|
54
|
+
namespace: SduSmart::Rdf::Namespaces::SkosXlNamespace,
|
|
55
|
+
to: :pref_label,
|
|
56
|
+
uri_reference: true
|
|
57
|
+
|
|
58
|
+
predicate :altLabel,
|
|
59
|
+
namespace: SduSmart::Rdf::Namespaces::SkosXlNamespace,
|
|
60
|
+
to: :alt_label,
|
|
61
|
+
uri_reference: true
|
|
62
|
+
|
|
63
|
+
predicate :qualifiedDerivation,
|
|
64
|
+
namespace: SduSmart::Rdf::Namespaces::ProvNamespace,
|
|
65
|
+
to: :qualified_derivation,
|
|
66
|
+
uri_reference: true
|
|
23
67
|
end
|
|
24
68
|
end
|
|
25
69
|
end
|
data/lib/sdu_smart/version.rb
CHANGED
data/lib/sdu_smart.rb
CHANGED
|
@@ -18,6 +18,10 @@ module SduSmart
|
|
|
18
18
|
autoload :Term, "#{__dir__}/sdu_smart/term"
|
|
19
19
|
autoload :TermEntry, "#{__dir__}/sdu_smart/term_entry"
|
|
20
20
|
autoload :PublicationDocument, "#{__dir__}/sdu_smart/publication_document"
|
|
21
|
+
autoload :Annotation, "#{__dir__}/sdu_smart/annotation"
|
|
22
|
+
autoload :SpecificResource, "#{__dir__}/sdu_smart/specific_resource"
|
|
23
|
+
autoload :Selector, "#{__dir__}/sdu_smart/selector"
|
|
24
|
+
autoload :Derivation, "#{__dir__}/sdu_smart/derivation"
|
|
21
25
|
autoload :Taxonomy, "#{__dir__}/sdu_smart/taxonomy"
|
|
22
26
|
autoload :Rdf, "#{__dir__}/sdu_smart/rdf"
|
|
23
27
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sdu_smart
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose
|
|
@@ -36,7 +36,9 @@ files:
|
|
|
36
36
|
- lib/sdu_smart.rb
|
|
37
37
|
- lib/sdu_smart/activity.rb
|
|
38
38
|
- lib/sdu_smart/agent.rb
|
|
39
|
+
- lib/sdu_smart/annotation.rb
|
|
39
40
|
- lib/sdu_smart/clause.rb
|
|
41
|
+
- lib/sdu_smart/derivation.rb
|
|
40
42
|
- lib/sdu_smart/entity.rb
|
|
41
43
|
- lib/sdu_smart/organization.rb
|
|
42
44
|
- lib/sdu_smart/provision.rb
|
|
@@ -53,11 +55,17 @@ files:
|
|
|
53
55
|
- lib/sdu_smart/publication_document.rb
|
|
54
56
|
- lib/sdu_smart/rdf.rb
|
|
55
57
|
- lib/sdu_smart/rdf/namespaces.rb
|
|
58
|
+
- lib/sdu_smart/rdf/namespaces/dcat_namespace.rb
|
|
56
59
|
- lib/sdu_smart/rdf/namespaces/isoiec80000_namespace.rb
|
|
57
60
|
- lib/sdu_smart/rdf/namespaces/oa_namespace.rb
|
|
61
|
+
- lib/sdu_smart/rdf/namespaces/prov_namespace.rb
|
|
62
|
+
- lib/sdu_smart/rdf/namespaces/skosxl_namespace.rb
|
|
58
63
|
- lib/sdu_smart/rdf/namespaces/smart_namespace.rb
|
|
64
|
+
- lib/sdu_smart/selector.rb
|
|
65
|
+
- lib/sdu_smart/specific_resource.rb
|
|
59
66
|
- lib/sdu_smart/taxonomy.rb
|
|
60
67
|
- lib/sdu_smart/taxonomy/bindingness_type.rb
|
|
68
|
+
- lib/sdu_smart/taxonomy/concept.rb
|
|
61
69
|
- lib/sdu_smart/taxonomy/part_of_speech_type.rb
|
|
62
70
|
- lib/sdu_smart/taxonomy/provision_supplement_type.rb
|
|
63
71
|
- lib/sdu_smart/taxonomy/provision_type.rb
|