Skip to content
Snippets Groups Projects
Commit 48ebea5b authored by Said Fathalla's avatar Said Fathalla
Browse files

replace affiliation string of orga by its IRI if exist

parent ef0c441e
No related branches found
No related tags found
3 merge requests!11Make release 1.0.0,!10Release tag 1.0.0 to main,!1replace affiliation string of orga by its IRI if exist
Pipeline #201431 failed
......@@ -7,9 +7,26 @@ WHERE {
?p schema:name ?name
}
# 2. if the affiliation is an IRI, schema:Organization type is added
# 2. a. if the affiliation is an IRI representing an organization, then
# schema:Organization type is added to that organization (IRI)
PREFIX schema: <http://schema.org/>
INSERT { ?org a schema:Organization }
WHERE {
?r schema:affiliation ?org. FILTER(ISIRI(?org))
}
#2. b. the string affiliation of a reource is replaced by the organization IRI (if exist)
INSERT { ?r schema:affiliation ?org}
WHERE {
?r schema:affiliation ?name.
?org a schema:Organization. FILTER (ISIRI(?org)).
?org schema:name ?oname . FILTER (STR(?oname) =STR(?name))
};
DELETE {?r schema:affiliation ?affstr}
WHERE{
?r schema:affiliation ?affstr. FILTER (!ISIRI(?affstr))
?org a schema:Organization.
?org schema:name ?oname . FILTER (STR(?oname) =STR(?affstr))
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment