emp_json 1.2.1.pre.g7126641c2 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -2
- data/Gemfile.lock +1 -3
- data/emp-json-rb.gemspec +1 -4
- data/lib/empathy/emp_json/helpers/primitives.rb +3 -9
- data/lib/empathy/emp_json/helpers/rdf_list.rb +5 -5
- data/lib/empathy/emp_json/helpers/slices.rb +7 -1
- data/lib/empathy/emp_json/serializer/inclusion.rb +1 -1
- data/lib/empathy/emp_json.rb +0 -2
- data/sig/emp/json/rb.rbs +8 -0
- metadata +5 -21
- data/lib/empathy/emp_json/helpers/hash.rb +0 -32
- data/lib/empathy/emp_json/helpers/parsing.rb +0 -46
- data/rbs_collection.lock.yaml +0 -88
- data/rbs_collection.yaml +0 -17
- data/sig/lib/empathy/emp_json/helpers/parsing.rbs +0 -11
- data/sig/lib/empathy/emp_json/helpers/primitives.rbs +0 -70
- data/sig/lib/empathy/emp_json/helpers/rdf_list.rbs +0 -11
- data/sig/lib/empathy/emp_json/helpers/slices.rbs +0 -33
- data/sig/lib/empathy/emp_json/helpers/values.rbs +0 -15
- data/sig/lib/empathy/emp_json/serializer/fields.rbs +0 -23
- data/sig/lib/empathy/emp_json/serializer/inclusion.rbs +0 -19
- data/sig/lib/empathy/emp_json/serializer/records.rbs +0 -11
- data/sig/lib/empathy/emp_json/serializer/sequence.rbs +0 -15
- data/sig/lib/empathy/emp_json/serializer/serializing.rbs +0 -18
- data/sig/lib/empathy/emp_json/serializer.rbs +0 -33
- data/sig/lib/empathy/emp_json.rbs +0 -12
- data/sig/lib/rdf.rbs +0 -261
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65165e2a8b93d1ece00376ef482e89bf60fcf7309cd0df6eff76a1b30a7cd746
|
4
|
+
data.tar.gz: c1f730784a16dcda8f8ae4bb42bc7b92c76d77eeb09a70ebc6139824efd54954
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bb1c8b1992da6a597d8ff1f485b73ab65c3c1c2fe75d799b1b44a8b693baf51f5c8ac74c0bd0a30edfdd8f9ff302fef5ffaf48b6e19df4cffb9c69e2bee9a93
|
7
|
+
data.tar.gz: 4335dfd8d45856ecb616997b97809ad857182b5e8c86f7caf2ab1c0163c685c8475a4efa04e12baf2bf7097a9da9824b9794fe7c7e45353f2a62b1a54098918e
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
emp_json (1.2.1
|
4
|
+
emp_json (1.2.1)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -24,7 +24,6 @@ GEM
|
|
24
24
|
ast (~> 2.4.1)
|
25
25
|
rainbow (3.1.1)
|
26
26
|
rake (13.0.6)
|
27
|
-
rbs (2.6.0)
|
28
27
|
rdf (3.2.7)
|
29
28
|
link_header (~> 0.0, >= 0.0.8)
|
30
29
|
regexp_parser (2.3.1)
|
@@ -56,7 +55,6 @@ DEPENDENCIES
|
|
56
55
|
emp_json!
|
57
56
|
minitest (~> 5.0)
|
58
57
|
rake (~> 13.0)
|
59
|
-
rbs
|
60
58
|
rdf
|
61
59
|
rubocop (~> 1.21)
|
62
60
|
|
data/emp-json-rb.gemspec
CHANGED
@@ -3,11 +3,8 @@
|
|
3
3
|
require_relative "lib/empathy/emp_json/version"
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
|
-
prerelease = ENV.fetch("PUBLISH_PRERELEASE", false)
|
7
|
-
env_version = ENV.fetch("GITHUB_SHA", "")[0..8]
|
8
|
-
|
9
6
|
spec.name = "emp_json"
|
10
|
-
spec.version =
|
7
|
+
spec.version = Empathy::EmpJson::VERSION
|
11
8
|
spec.authors = ["Thom van Kalkeren"]
|
12
9
|
spec.email = ["thom@ontola.io"]
|
13
10
|
|
@@ -6,10 +6,9 @@ module Empathy
|
|
6
6
|
module EmpJson
|
7
7
|
module Helpers
|
8
8
|
# Functions relating to serializing primitives.
|
9
|
-
module Primitives
|
9
|
+
module Primitives
|
10
10
|
EMP_TYPE_GLOBAL_ID = "id"
|
11
11
|
EMP_TYPE_LOCAL_ID = "lid"
|
12
|
-
EMP_TYPE_DATE = "date"
|
13
12
|
EMP_TYPE_DATETIME = "dt"
|
14
13
|
EMP_TYPE_STRING = "s"
|
15
14
|
EMP_TYPE_BOOL = "b"
|
@@ -24,7 +23,6 @@ module Empathy
|
|
24
23
|
RDF_XSD = "http://www.w3.org/2001/XMLSchema#"
|
25
24
|
RDF_XSD_TOKEN = "#{RDF_XSD}token"
|
26
25
|
RDF_XSD_STRING = "#{RDF_XSD}string"
|
27
|
-
RDF_XSD_DATE = "#{RDF_XSD}date"
|
28
26
|
RDF_XSD_DATETIME = "#{RDF_XSD}dateTime"
|
29
27
|
RDF_XSD_BOOLEAN = "#{RDF_XSD}boolean"
|
30
28
|
RDF_XSD_INTEGER = "#{RDF_XSD}integer"
|
@@ -41,7 +39,7 @@ module Empathy
|
|
41
39
|
shorthand(EMP_TYPE_LOCAL_ID, "_:#{value.id}")
|
42
40
|
end
|
43
41
|
|
44
|
-
def primitive_to_value(value) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
42
|
+
def primitive_to_value(value) # rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
45
43
|
throw_unknown_ruby_object(value) if value.nil?
|
46
44
|
|
47
45
|
case value
|
@@ -51,8 +49,6 @@ module Empathy
|
|
51
49
|
shorthand(EMP_TYPE_GLOBAL_ID, value.to_s)
|
52
50
|
when DateTime, ActiveSupport::TimeWithZone
|
53
51
|
shorthand(EMP_TYPE_DATETIME, value.iso8601)
|
54
|
-
when Date
|
55
|
-
shorthand(EMP_TYPE_DATE, value.iso8601)
|
56
52
|
when String, Symbol
|
57
53
|
shorthand(EMP_TYPE_STRING, value.to_s)
|
58
54
|
when true, false
|
@@ -79,7 +75,7 @@ module Empathy
|
|
79
75
|
end
|
80
76
|
end
|
81
77
|
|
82
|
-
def rdf_literal_to_value(value)
|
78
|
+
def rdf_literal_to_value(value)
|
83
79
|
case value.datatype.to_s
|
84
80
|
when RDF_RDFV_LANGSTRING
|
85
81
|
{
|
@@ -89,8 +85,6 @@ module Empathy
|
|
89
85
|
}
|
90
86
|
when RDF_XSD_STRING, RDF_XSD_TOKEN
|
91
87
|
shorthand(EMP_TYPE_STRING, value.value)
|
92
|
-
when RDF_XSD_DATE
|
93
|
-
shorthand(EMP_TYPE_DATE, value.value)
|
94
88
|
when RDF_XSD_DATETIME
|
95
89
|
shorthand(EMP_TYPE_DATETIME, value.value)
|
96
90
|
when RDF_XSD_BOOLEAN
|
@@ -10,18 +10,18 @@ module Empathy
|
|
10
10
|
loop do
|
11
11
|
list_item_to_record(slice, elem, symbolize)
|
12
12
|
|
13
|
-
break if elem.rest_subject ==
|
13
|
+
break if elem.rest_subject == NS.rdfv.nil
|
14
14
|
|
15
15
|
elem = elem.rest
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
def list_item_to_record(slice, elem, symbolize)
|
19
|
+
def list_item_to_record(slice, elem, symbolize) # rubocop:disable Metrics/AbcSize
|
20
20
|
rid = add_record_to_slice(slice, elem)
|
21
|
-
add_attribute_to_record(slice, rid,
|
21
|
+
add_attribute_to_record(slice, rid, NS.rdfv.type, NS.rdfv.List, symbolize)
|
22
22
|
first = elem.first.is_a?(RDF::Term) ? elem.first : retrieve_id(elem.first)
|
23
|
-
add_attribute_to_record(slice, rid,
|
24
|
-
add_attribute_to_record(slice, rid,
|
23
|
+
add_attribute_to_record(slice, rid, NS.rdfv.first, first, symbolize)
|
24
|
+
add_attribute_to_record(slice, rid, NS.rdfv.rest, elem.rest_subject, symbolize)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
@@ -56,7 +56,7 @@ module Empathy
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def retrieve_id(resource)
|
59
|
-
return resource.to_s if resource.is_a?(URI) || resource.is_a?(RDF::URI)
|
59
|
+
return resource.to_s if resource.is_a?(URI) || resource.is_a?(RDF::URI)
|
60
60
|
|
61
61
|
resource.try(:iri) || resource.try(:subject) || resource.try(:id) || resource
|
62
62
|
end
|
@@ -71,6 +71,12 @@ module Empathy
|
|
71
71
|
values.is_a?(Array) ? values.map(&:with_indifferent_access) : values&.with_indifferent_access
|
72
72
|
end
|
73
73
|
|
74
|
+
def expand(slice, website_iri = current_tenant)
|
75
|
+
return slice unless website_iri.present?
|
76
|
+
|
77
|
+
slice.transform_keys { |k| k.start_with?("/") ? website_iri + k : k }
|
78
|
+
end
|
79
|
+
|
74
80
|
def field_to_symbol(uri)
|
75
81
|
(uri.fragment || uri.path.split("/").last).camelize(:lower)
|
76
82
|
end
|
@@ -11,7 +11,7 @@ module Empathy
|
|
11
11
|
when LinkedRails::Sequence
|
12
12
|
collect_sequence_and_members(nested_resources, slice, resource, value, serialization_params)
|
13
13
|
when RDF::List
|
14
|
-
nested_resources.push value unless value.subject ==
|
14
|
+
nested_resources.push value unless value.subject == NS.rdfv.nil
|
15
15
|
when Array
|
16
16
|
collect_array_members(nested_resources, slice, resource, value, serialization_params)
|
17
17
|
else
|
data/lib/empathy/emp_json.rb
CHANGED
@@ -4,8 +4,6 @@ require "empathy/emp_json/helpers/primitives"
|
|
4
4
|
require "empathy/emp_json/helpers/rdf_list"
|
5
5
|
require "empathy/emp_json/helpers/slices"
|
6
6
|
require "empathy/emp_json/helpers/values"
|
7
|
-
require "empathy/emp_json/helpers/parsing"
|
8
|
-
require "empathy/emp_json/helpers/hash"
|
9
7
|
require "empathy/emp_json/serializer"
|
10
8
|
|
11
9
|
module Empathy
|
data/sig/emp/json/rb.rbs
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: emp_json
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.1
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thom van Kalkeren
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Serializer for the EmpJson specification.
|
14
14
|
email:
|
@@ -27,8 +27,6 @@ files:
|
|
27
27
|
- Rakefile
|
28
28
|
- emp-json-rb.gemspec
|
29
29
|
- lib/empathy/emp_json.rb
|
30
|
-
- lib/empathy/emp_json/helpers/hash.rb
|
31
|
-
- lib/empathy/emp_json/helpers/parsing.rb
|
32
30
|
- lib/empathy/emp_json/helpers/primitives.rb
|
33
31
|
- lib/empathy/emp_json/helpers/rdf_list.rb
|
34
32
|
- lib/empathy/emp_json/helpers/slices.rb
|
@@ -40,21 +38,7 @@ files:
|
|
40
38
|
- lib/empathy/emp_json/serializer/sequence.rb
|
41
39
|
- lib/empathy/emp_json/serializer/serializing.rb
|
42
40
|
- lib/empathy/emp_json/version.rb
|
43
|
-
-
|
44
|
-
- rbs_collection.yaml
|
45
|
-
- sig/lib/empathy/emp_json.rbs
|
46
|
-
- sig/lib/empathy/emp_json/helpers/parsing.rbs
|
47
|
-
- sig/lib/empathy/emp_json/helpers/primitives.rbs
|
48
|
-
- sig/lib/empathy/emp_json/helpers/rdf_list.rbs
|
49
|
-
- sig/lib/empathy/emp_json/helpers/slices.rbs
|
50
|
-
- sig/lib/empathy/emp_json/helpers/values.rbs
|
51
|
-
- sig/lib/empathy/emp_json/serializer.rbs
|
52
|
-
- sig/lib/empathy/emp_json/serializer/fields.rbs
|
53
|
-
- sig/lib/empathy/emp_json/serializer/inclusion.rbs
|
54
|
-
- sig/lib/empathy/emp_json/serializer/records.rbs
|
55
|
-
- sig/lib/empathy/emp_json/serializer/sequence.rbs
|
56
|
-
- sig/lib/empathy/emp_json/serializer/serializing.rbs
|
57
|
-
- sig/lib/rdf.rbs
|
41
|
+
- sig/emp/json/rb.rbs
|
58
42
|
homepage: https://empathy.tools/tools/emp-json
|
59
43
|
licenses:
|
60
44
|
- MIT
|
@@ -75,9 +59,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
75
59
|
version: 2.7.0.preview1
|
76
60
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
77
61
|
requirements:
|
78
|
-
- - "
|
62
|
+
- - ">="
|
79
63
|
- !ruby/object:Gem::Version
|
80
|
-
version:
|
64
|
+
version: '0'
|
81
65
|
requirements: []
|
82
66
|
rubygems_version: 3.3.7
|
83
67
|
signing_key:
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# Adds to_emp_json to Hash
|
4
|
-
class Hash
|
5
|
-
# Converts hash to emp_json
|
6
|
-
class EmpConverter
|
7
|
-
extend Empathy::EmpJson::Helpers::Primitives
|
8
|
-
|
9
|
-
class << self
|
10
|
-
def convert(hash)
|
11
|
-
hash.each_with_object({}) do |(key, value), slice|
|
12
|
-
slice[key.to_s] = value.transform_keys(&:to_s).transform_values do |v|
|
13
|
-
case v
|
14
|
-
when Hash
|
15
|
-
v
|
16
|
-
when Array
|
17
|
-
v.map(&method(:object_to_value))
|
18
|
-
else
|
19
|
-
object_to_value(v)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
slice[key.to_s]["_id"] = object_to_value(key)
|
23
|
-
slice
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
def to_emp_json
|
30
|
-
EmpConverter.convert(self)
|
31
|
-
end
|
32
|
-
end
|
@@ -1,46 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Empathy
|
4
|
-
module EmpJson
|
5
|
-
module Helpers
|
6
|
-
# Functions relating to parsing emp_json.
|
7
|
-
module Parsing
|
8
|
-
include Primitives
|
9
|
-
|
10
|
-
def emp_to_primitive(emp_value) # rubocop:disable Metrics/MethodLength
|
11
|
-
type = emp_value.with_indifferent_access[:type]
|
12
|
-
value = emp_value.with_indifferent_access[:v]
|
13
|
-
|
14
|
-
case type
|
15
|
-
when EMP_TYPE_GLOBAL_ID
|
16
|
-
RDF::URI(value)
|
17
|
-
when EMP_TYPE_LOCAL_ID
|
18
|
-
RDF::Node(value.split(":").last)
|
19
|
-
when EMP_TYPE_DATE
|
20
|
-
Date.iso8601(value)
|
21
|
-
when EMP_TYPE_DATETIME
|
22
|
-
Time.iso8601(value)
|
23
|
-
when EMP_TYPE_BOOL
|
24
|
-
value == "true"
|
25
|
-
when EMP_TYPE_INTEGER, EMP_TYPE_LONG
|
26
|
-
value.to_i
|
27
|
-
when EMP_TYPE_PRIMITIVE
|
28
|
-
use_rdf_rb_for_parsing(value, emp_value[:dt])
|
29
|
-
when EMP_TYPE_STRING, EMP_TYPE_LANGSTRING
|
30
|
-
value
|
31
|
-
else
|
32
|
-
throw_unknown_emp_type(type, value)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
def use_rdf_rb_for_parsing(value, datatype)
|
37
|
-
RDF::Literal(value, datatype: datatype).object
|
38
|
-
end
|
39
|
-
|
40
|
-
def throw_unknown_emp_type(type, value)
|
41
|
-
throw "unknown emp type: #{type} (#{value})"
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
data/rbs_collection.lock.yaml
DELETED
@@ -1,88 +0,0 @@
|
|
1
|
-
---
|
2
|
-
sources:
|
3
|
-
- name: ruby/gem_rbs_collection
|
4
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
5
|
-
revision: main
|
6
|
-
repo_dir: gems
|
7
|
-
path: ".gem_rbs_collection"
|
8
|
-
gems:
|
9
|
-
- name: activemodel
|
10
|
-
version: '6.0'
|
11
|
-
source:
|
12
|
-
type: git
|
13
|
-
name: ruby/gem_rbs_collection
|
14
|
-
revision: e59b7d94d326a1ac66c6bce8cb82cbabf1734726
|
15
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
16
|
-
repo_dir: gems
|
17
|
-
- name: activesupport
|
18
|
-
version: '6.0'
|
19
|
-
source:
|
20
|
-
type: git
|
21
|
-
name: ruby/gem_rbs_collection
|
22
|
-
revision: e59b7d94d326a1ac66c6bce8cb82cbabf1734726
|
23
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
24
|
-
repo_dir: gems
|
25
|
-
- name: ast
|
26
|
-
version: '2.4'
|
27
|
-
source:
|
28
|
-
type: git
|
29
|
-
name: ruby/gem_rbs_collection
|
30
|
-
revision: e59b7d94d326a1ac66c6bce8cb82cbabf1734726
|
31
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
32
|
-
repo_dir: gems
|
33
|
-
- name: i18n
|
34
|
-
version: '1.10'
|
35
|
-
source:
|
36
|
-
type: git
|
37
|
-
name: ruby/gem_rbs_collection
|
38
|
-
revision: e59b7d94d326a1ac66c6bce8cb82cbabf1734726
|
39
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
40
|
-
repo_dir: gems
|
41
|
-
- name: minitest
|
42
|
-
version: '0'
|
43
|
-
source:
|
44
|
-
type: stdlib
|
45
|
-
- name: parallel
|
46
|
-
version: '1.20'
|
47
|
-
source:
|
48
|
-
type: git
|
49
|
-
name: ruby/gem_rbs_collection
|
50
|
-
revision: e59b7d94d326a1ac66c6bce8cb82cbabf1734726
|
51
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
52
|
-
repo_dir: gems
|
53
|
-
- name: rainbow
|
54
|
-
version: '3.0'
|
55
|
-
source:
|
56
|
-
type: git
|
57
|
-
name: ruby/gem_rbs_collection
|
58
|
-
revision: e59b7d94d326a1ac66c6bce8cb82cbabf1734726
|
59
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
60
|
-
repo_dir: gems
|
61
|
-
- name: monitor
|
62
|
-
version: '0'
|
63
|
-
source:
|
64
|
-
type: stdlib
|
65
|
-
- name: date
|
66
|
-
version: '0'
|
67
|
-
source:
|
68
|
-
type: stdlib
|
69
|
-
- name: singleton
|
70
|
-
version: '0'
|
71
|
-
source:
|
72
|
-
type: stdlib
|
73
|
-
- name: logger
|
74
|
-
version: '0'
|
75
|
-
source:
|
76
|
-
type: stdlib
|
77
|
-
- name: mutex_m
|
78
|
-
version: '0'
|
79
|
-
source:
|
80
|
-
type: stdlib
|
81
|
-
- name: time
|
82
|
-
version: '0'
|
83
|
-
source:
|
84
|
-
type: stdlib
|
85
|
-
- name: pathname
|
86
|
-
version: '0'
|
87
|
-
source:
|
88
|
-
type: stdlib
|
data/rbs_collection.yaml
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# Download sources
|
2
|
-
sources:
|
3
|
-
- name: ruby/gem_rbs_collection
|
4
|
-
remote: https://github.com/ruby/gem_rbs_collection.git
|
5
|
-
revision: main
|
6
|
-
repo_dir: gems
|
7
|
-
|
8
|
-
# A directory to install the downloaded RBSs
|
9
|
-
path: .gem_rbs_collection
|
10
|
-
|
11
|
-
gems:
|
12
|
-
# Skip loading rbs gem's RBS.
|
13
|
-
# It's unnecessary if you don't use rbs as a library.
|
14
|
-
- name: rbs
|
15
|
-
ignore: true
|
16
|
-
- name: emp_json
|
17
|
-
ignore: true
|
@@ -1,11 +0,0 @@
|
|
1
|
-
module Empathy
|
2
|
-
module EmpJson
|
3
|
-
module Helpers
|
4
|
-
module Parsing
|
5
|
-
def emp_to_primitive: (Primitives::shorthand | Primitives::primitive emp_value) -> (RDF::URI | RDF::Node | RDF::Literal | Date | Time | bool | Numeric | String)
|
6
|
-
|
7
|
-
def use_rdf_rb_for_parsing: (string value, string datatype) -> untyped
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
@@ -1,70 +0,0 @@
|
|
1
|
-
module Empathy
|
2
|
-
module EmpJson
|
3
|
-
module Helpers
|
4
|
-
module Primitives
|
5
|
-
EMP_TYPE_GLOBAL_ID: "id"
|
6
|
-
|
7
|
-
EMP_TYPE_LOCAL_ID: "lid"
|
8
|
-
|
9
|
-
EMP_TYPE_DATE: "date"
|
10
|
-
|
11
|
-
EMP_TYPE_DATETIME: "dt"
|
12
|
-
|
13
|
-
EMP_TYPE_STRING: "s"
|
14
|
-
|
15
|
-
EMP_TYPE_BOOL: "b"
|
16
|
-
|
17
|
-
EMP_TYPE_INTEGER: "i"
|
18
|
-
|
19
|
-
EMP_TYPE_LONG: "l"
|
20
|
-
|
21
|
-
EMP_TYPE_PRIMITIVE: "p"
|
22
|
-
|
23
|
-
EMP_TYPE_LANGSTRING: "ls"
|
24
|
-
|
25
|
-
RDF_RDFV: "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
26
|
-
|
27
|
-
RDF_RDFV_LANGSTRING: "http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"
|
28
|
-
|
29
|
-
RDF_RDFS: "http://www.w3.org/2000/01/rdf-schema#"
|
30
|
-
|
31
|
-
RDF_XSD: "http://www.w3.org/2001/XMLSchema#"
|
32
|
-
|
33
|
-
RDF_XSD_TOKEN: "http://www.w3.org/2001/XMLSchema#token"
|
34
|
-
|
35
|
-
RDF_XSD_STRING: "http://www.w3.org/2001/XMLSchema#string"
|
36
|
-
|
37
|
-
RDF_XSD_DATE: "http://www.w3.org/2001/XMLSchema#date"
|
38
|
-
|
39
|
-
RDF_XSD_DATETIME: "http://www.w3.org/2001/XMLSchema#datetime"
|
40
|
-
|
41
|
-
RDF_XSD_BOOLEAN: "http://www.w3.org/2001/XMLSchema#boolean"
|
42
|
-
|
43
|
-
RDF_XSD_INTEGER: "http://www.w3.org/2001/XMLSchema#integer"
|
44
|
-
|
45
|
-
type shorthand = { type: string, v: string }
|
46
|
-
type primitive = { type: string, dt: string, v: string }
|
47
|
-
|
48
|
-
def serialize_emp: (Hash[untyped, untyped] hash) -> Slices::slice
|
49
|
-
|
50
|
-
def object_to_value: (untyped value) -> shorthand
|
51
|
-
|
52
|
-
def node_to_local_id: (untyped value) -> shorthand
|
53
|
-
|
54
|
-
def primitive_to_value: (untyped value) -> shorthand
|
55
|
-
|
56
|
-
def integer_to_value: (Integer value) -> shorthand
|
57
|
-
|
58
|
-
def rdf_literal_to_value: (untyped value) -> shorthand
|
59
|
-
|
60
|
-
def use_rdf_rb_for_primitive: (untyped value) -> primitive
|
61
|
-
|
62
|
-
def shorthand: (string `type`, string value) -> shorthand
|
63
|
-
|
64
|
-
def primitive: (untyped datatype, untyped value) -> primitive
|
65
|
-
|
66
|
-
def throw_unknown_ruby_object: (untyped value) -> untyped
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
module Empathy
|
2
|
-
module EmpJson
|
3
|
-
module Helpers
|
4
|
-
module RDFList
|
5
|
-
def add_rdf_list_to_slice: (Slices::slice slice, Serializer::symbolize symbolize, **Serializer::Serializing::emp_options options) -> void
|
6
|
-
|
7
|
-
def list_item_to_record: (Slices::slice slice, untyped elem, Serializer::symbolize symbolize) -> void
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
module Empathy
|
2
|
-
module EmpJson
|
3
|
-
module Helpers
|
4
|
-
module Slices
|
5
|
-
type record = Hash[string | Symbol, Primitives::shorthand | Primitives::primitive]
|
6
|
-
type slice = Hash[string | Symbol, record]
|
7
|
-
type id = String | RDF::URI
|
8
|
-
|
9
|
-
def all_values_from_slice: (slice slice, id field, ?untyped? _website_iri) -> untyped
|
10
|
-
|
11
|
-
def add_record_to_slice: (slice slice, untyped resource) -> untyped
|
12
|
-
|
13
|
-
def values_from_slice: (slice slice, untyped id, id field, ?untyped? website_iri) -> untyped
|
14
|
-
|
15
|
-
def field_from_slice: (slice slice, untyped id, id field, ?untyped? website_iri) -> (nil | untyped)
|
16
|
-
|
17
|
-
def record_from_slice: (slice slice, untyped id, ?untyped? website_iri) -> untyped
|
18
|
-
|
19
|
-
def field_from_record: (untyped record, id field) -> untyped
|
20
|
-
|
21
|
-
def retrieve_id: (untyped resource) -> untyped
|
22
|
-
|
23
|
-
def absolutized_id: (untyped id, ?untyped? website_iri) -> untyped
|
24
|
-
|
25
|
-
def normalise_slice_values: (untyped values) -> untyped
|
26
|
-
|
27
|
-
def field_to_symbol: (untyped uri) -> untyped
|
28
|
-
|
29
|
-
def slice_includes_record?: (slice slice, untyped resource) -> untyped
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
module Empathy
|
2
|
-
module EmpJson
|
3
|
-
module Helpers
|
4
|
-
module Values
|
5
|
-
def add_attribute_to_record: (Slices::slice slice, untyped rid, untyped key, untyped value, Serializer::symbolize symbolize) -> (nil | untyped)
|
6
|
-
|
7
|
-
def wrap_relation_in_sequence: (untyped value, untyped resource) -> untyped
|
8
|
-
|
9
|
-
def uri_to_symbol: (untyped uri, Serializer::symbolize symbolize) -> untyped
|
10
|
-
|
11
|
-
def value_to_emp_value: (untyped value) -> untyped
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
module Empathy
|
2
|
-
module EmpJson
|
3
|
-
module Serializer
|
4
|
-
module Fields
|
5
|
-
def serialize_attributes_to_record: (untyped serializer, Helpers::Slices::slice slice, untyped resource, untyped rid, Serializing::serialization_params serialization_params) -> (::Array[untyped] | untyped)
|
6
|
-
|
7
|
-
def serialize_statements: (untyped serializer, Helpers::Slices::slice slice, untyped resource, Serializing::serialization_params serialization_params) -> untyped
|
8
|
-
|
9
|
-
def serialize_relations_to_record: (untyped serializer, Helpers::Slices::slice slice, untyped resource, untyped rid, Serializing::serialization_params serialization_params) -> (::Array[untyped] | untyped)
|
10
|
-
|
11
|
-
def value_for_attribute: (untyped attr, untyped resource, Serializing::serialization_params serialization_params) -> untyped
|
12
|
-
|
13
|
-
def value_for_relation: (untyped relation, untyped resource, Serializing::serialization_params serialization_params) -> (nil | untyped)
|
14
|
-
|
15
|
-
def unpack_relation_value: (untyped relation, untyped resource, Serializing::serialization_params serialization_params) -> untyped
|
16
|
-
|
17
|
-
def unpack_statement: (untyped statement) -> ::Array[untyped]
|
18
|
-
|
19
|
-
def predicate_to_symbol: (untyped attr) -> untyped
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module Empathy
|
2
|
-
module EmpJson
|
3
|
-
module Serializer
|
4
|
-
module Inclusion
|
5
|
-
def collect_nested_resources: (untyped nested_resources, Helpers::Slices::slice slice, untyped resource, untyped value, Serializing::serialization_params serialization_params) -> untyped
|
6
|
-
|
7
|
-
def collect_sequence_and_members: (untyped nested_resources, Helpers::Slices::slice slice, untyped resource, untyped value, Serializing::serialization_params serialization_params) -> untyped
|
8
|
-
|
9
|
-
def collect_array_members: (untyped nested_resources, Helpers::Slices::slice slice, untyped resource, untyped value, Serializing::serialization_params serialization_params) -> untyped
|
10
|
-
|
11
|
-
def blank_value?: (untyped value) -> untyped
|
12
|
-
|
13
|
-
def nested_resource?: (untyped resource, untyped value) -> untyped
|
14
|
-
|
15
|
-
def process_includes: (Helpers::Slices::slice slice, Serializing::serialization_params serialization_params, **Serializer::Serializing::emp_options options) -> untyped
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
module Empathy
|
2
|
-
module EmpJson
|
3
|
-
module Serializer
|
4
|
-
module Records
|
5
|
-
def serialize_record: (Helpers::Slices::slice slice, Serializing::serialization_params serialization_params, **Serializer::Serializing::emp_options options) -> untyped
|
6
|
-
|
7
|
-
def serialize_record_fields: (untyped serializer, Helpers::Slices::slice slice, untyped resource, untyped rid, Serializing::serialization_params serialization_params) -> untyped
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
module Empathy
|
2
|
-
module EmpJson
|
3
|
-
module Serializer
|
4
|
-
module Sequence
|
5
|
-
attr_accessor symbolize: Serializer::symbolize
|
6
|
-
|
7
|
-
def add_sequence_to_slice: (Helpers::Slices::slice slice, Serializing::serialization_params serialization_params, **Serializing::emp_options options) -> untyped
|
8
|
-
|
9
|
-
def process_sequence_members: (untyped serializer, Helpers::Slices::slice slice, untyped resource, untyped rid, Serializing::serialization_params serialization_params, **Serializing::emp_options options) -> untyped
|
10
|
-
|
11
|
-
def process_sequence_member: (untyped member, untyped index, untyped nested, untyped serializer, Helpers::Slices::slice slice, untyped resource, untyped rid, Serializing::serialization_params serialization_params) -> untyped
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module Empathy
|
2
|
-
module EmpJson
|
3
|
-
module Serializer
|
4
|
-
module Serializing
|
5
|
-
type serialization_params = Hash[string, untyped]
|
6
|
-
type emp_options = {includes: untyped?, resource: untyped?, serializer_class: untyped?}
|
7
|
-
|
8
|
-
def render_emp_json: (?untyped resource) -> string
|
9
|
-
|
10
|
-
def emp_json_hash: (?untyped _resource) -> Helpers::Slices::slice
|
11
|
-
|
12
|
-
def create_slice: (untyped resources) -> Helpers::Slices::slice
|
13
|
-
|
14
|
-
def resource_to_emp_json: (Helpers::Slices::slice slice, serialization_params serialization_params, **emp_options options) -> void
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
module Empathy
|
2
|
-
module EmpJson
|
3
|
-
module Serializer
|
4
|
-
# extend ActiveSupport::Concern
|
5
|
-
|
6
|
-
include Helpers::Primitives
|
7
|
-
|
8
|
-
include Helpers::RDFList
|
9
|
-
|
10
|
-
include Helpers::Slices
|
11
|
-
|
12
|
-
include Helpers::Values
|
13
|
-
|
14
|
-
include Fields
|
15
|
-
|
16
|
-
include Inclusion
|
17
|
-
|
18
|
-
include Records
|
19
|
-
|
20
|
-
include Sequence
|
21
|
-
|
22
|
-
include Serializing
|
23
|
-
|
24
|
-
type symbolize = :class | bool
|
25
|
-
|
26
|
-
attr_accessor symbolize: symbolize
|
27
|
-
|
28
|
-
# def initialize: (untyped resource, ?::Hash[untyped, untyped] opts) -> void
|
29
|
-
|
30
|
-
def dump: (*untyped args, **untyped options) -> untyped
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
data/sig/lib/rdf.rbs
DELETED
@@ -1,261 +0,0 @@
|
|
1
|
-
module RDF
|
2
|
-
module Value
|
3
|
-
def graph?: (*untyped args) -> false
|
4
|
-
def statement?: (*untyped args) -> false
|
5
|
-
def list?: -> false
|
6
|
-
def term?: (*untyped args) -> false
|
7
|
-
def resource?: -> false
|
8
|
-
def literal?: -> false
|
9
|
-
def node?: -> false
|
10
|
-
def iri?: -> false
|
11
|
-
def uri?: -> false
|
12
|
-
def variable?: (*untyped args) -> false
|
13
|
-
def constant?: -> true
|
14
|
-
def anonymous?: -> false
|
15
|
-
def valid?: -> true
|
16
|
-
def invalid?: -> bool
|
17
|
-
def validate!: -> Value
|
18
|
-
def start_with?: (String? string) -> bool
|
19
|
-
def canonicalize: -> untyped
|
20
|
-
def canonicalize!: -> Value
|
21
|
-
def to_rdf: -> Value
|
22
|
-
def to_term: -> Term
|
23
|
-
def inspect: -> untyped
|
24
|
-
def inspect!: -> untyped
|
25
|
-
def type_error: (untyped message) -> false
|
26
|
-
end
|
27
|
-
|
28
|
-
module Term
|
29
|
-
include Comparable
|
30
|
-
include Value
|
31
|
-
|
32
|
-
def <=>: (untyped other) -> untyped
|
33
|
-
def ==: (untyped other) -> bool
|
34
|
-
def eql?: (untyped other) -> untyped
|
35
|
-
def term?: (*untyped args) -> bool
|
36
|
-
def to_term: -> Term
|
37
|
-
def terms: -> [Term]
|
38
|
-
def to_base: -> untyped
|
39
|
-
def compatible?: (untyped other) -> false
|
40
|
-
def escape: (string string) -> untyped
|
41
|
-
end
|
42
|
-
|
43
|
-
module Resource
|
44
|
-
include Term
|
45
|
-
|
46
|
-
def self.new: (*untyped args) -> URI
|
47
|
-
def resource?: -> true
|
48
|
-
end
|
49
|
-
|
50
|
-
class Literal
|
51
|
-
TRUE: Literal
|
52
|
-
FALSE: Literal
|
53
|
-
ZERO: Literal
|
54
|
-
|
55
|
-
include RDF::Term
|
56
|
-
|
57
|
-
def self.inherited: (untyped child) -> untyped
|
58
|
-
def self.datatype_map: () -> untyped
|
59
|
-
def self.datatyped_class: (untyped uri) -> untyped
|
60
|
-
def self.new: (untyped value, ?language: untyped?, ?datatype: untyped?, ?lexical: untyped?, ?validate: bool, ?canonicalize: bool, **untyped options) -> untyped
|
61
|
-
|
62
|
-
|
63
|
-
attr_accessor language: untyped
|
64
|
-
attr_accessor datatype: untyped
|
65
|
-
|
66
|
-
def initialize: (untyped value, ?language: untyped?, ?datatype: untyped?, ?lexical: untyped?, ?validate: bool, ?canonicalize: bool, **untyped options) -> void
|
67
|
-
def value: () -> String?
|
68
|
-
def object: () -> untyped
|
69
|
-
def literal?: () -> true
|
70
|
-
def compatible?: (Literal other) -> bool
|
71
|
-
def hash: () -> Integer
|
72
|
-
def value_hash: () -> untyped
|
73
|
-
def freeze: () -> untyped
|
74
|
-
def eql?: (Literal other) -> bool
|
75
|
-
def ==: (Literal other) -> untyped
|
76
|
-
alias === ==
|
77
|
-
def <=>: (Literal other) -> untyped
|
78
|
-
def plain?: () -> bool
|
79
|
-
def simple?: () -> bool
|
80
|
-
def language?: () -> bool
|
81
|
-
alias has_language? language?
|
82
|
-
def datatype?: () -> bool
|
83
|
-
alias has_datatype? datatype?
|
84
|
-
alias typed? datatype?
|
85
|
-
alias datatyped? datatype?
|
86
|
-
def valid?: () -> bool
|
87
|
-
def validate!: () -> self
|
88
|
-
def comperable_datatype?: (Literal other) -> bool
|
89
|
-
def comperable_datatype2?: (Literal other) -> bool
|
90
|
-
def canonicalize!: () -> self
|
91
|
-
def squish: (*untyped other_string) -> untyped
|
92
|
-
def squish!: () -> self
|
93
|
-
def escape: (string string) -> untyped
|
94
|
-
def to_s: () -> String
|
95
|
-
def humanize: (?::Symbol lang) -> untyped
|
96
|
-
def inspect: () -> untyped
|
97
|
-
def method_missing: (untyped name, *untyped args) -> untyped
|
98
|
-
def respond_to_missing?: (untyped name, ?bool include_private) -> (true | untyped)
|
99
|
-
end
|
100
|
-
|
101
|
-
class URI
|
102
|
-
UCSCHAR: Regexp
|
103
|
-
IPRIVATE: Regexp
|
104
|
-
SCHEME: Regexp
|
105
|
-
PORT: Regexp
|
106
|
-
IP_literal: Regexp
|
107
|
-
PCT_ENCODED: Regexp
|
108
|
-
GEN_DELIMS: Regexp
|
109
|
-
SUB_DELIMS: Regexp
|
110
|
-
RESERVED: Regexp
|
111
|
-
UNRESERVED: Regexp
|
112
|
-
IUNRESERVED: Regexp
|
113
|
-
IPCHAR: Regexp
|
114
|
-
IQUERY: Regexp
|
115
|
-
IFRAGMENT: Regexp
|
116
|
-
ISEGMENT: Regexp
|
117
|
-
ISEGMENT_NZ: Regexp
|
118
|
-
ISEGMENT_NZ_NC: Regexp
|
119
|
-
IPATH_ABEMPTY: Regexp
|
120
|
-
IPATH_ABSOLUTE: Regexp
|
121
|
-
IPATH_NOSCHEME: Regexp
|
122
|
-
IPATH_ROOTLESS: Regexp
|
123
|
-
IPATH_EMPTY: Regexp
|
124
|
-
IREG_NAME: Regexp
|
125
|
-
IHOST: Regexp
|
126
|
-
IUSERINFO: Regexp
|
127
|
-
IAUTHORITY: Regexp
|
128
|
-
IRELATIVE_PART: Regexp
|
129
|
-
IRELATIVE_REF: Regexp
|
130
|
-
IHIER_PART: Regexp
|
131
|
-
IRI: Regexp
|
132
|
-
IRI_PARTS: Regexp
|
133
|
-
RDS_2A: Regexp
|
134
|
-
RDS_2B1: Regexp
|
135
|
-
RDS_2B2: Regexp
|
136
|
-
RDS_2C1: Regexp
|
137
|
-
RDS_2C2: Regexp
|
138
|
-
RDS_2D: Regexp
|
139
|
-
RDS_2E: Regexp
|
140
|
-
PORT_MAPPING: Hash[String, Integer]
|
141
|
-
NON_HIER_SCHEMES: [String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String, String]
|
142
|
-
PN_ESCAPE_CHARS: Regexp
|
143
|
-
PN_ESCAPES: Regexp
|
144
|
-
HOST_FROM_AUTHORITY_RE: Regexp
|
145
|
-
PORT_FROM_AUTHORITY_RE: Regexp
|
146
|
-
include Resource
|
147
|
-
@hash: Integer?
|
148
|
-
@object: {scheme: nil, authority: String?, userinfo: nil, user: String?, password: String?, host: nil, port: nil, path: String?, query: nil, fragment: nil}?
|
149
|
-
@value: String?
|
150
|
-
@mutex: Thread::Mutex
|
151
|
-
self.@cache: untyped
|
152
|
-
|
153
|
-
def self.cache: -> untyped
|
154
|
-
def self.intern: (String str, *untyped args, **untyped) -> URI
|
155
|
-
def self.parse: (untyped str) -> URI
|
156
|
-
def self.normalize_path: (String? path) -> String
|
157
|
-
def initialize: (*String? args, ?validate: (String | false)?, ?canonicalize: (String | false)?, **String?) -> void
|
158
|
-
def uri?: -> true
|
159
|
-
def urn?: -> bool
|
160
|
-
def hier?: -> bool
|
161
|
-
def url?: -> bool
|
162
|
-
def absolute?: -> bool
|
163
|
-
def relative?: -> bool
|
164
|
-
def relativize: (untyped base_uri) -> (String | URI)
|
165
|
-
def length: -> Integer
|
166
|
-
def valid?: -> false
|
167
|
-
def validate!: -> URI
|
168
|
-
def canonicalize: -> URI
|
169
|
-
def canonicalize!: -> URI
|
170
|
-
def join: (*untyped uris) -> URI
|
171
|
-
def /: (untyped fragment) -> URI
|
172
|
-
def +: (untyped other) -> URI
|
173
|
-
def root?: -> bool
|
174
|
-
def root: -> URI
|
175
|
-
def parent?: -> bool
|
176
|
-
def parent: -> URI?
|
177
|
-
def qname: (?prefixes: nil) -> [:rdf, Symbol?]?
|
178
|
-
def pname: (?prefixes: nil) -> String
|
179
|
-
def dup: -> URI
|
180
|
-
def freeze: -> URI
|
181
|
-
def end_with?: (string string) -> bool
|
182
|
-
def eql?: (untyped other) -> bool
|
183
|
-
def ==: (untyped other) -> bool
|
184
|
-
def ===: (untyped other) -> bool
|
185
|
-
def =~: (untyped pattern) -> ((Integer | bool)?)
|
186
|
-
def to_uri: -> URI
|
187
|
-
def to_str: -> String?
|
188
|
-
def inspect: -> String
|
189
|
-
def value: -> String?
|
190
|
-
def hash: -> Integer
|
191
|
-
def object: -> {scheme: nil, authority: String?, userinfo: nil, user: String?, password: String?, host: nil, port: nil, path: String?, query: nil, fragment: nil}
|
192
|
-
def parse: (String? value) -> {scheme: nil, authority: nil, userinfo: nil, user: String?, password: String?, host: nil, port: nil, path: String?, query: nil, fragment: nil}
|
193
|
-
def scheme: -> String?
|
194
|
-
def scheme=: (untyped value) -> URI
|
195
|
-
def normalized_scheme: -> nil
|
196
|
-
def user: -> String?
|
197
|
-
def user=: (untyped value) -> URI
|
198
|
-
def normalized_user: -> nil
|
199
|
-
def password: -> String?
|
200
|
-
def password=: (untyped value) -> URI
|
201
|
-
def normalized_password: -> nil
|
202
|
-
def host: -> String?
|
203
|
-
def host=: (untyped value) -> URI
|
204
|
-
def normalized_host: -> nil
|
205
|
-
def port: -> String?
|
206
|
-
def port=: (untyped value) -> URI
|
207
|
-
def normalized_port: -> Integer?
|
208
|
-
def path: -> String?
|
209
|
-
def path=: (String value) -> URI
|
210
|
-
def normalized_path: -> nil
|
211
|
-
def query: -> String?
|
212
|
-
def query=: (nil value) -> URI
|
213
|
-
def normalized_query: -> nil
|
214
|
-
def fragment: -> String?
|
215
|
-
def fragment=: (untyped value) -> URI
|
216
|
-
def normalized_fragment: -> nil
|
217
|
-
def authority: -> String?
|
218
|
-
def authority=: (untyped value) -> URI
|
219
|
-
def normalized_authority: -> String?
|
220
|
-
def userinfo: -> String?
|
221
|
-
def userinfo=: (untyped value) -> URI
|
222
|
-
def normalized_userinfo: -> nil
|
223
|
-
def query_values: (?singleton(Hash) return_type) -> ((Array[Array[nil]?] | Hash[untyped, Array[nil]?])?)
|
224
|
-
def query_values=: (untyped value) -> nil
|
225
|
-
def request_uri: -> String?
|
226
|
-
def _dump: (untyped level) -> String?
|
227
|
-
def self._load: (untyped data) -> URI
|
228
|
-
|
229
|
-
private
|
230
|
-
def normalize_segment: (String? value, untyped expr, ?bool downcase) -> nil
|
231
|
-
def format_userinfo: (?String append) -> String
|
232
|
-
def format_authority: -> String
|
233
|
-
def self.encode: (untyped str, Regexp expr) -> untyped
|
234
|
-
def self.decode: (untyped str) -> untyped
|
235
|
-
end
|
236
|
-
|
237
|
-
class Node
|
238
|
-
include RDF::Resource
|
239
|
-
attr_accessor original: untyped
|
240
|
-
attr_accessor id: untyped
|
241
|
-
|
242
|
-
def self.cache: () -> untyped
|
243
|
-
def self.uuid: (?format: ::Symbol) -> untyped
|
244
|
-
def self.intern: (untyped id) -> untyped
|
245
|
-
|
246
|
-
def dup: () -> Node
|
247
|
-
def initialize: (?untyped? id) -> void
|
248
|
-
def node?: () -> true
|
249
|
-
def anonymous?: () -> true
|
250
|
-
alias unlabeled? anonymous?
|
251
|
-
def labeled?: () -> bool
|
252
|
-
def hash: () -> Integer
|
253
|
-
def eql?: (Node other) -> bool
|
254
|
-
def ==: (Node other) -> untyped
|
255
|
-
alias === ==
|
256
|
-
def to_unique_base: () -> (untyped | ::String)
|
257
|
-
def make_unique!: () -> self
|
258
|
-
def to_s: () -> String
|
259
|
-
def to_sym: () -> untyped
|
260
|
-
end
|
261
|
-
end
|