Skip to content

Commit

Permalink
Replace domain "simphony-project.eu" with "simphony-osp.eu". (#811)
Browse files Browse the repository at this point in the history
* Replace domain "simphony-project.eu" with "simphony-osp.eu".

* Use FOAF from Web Archive to pass tests (FOAF site is down).
  • Loading branch information
kysrpex authored Sep 9, 2022
1 parent 3742944 commit 91d650f
Show file tree
Hide file tree
Showing 12 changed files with 104 additions and 114 deletions.
4 changes: 1 addition & 3 deletions simphony_osp/interfaces/dataspace/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
class DataspaceInterface(Interface):
"""The data space interface connects SimPhoNy to a data space."""

_identifier: Identifier = URIRef(
"https://www.simphony-project.eu/SQLAlchemy"
)
_identifier: Identifier = URIRef("https://www.simphony-osp.eu/SQLAlchemy")

_database_path: Optional[Path] = None
_files_path: Optional[Path] = None
Expand Down
4 changes: 1 addition & 3 deletions simphony_osp/interfaces/sqlalchemy/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
class SQLAlchemy(Interface):
"""An interface to an SQL database using SQLAlchemy."""

_identifier: Identifier = URIRef(
"https://www.simphony-project.eu/SQLAlchemy"
)
_identifier: Identifier = URIRef("https://www.simphony-osp.eu/SQLAlchemy")
"""The identifier of the graph serving as context of the saved triples."""

_uri: Optional[str] = None
Expand Down
68 changes: 34 additions & 34 deletions simphony_osp/ontology/files/city.ttl
Original file line number Diff line number Diff line change
@@ -1,87 +1,87 @@
@prefix : <https://www.simphony-project.eu/city#> .
@prefix : <https://www.simphony-osp.eu/city#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <https://www.simphony-project.eu/city#> .
@base <https://www.simphony-osp.eu/city#> .

<https://www.simphony-project.eu/city#> rdf:type owl:Ontology ;
<https://www.simphony-osp.eu/city#> rdf:type owl:Ontology ;
owl:versionIRI :version_4.0.0 ;
rdfs:comment "Sample ontology for SimPhoNy OSP."@en .

#################################################################
# Datatypes
#################################################################

### https://www.simphony-project.eu/types#Vector
<https://www.simphony-project.eu/types#Vector> rdf:type rdfs:Datatype .
### https://www.simphony-osp.eu/types#Vector
<https://www.simphony-osp.eu/types#Vector> rdf:type rdfs:Datatype .


#################################################################
# Object Properties
#################################################################

### https://www.simphony-project.eu/city#encloses
### https://www.simphony-osp.eu/city#encloses
:encloses rdf:type owl:ObjectProperty ;
owl:inverseOf :isEnclosedBy ;
rdfs:label "encloses"@en .


### https://www.simphony-project.eu/city#hasChild
### https://www.simphony-osp.eu/city#hasChild
:hasChild rdf:type owl:ObjectProperty ;
rdfs:subPropertyOf :hasPart ;
owl:inverseOf :isChildOf ;
rdfs:label "has child"@en .


### https://www.simphony-project.eu/city#hasInhabitant
### https://www.simphony-osp.eu/city#hasInhabitant
:hasInhabitant rdf:type owl:ObjectProperty ;
rdfs:subPropertyOf :encloses ;
rdfs:label "has inhabitant"@en .


### https://www.simphony-project.eu/city#hasMajor
### https://www.simphony-osp.eu/city#hasMajor
:hasMajor rdf:type owl:ObjectProperty ;
rdfs:subPropertyOf :hasWorker ;
rdfs:range :Citizen ;
rdfs:label "has major"@en .


### https://www.simphony-project.eu/city#hasPart
### https://www.simphony-osp.eu/city#hasPart
:hasPart rdf:type owl:ObjectProperty ;
rdfs:subPropertyOf :encloses ;
owl:inverseOf :isPartOf ;
rdf:type owl:TransitiveProperty ;
rdfs:label "has part"@en .


### https://www.simphony-project.eu/city#hasWorker
### https://www.simphony-osp.eu/city#hasWorker
:hasWorker rdf:type owl:ObjectProperty ;
rdfs:subPropertyOf :hasPart ;
owl:inverseOf :worksIn ;
rdfs:range :Person ;
rdfs:label "has worker"@en .


### https://www.simphony-project.eu/city#isChildOf
### https://www.simphony-osp.eu/city#isChildOf
:isChildOf rdf:type owl:ObjectProperty ;
rdfs:subPropertyOf :isPartOf ;
rdfs:label "is child of"@en .


### https://www.simphony-project.eu/city#isEnclosedBy
### https://www.simphony-osp.eu/city#isEnclosedBy
:isEnclosedBy rdf:type owl:ObjectProperty ;
rdfs:label "is enclosed by"@en .


### https://www.simphony-project.eu/city#isPartOf
### https://www.simphony-osp.eu/city#isPartOf
:isPartOf rdf:type owl:ObjectProperty ;
rdfs:subPropertyOf :isEnclosedBy ;
rdfs:label "is part of"@en .


### https://www.simphony-project.eu/city#worksIn
### https://www.simphony-osp.eu/city#worksIn
:worksIn rdf:type owl:ObjectProperty ;
rdfs:subPropertyOf :isPartOf ;
rdfs:label "works in"@en .
Expand All @@ -91,32 +91,32 @@
# Data properties
#################################################################

### https://www.simphony-project.eu/city#age
### https://www.simphony-osp.eu/city#age
:age rdf:type owl:DatatypeProperty ;
rdfs:subPropertyOf :number ;
rdfs:label "age"@en .


### https://www.simphony-project.eu/city#coordinates
### https://www.simphony-osp.eu/city#coordinates
:coordinates rdf:type owl:DatatypeProperty ;
rdfs:range <https://www.simphony-project.eu/types#Vector> ;
rdfs:range <https://www.simphony-osp.eu/types#Vector> ;
rdfs:label "coordinates"@en .


### https://www.simphony-project.eu/city#name
### https://www.simphony-osp.eu/city#name
:name rdf:type owl:DatatypeProperty ,
owl:FunctionalProperty ;
rdfs:range xsd:string ;
rdfs:label "name"@en .


### https://www.simphony-project.eu/city#number
### https://www.simphony-osp.eu/city#number
:number rdf:type owl:DatatypeProperty ;
rdfs:range xsd:integer ;
rdfs:label "number"@en .


### https://www.simphony-project.eu/city#postalCode
### https://www.simphony-osp.eu/city#postalCode
:postalCode rdf:type owl:DatatypeProperty ;
rdfs:subPropertyOf :number ;
rdfs:label "postal code"@en .
Expand All @@ -126,7 +126,7 @@
# Classes
#################################################################

### https://www.simphony-project.eu/city#Address
### https://www.simphony-osp.eu/city#Address
:Address rdf:type owl:Class ;
rdfs:subClassOf [ rdf:type owl:Restriction ;
owl:onProperty :isPartOf ;
Expand All @@ -148,18 +148,18 @@
rdfs:label "Address"@en .


### https://www.simphony-project.eu/city#ArchitecturalComponent
### https://www.simphony-osp.eu/city#ArchitecturalComponent
:ArchitecturalComponent rdf:type owl:Class ;
rdfs:label "Architectural Component"@en .


### https://www.simphony-project.eu/city#ArchitecturalStructure
### https://www.simphony-osp.eu/city#ArchitecturalStructure
:ArchitecturalStructure rdf:type owl:Class ;
rdfs:subClassOf :GeographicalPlace ;
rdfs:label "Architectural Structure"@en .


### https://www.simphony-project.eu/city#Building
### https://www.simphony-osp.eu/city#Building
:Building rdf:type owl:Class ;
rdfs:subClassOf :ArchitecturalStructure ,
[ rdf:type owl:Restriction ;
Expand All @@ -179,13 +179,13 @@
rdfs:label "Building"@en .


### https://www.simphony-project.eu/city#Citizen
### https://www.simphony-osp.eu/city#Citizen
:Citizen rdf:type owl:Class ;
rdfs:subClassOf :Person ;
rdfs:label "Citizen"@en .


### https://www.simphony-project.eu/city#City
### https://www.simphony-osp.eu/city#City
:City rdf:type owl:Class ;
rdfs:subClassOf :PopulatedPlace ,
[ rdf:type owl:Restriction ;
Expand All @@ -200,13 +200,13 @@
rdfs:label "City"@en .


### https://www.simphony-project.eu/city#Floor
### https://www.simphony-osp.eu/city#Floor
:Floor rdf:type owl:Class ;
rdfs:subClassOf :ArchitecturalComponent ;
rdfs:label "Floor"@en .


### https://www.simphony-project.eu/city#GeographicalPlace
### https://www.simphony-osp.eu/city#GeographicalPlace
:GeographicalPlace rdf:type owl:Class ;
rdfs:subClassOf [ rdf:type owl:Restriction ;
owl:onProperty :name ;
Expand All @@ -215,7 +215,7 @@
rdfs:label "Geographical Place"@en .


### https://www.simphony-project.eu/city#LivingBeing
### https://www.simphony-osp.eu/city#LivingBeing
:LivingBeing rdf:type owl:Class ;
rdfs:subClassOf [ rdf:type owl:Restriction ;
owl:onProperty :isChildOf ;
Expand All @@ -234,7 +234,7 @@
rdfs:label "Living Being"@en .


### https://www.simphony-project.eu/city#Neighborhood
### https://www.simphony-osp.eu/city#Neighborhood
:Neighborhood rdf:type owl:Class ;
rdfs:subClassOf :PopulatedPlace ,
[ rdf:type owl:Restriction ;
Expand All @@ -249,7 +249,7 @@
rdfs:label "Neighborhood"@en .


### https://www.simphony-project.eu/city#Person
### https://www.simphony-osp.eu/city#Person
:Person rdf:type owl:Class ;
rdfs:subClassOf :LivingBeing ,
[ rdf:type owl:Restriction ;
Expand All @@ -260,7 +260,7 @@
rdfs:label "Person"@en .


### https://www.simphony-project.eu/city#PopulatedPlace
### https://www.simphony-osp.eu/city#PopulatedPlace
:PopulatedPlace rdf:type owl:Class ;
rdfs:subClassOf :GeographicalPlace ,
[ rdf:type owl:Restriction ;
Expand All @@ -278,7 +278,7 @@
rdfs:label "Populated Place"@en .


### https://www.simphony-project.eu/city#Street
### https://www.simphony-osp.eu/city#Street
:Street rdf:type owl:Class ;
rdfs:subClassOf :PopulatedPlace ,
[ rdf:type owl:Restriction ;
Expand Down
2 changes: 1 addition & 1 deletion simphony_osp/ontology/files/city.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ identifier: city
ontology_file: city.ttl
format: 'turtle'
namespaces:
city: https://www.simphony-project.eu/city#
city: https://www.simphony-osp.eu/city#
18 changes: 9 additions & 9 deletions simphony_osp/ontology/files/simphony.ttl
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
@prefix : <https://www.simphony-project.eu/simphony##> .
@prefix : <https://www.simphony-osp.eu/simphony##> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix simphony: <https://www.simphony-project.eu/simphony#> .
@base <https://www.simphony-project.eu/simphony#> .
@prefix simphony: <https://www.simphony-osp.eu/simphony#> .
@base <https://www.simphony-osp.eu/simphony#> .

<https://www.simphony-project.eu/simphony#> rdf:type owl:Ontology .
<https://www.simphony-osp.eu/simphony#> rdf:type owl:Ontology .

#################################################################
# Annotation properties
#################################################################

### https://www.simphony-project.eu/simphony#main
### https://www.simphony-osp.eu/simphony#main
simphony:main rdf:type owl:AnnotationProperty ;
rdfs:comment "When multiple ontology individuals are serialized to a file, one of them can be tagged with this proverty (whose value must be True). When the file is imported again in SimPhoNy, only such item will be returned."@en ;
rdfs:label "Main individual"@en ;
rdfs:range xsd:boolean .

### https://www.simphony-project.eu/simphony#contains
### https://www.simphony-osp.eu/simphony#contains
simphony:contains rdf:type owl:ObjectProperty ;
rdf:type owl:IrreflexiveProperty ;
rdfs:domain simphony:Container ;
Expand All @@ -29,7 +29,7 @@ simphony:contains rdf:type owl:ObjectProperty ;
# Classes
#################################################################

### https://www.simphony-project.eu/simphony#Container
### https://www.simphony-osp.eu/simphony#Container
simphony:Container rdf:type owl:Class ;
rdfs:subClassOf simphony:Entity ;
rdfs:comment """Class of objects that cluster ontology individuals together.
Expand All @@ -41,13 +41,13 @@ In SimPhoNy, the Wrapper Python objects that are used to interact with other sof
For a wrapper developer it can be of interest to create a subclass of this one that adds further restrictions on what kind of objects a container might hold. For example, if one wants to create a wrapper for a tool that simulates a city, then one can specify that the container must contain exactly one city individual, one time step individual, one duration individual, etc. Any other kind of individual could be prohibited."""@en .


### https://www.simphony-project.eu/simphony#Entity
### https://www.simphony-osp.eu/simphony#Entity
simphony:Entity rdf:type owl:Class ;
rdfs:subClassOf owl:Thing ;
rdfs:isDefinedBy "The root entity of the ontology." .


### https://www.simphony-project.eu/simphony#File
### https://www.simphony-osp.eu/simphony#File
simphony:File rdf:type owl:Class ;
rdfs:subClassOf simphony:Entity ;
rdfs:isDefinedBy "An entity associated to a file." .
Expand Down
2 changes: 1 addition & 1 deletion simphony_osp/ontology/files/simphony.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ identifier: simphony
ontology_file: simphony.ttl
format: 'turtle'
namespaces:
simphony: https://www.simphony-project.eu/simphony#
simphony: https://www.simphony-osp.eu/simphony#
6 changes: 3 additions & 3 deletions simphony_osp/utils/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class Vector(CustomDataType):
# of vector objects.
# - Implement some operations with numpy arrays that return numpy arrays,
# just as it was done in the AttributeSet case.
iri = URIRef("https://www.simphony-project.eu/types#Vector")
iri = URIRef("https://www.simphony-osp.eu/types#Vector")

_ELEMENT_LEN: int = 3
_DTYPE_LEN: int = 1
Expand Down Expand Up @@ -311,7 +311,7 @@ class UID(CustomDataType):
you are welcome to use this custom data type.
"""

iri = URIRef("https://www.simphony-project.eu/types#UID")
iri = URIRef("https://www.simphony-osp.eu/types#UID")
data: Union[Node, UUID]

__slots__ = ("data",)
Expand Down Expand Up @@ -431,7 +431,7 @@ def _lexicalizer(x):
datatype_specific=True,
)

ENTITY_IRI_PREFIX = "https://www.simphony-project.eu/entity#"
ENTITY_IRI_PREFIX = "https://www.simphony-osp.eu/entity#"

# --- RDF TO PYTHON --- #

Expand Down
Loading

0 comments on commit 91d650f

Please sign in to comment.