Skip to content

Commit

Permalink
Merge pull request #120 from SINTEF/meta.sintef.no_to_onto-ns.com
Browse files Browse the repository at this point in the history
Meta.sintef.no to onto ns.com
  • Loading branch information
jesper-friis authored Jul 7, 2021
2 parents e47bbe2 + 79cd5d8 commit e0c4421
Show file tree
Hide file tree
Showing 58 changed files with 138 additions and 135 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ and its properties provide in the "description" fields.
{
"name": "Person",
"version": "0.1",
"namespace": "http://meta.sintef.no",
"meta": "http://meta.sintef.no/0.3/EntitySchema",
"namespace": "http://onto-ns.com/meta",
"meta": "http://onto-ns.com/meta/0.3/EntitySchema",
"description": "A person.",
"dimensions": [
{
Expand Down Expand Up @@ -225,7 +225,7 @@ The following terms have a special meaning in dlite:
- **Entity**: May be any kind of instance, including data instances,
metadata instances or meta-metadata instances. However, for historical
reasons it is often used for "standard" metadata that are instances of
meta-metadata "http://meta.sintef.no/0.3/EntitySchema".
meta-metadata "http://onto-ns.com/meta/0.3/EntitySchema".
- **Instance**: The basic data object in DLite. All instances are described
by their metadata which itself are instances. Instances are identified
by an UUID.
Expand Down
4 changes: 2 additions & 2 deletions bindings/fortran/tests/Animal.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "Animal",
"version": "0.1",
"namespace": "http://meta.sintef.no",
"meta": "http://meta.sintef.no/0.3/EntitySchema",
"namespace": "http://onto-ns.com/meta",
"meta": "http://onto-ns.com/meta/0.3/EntitySchema",
"description": "Define a metadata without dimension.",
"dimensions": [
],
Expand Down
6 changes: 3 additions & 3 deletions bindings/fortran/tests/Person.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "Person",
"version": "0.2",
"namespace": "http://meta.sintef.no",
"meta": "http://meta.sintef.no/0.3/EntitySchema",
"namespace": "http://onto-ns.com/meta",
"meta": "http://onto-ns.com/meta/0.3/EntitySchema",
"description": "A person.",
"dimensions": [
{
Expand Down Expand Up @@ -44,5 +44,5 @@
"description": "Temperature on the body."
}
],
"dataname": "http://meta.sintef.no/0.2/Person"
"dataname": "http://onto-ns.com/meta/0.2/Person"
}
4 changes: 2 additions & 2 deletions bindings/fortran/tests/Scan3D.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "Scan3D",
"version": "0.1",
"namespace": "http://meta.sintef.no",
"meta": "http://meta.sintef.no/0.3/EntitySchema",
"namespace": "http://onto-ns.com/meta",
"meta": "http://onto-ns.com/meta/0.3/EntitySchema",
"description": "A 3D scan.",
"dimensions": [
{
Expand Down
4 changes: 2 additions & 2 deletions bindings/fortran/tests/inputs.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"b04965e6-a9bb-591f-8f8a-1adcb2c8dc39": {
"meta": "http://meta.sintef.no/0.2/Person",
"meta": "http://onto-ns.com/meta/0.2/Person",
"dimensions": {
"N": 2,
"M": 3
Expand All @@ -13,7 +13,7 @@
}
},
"4b166dbe-d99d-5091-abdd-95b83330ed3a": {
"meta": "http://meta.sintef.no/0.1/Scan3D",
"meta": "http://onto-ns.com/meta/0.1/Scan3D",
"dimensions": {
"N": 3,
"P": 5
Expand Down
4 changes: 2 additions & 2 deletions bindings/fortran/tests/persons.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"d473aa6f-2da3-4889-a88d-0c96186c3fa2": {
"meta": "http://meta.sintef.no/0.2/Person",
"meta": "http://onto-ns.com/meta/0.2/Person",
"dimensions": {
"N": 2,
"M": 3
Expand All @@ -13,7 +13,7 @@
}
},
"ccdcb6a5-b730-4fd4-a98b-3cd8470c928b": {
"meta": "http://meta.sintef.no/0.2/Person",
"meta": "http://onto-ns.com/meta/0.2/Person",
"dimensions": {
"N": 3,
"M": 1
Expand Down
6 changes: 3 additions & 3 deletions bindings/fortran/tests/persons_names.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Joe": {
"meta": "http://meta.sintef.no/0.2/Person",
"meta": "http://onto-ns.com/meta/0.2/Person",
"dimensions": {
"N": 2,
"M": 3
Expand All @@ -13,7 +13,7 @@
}
},
"Elisa": {
"meta": "http://meta.sintef.no/0.2/Person",
"meta": "http://onto-ns.com/meta/0.2/Person",
"dimensions": {
"N": 3,
"M": 1
Expand All @@ -26,7 +26,7 @@
}
},
"Joe Doe": {
"meta": "http://meta.sintef.no/0.2/Person",
"meta": "http://onto-ns.com/meta/0.2/Person",
"name": "Joe Doe",
"age": 53.0,
"skills": ["java", "c#", "c++"],
Expand Down
6 changes: 3 additions & 3 deletions bindings/python/dlite-entity.i
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,9 @@ void dlite_swig_set_property(struct _DLiteInstance *inst, const char *name,
bool dlite_instance_has_property(struct _DLiteInstance *inst, const char *name);

/* FIXME - how do we avoid duplicating these constants from dlite-schemas.h? */
#define BASIC_METADATA_SCHEMA "http://meta.sintef.no/0.1/BasicMetadataSchema"
#define ENTITY_SCHEMA "http://meta.sintef.no/0.3/EntitySchema"
#define COLLECTION_ENTITY "http://meta.sintef.no/0.1/Collection"
#define BASIC_METADATA_SCHEMA "http://onto-ns.com/meta/0.1/BasicMetadataSchema"
#define ENTITY_SCHEMA "http://onto-ns.com/meta/0.3/EntitySchema"
#define COLLECTION_ENTITY "http://onto-ns.com/meta/0.1/Collection"

/* -----------------------------------
* Target language-spesific extensions
Expand Down
6 changes: 3 additions & 3 deletions bindings/python/tests/MyEntity.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "MyEntity",
"version": "0.1",
"namespace": "http://meta.sintef.no",
"meta": "http://meta.sintef.no/0.3/EntitySchema",
"namespace": "http://onto-ns.com/meta",
"meta": "http://onto-ns.com/meta/0.3/EntitySchema",
"description": "Just some tests..",
"dimensions": [
{
Expand Down Expand Up @@ -112,5 +112,5 @@
"description": "A relation array"
}
],
"dataname": "http://meta.sintef.no/0.1/MyEntity"
"dataname": "http://onto-ns.com/meta/0.1/MyEntity"
}
6 changes: 3 additions & 3 deletions bindings/python/tests/Person.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "Person",
"version": "0.1",
"namespace": "http://meta.sintef.no",
"meta": "http://meta.sintef.no/0.3/EntitySchema",
"namespace": "http://onto-ns.com/meta",
"meta": "http://onto-ns.com/meta/0.3/EntitySchema",
"description": "A person.",
"dimensions": [
{
Expand Down Expand Up @@ -31,5 +31,5 @@
"description": "List of skills."
}
],
"dataname": "http://meta.sintef.no/0.1/Person"
"dataname": "http://onto-ns.com/meta/0.1/Person"
}
4 changes: 2 additions & 2 deletions bindings/python/tests/SimplePerson.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "SimplePerson",
"version": "0.1",
"namespace": "http://meta.sintef.no",
"meta": "http://meta.sintef.no/0.3/EntitySchema",
"namespace": "http://onto-ns.com/meta",
"meta": "http://onto-ns.com/meta/0.3/EntitySchema",
"description": "A simple person representation.",
"dimensions": [],
"properties": [
Expand Down
8 changes: 4 additions & 4 deletions bindings/python/tests/python-mapping-plugins/plugin1.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

class Person2SimplePerson(DLiteMappingBase):
name = "Person2SimplePerson"
output_uri = "http://meta.sintef.no/0.1/SimplePerson"
input_uris = ["http://meta.sintef.no/0.1/Person"]
output_uri = "http://onto-ns.com/meta/0.1/SimplePerson"
input_uris = ["http://onto-ns.com/meta/0.1/Person"]
cost = 25

def map(self, instances):
Expand All @@ -17,8 +17,8 @@ def map(self, instances):

class SimplePerson2Person(DLiteMappingBase):
name = "SimplePerson2Person"
output_uri = "http://meta.sintef.no/0.1/Person"
input_uris = ["http://meta.sintef.no/0.1/SimplePerson"]
output_uri = "http://onto-ns.com/meta/0.1/Person"
input_uris = ["http://onto-ns.com/meta/0.1/SimplePerson"]
cost = 25

def map(self, instances):
Expand Down
10 changes: 5 additions & 5 deletions bindings/python/tests/test_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
print(myentity.uuid)

# Check some properties of the entity
assert myentity.uuid == 'ea34bc5e-de88-544d-bcba-150b7292873d'
assert myentity.uri == 'http://meta.sintef.no/0.1/MyEntity'
assert myentity.uuid == 'a0e63529-3397-5c4f-a56c-14bf07ecc219'
assert myentity.uri == 'http://onto-ns.com/meta/0.1/MyEntity'
assert myentity.dimensions == {'ndimensions': 2, 'nproperties': 14}
assert not myentity.is_data
assert myentity.is_meta
Expand Down Expand Up @@ -85,20 +85,20 @@

assert inst.meta == myentity

e = dlite.get_instance('http://meta.sintef.no/0.1/MyEntity')
e = dlite.get_instance('http://onto-ns.com/meta/0.1/MyEntity')
assert e == myentity
assert e != inst

e2 = Instance(
'http://meta.sintef.no/0.1/NewEntity',
'http://onto-ns.com/meta/0.1/NewEntity',
[Dimension('N', 'Number of something')],
[Property('name', type='string', description='Name of something.'),
Property('arr', type='int', dims=['N+2'], description='An array.'),
Property('v', type='double', unit='m/s', description='Velocity')],
'Something new...')

e3 = Instance(
'http://meta.sintef.no/0.1/NewEntity2',
'http://onto-ns.com/meta/0.1/NewEntity2',
[],
[Property('name', type='string', description='Name of something.'),
Property('arr', type='int', description='An array.'),
Expand Down
6 changes: 3 additions & 3 deletions bindings/python/tests/test_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
person.skills = ['keping the head cold', 'famous quotes']

# Map person to an instance of SimplePerson
simple = dlite.mapping('http://meta.sintef.no/0.1/SimplePerson', [person])
simple = dlite.mapping('http://onto-ns.com/meta/0.1/SimplePerson', [person])
assert simple != person
assert simple.name == person.name
assert simple.age == person.age
Expand All @@ -28,15 +28,15 @@

# Get the added person instance from the collection mapped to a new
# instance of SimplePerson (the second argument can be omitted...)
s = coll.get('simple', 'http://meta.sintef.no/0.1/SimplePerson')
s = coll.get('simple', 'http://onto-ns.com/meta/0.1/SimplePerson')
assert s == simple
s2 = coll.get('simple')
assert s2 == s


# Get the added person instance from the collection mapped to a new
# instance of Person (with no skills)
p = coll.get('simple', 'http://meta.sintef.no/0.1/Person')
p = coll.get('simple', 'http://onto-ns.com/meta/0.1/Person')
assert p != person
assert p.meta == person.meta
assert p.name == person.name
Expand Down
4 changes: 2 additions & 2 deletions bindings/python/tests/test_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

# Load metadata (i.e. an instance of meta-metadata) from url
s = dlite.Storage(url)
myentity = dlite.Instance(s, 'http://meta.sintef.no/0.1/MyEntity')
myentity = dlite.Instance(s, 'http://onto-ns.com/meta/0.1/MyEntity')
del s

with dlite.Storage(url) as s2:
myentity2 = dlite.Instance(s2, 'http://meta.sintef.no/0.1/MyEntity')
myentity2 = dlite.Instance(s2, 'http://onto-ns.com/meta/0.1/MyEntity')
6 changes: 3 additions & 3 deletions examples/ex1/Chemistry-0.1.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "Chemistry",
"version": "0.1",
"namespace": "http://www.sintef.no/calm",
"meta": "http://meta.sintef.no/0.3/EntitySchema",
"namespace": "http://sintef.no/calm",
"meta": "http://onto-ns.com/meta/0.3/EntitySchema",
"description": "Simple entity with alloy and particle compositions.",
"dimensions": [
{
Expand Down Expand Up @@ -82,5 +82,5 @@
"description": "Average volume per atom for each phase."
}
],
"dataname": "http://www.sintef.no/calm/0.1/Chemistry"
"dataname": "http://sintef.no/calm/0.1/Chemistry"
}
2 changes: 1 addition & 1 deletion examples/ex1/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ int main()
/* Load Chemistry entity */
s = dlite_storage_open("json", path, "mode=r");
chem = (DLiteMeta *)
dlite_meta_load(s, "http://www.sintef.no/calm/0.1/Chemistry");
dlite_meta_load(s, "http://sintef.no/calm/0.1/Chemistry");
dlite_storage_close(s);

/* Create instance */
Expand Down
6 changes: 3 additions & 3 deletions examples/ex2/Chemistry-0.1.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "Chemistry",
"version": "0.1",
"namespace": "http://www.sintef.no/calm",
"meta": "http://meta.sintef.no/0.3/EntitySchema",
"namespace": "http://sintef.no/calm",
"meta": "http://onto-ns.com/meta/0.3/EntitySchema",
"description": "Simple entity with alloy and particle compositions.",
"dimensions": [
{
Expand Down Expand Up @@ -82,5 +82,5 @@
"description": "Average volume per atom for each phase."
}
],
"dataname": "http://www.sintef.no/calm/0.1/Chemistry"
"dataname": "http://sintef.no/calm/0.1/Chemistry"
}
2 changes: 1 addition & 1 deletion examples/ex2/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ int main()
/* Load Chemistry entity */
s = dlite_storage_open("json", path, "mode=r");
chem = (DLiteMeta *)
dlite_meta_load(s, "http://www.sintef.no/calm/0.1/Chemistry");
dlite_meta_load(s, "http://sintef.no/calm/0.1/Chemistry");
dlite_storage_close(s);

/* Create instance */
Expand Down
6 changes: 3 additions & 3 deletions examples/ex3/PhilibTable.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "PhilibTable",
"version": "0.1",
"namespace": "http://meta.sintef.no/philib",
"meta": "http://meta.sintef.no/0.3/EntitySchema",
"namespace": "http://onto-ns.com/meta/philib",
"meta": "http://onto-ns.com/meta/0.3/EntitySchema",
"description": "Tabulation of thermodynamic phase diagramata for philib.",
"dimensions": [
{
Expand Down Expand Up @@ -137,5 +137,5 @@
"description": "The values of the free variables for which the calculated variables are calculated."
}
],
"dataname": "http://meta.sintef.no/philib/0.1/PhilibTable"
"dataname": "http://onto-ns.com/meta/philib/0.1/PhilibTable"
}
2 changes: 1 addition & 1 deletion examples/ex3/example-AlMgSi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"meta": {
"name": "PhilibTable",
"version": "0.1",
"namespace": "http://meta.sintef.no/philib"
"namespace": "http://onto-ns.com/meta/philib"
},
"dimensions": {
"nelements": 3,
Expand Down
2 changes: 1 addition & 1 deletion examples/ex3/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ int main()

/* Load PhilibTable entity */
s = dlite_storage_open("json", path, "mode=r");
char *uri = "http://meta.sintef.no/philib/0.1/PhilibTable";
char *uri = "http://onto-ns.com/meta/philib/0.1/PhilibTable";
table = (DLiteMeta *)dlite_meta_load(s, uri);
dlite_storage_close(s);

Expand Down
6 changes: 3 additions & 3 deletions examples/ex4/Chemistry-0.1.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "Chemistry",
"version": "0.1",
"namespace": "http://www.sintef.no/calm",
"meta": "http://meta.sintef.no/0.3/EntitySchema",
"namespace": "http://sintef.no/calm",
"meta": "http://onto-ns.com/meta/0.3/EntitySchema",
"description": "Simple entity with alloy and particle compositions.",
"dimensions": [
{
Expand Down Expand Up @@ -82,5 +82,5 @@
"description": "Average volume per atom for each phase."
}
],
"dataname": "http://www.sintef.no/calm/0.1/Chemistry"
"dataname": "http://sintef.no/calm/0.1/Chemistry"
}
2 changes: 1 addition & 1 deletion examples/ex4/example-AlMgSi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"meta": {
"name": "PhilibTable",
"version": "0.1",
"namespace": "http://meta.sintef.no/philib"
"namespace": "http://onto-ns.com/meta/philib"
},
"dimensions": {
"nelements": 3,
Expand Down
Loading

0 comments on commit e0c4421

Please sign in to comment.