Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
SemWeb
logilab-views
Commits
f0b4207bb31f
Commit
ac792d01
authored
Mar 23, 2020
by
Élodie Thiéblin
Browse files
[Schema] Refactor file to export aliases and inverses
parent
c64fa584241c
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/common/aliases.ts
0 → 100644
View file @
f0b4207b
export
const
ALIASES
=
[
// Person
[
"
http://xmlns.com/foaf/0.1/Person
"
,
"
http://dbpedia.org/ontology/Person
"
,
"
http://purl.org/dc/terms/Agent
"
],
[
"
http://xmlns.com/foaf/0.1/title
"
],
[
"
http://xmlns.com/foaf/0.1/gender
"
],
[
"
http://xmlns.com/foaf/0.1/nick
"
],
[
"
http://xmlns.com/foaf/0.1/name
"
,
"
http://www.w3.org/2000/01/rdf-schema#label
"
],
[
"
http://xmlns.com/foaf/0.1/firstName
"
,
"
http://xmlns.com/foaf/0.1/givenName
"
],
[
"
http://xmlns.com/foaf/0.1/lastName
"
,
"
http://xmlns.com/foaf/0.1/familyName
"
],
[
"
http://xmlns.com/foaf/0.1/phone
"
],
[
"
http://xmlns.com/foaf/0.1/homepage
"
,
"
http://dbpedia.org/ontology/wikiPageExternalLink
"
,
"
http://xmlns.com/foaf/0.1/isPrimaryTopicOf
"
],
[
"
http://xmlns.com/foaf/0.1/weblog
"
],
[
"
http://xmlns.com/foaf/0.1/openid
"
],
[
"
http://xmlns.com/foaf/0.1/made
"
,
"
http://dbpedia.org/ontology/soundRecording
"
],
[
"
http://xmlns.com/foaf/0.1/maker
"
],
[
"
http://xmlns.com/foaf/0.1/img
"
,
"
http://xmlns.com/foaf/0.1/depiction
"
],
[
"
http://xmlns.com/foaf/0.1/thumbnail
"
,
"
http://dbpedia.org/ontology/thumbnail
"
],
[
"
http://xmlns.com/foaf/0.1/knows
"
],
[
"
http://xmlns.com/foaf/0.1/interest
"
],
[
"
http://xmlns.com/foaf/0.1/topic_interest
"
],
[
"
http://xmlns.com/foaf/0.1/publications
"
],
[
"
http://xmlns.com/foaf/0.1/currentProject
"
],
[
"
http://xmlns.com/foaf/0.1/birthday
"
],
[
"
http://xmlns.com/foaf/0.1/age
"
],
[
"
http://xmlns.com/foaf/0.1/status
"
],
[
"
http://rdvocab.info/ElementsGr2/biographicalInformation
"
,
"
http://www.w3.org/2000/01/rdf-schema#comment
"
,
"
http://purl.org/dc/terms/abstract
"
,
"
http://dbpedia.org/ontology/abstract
"
],
[
"
http://dbpedia.org/ontology/birthDate
"
,
"
http://vocab.org/bio/0.1/birth
"
],
[
"
http://dbpedia.org/ontology/birthPlace
"
],
[
"
http://dbpedia.org/ontology/deathDate
"
,
"
http://vocab.org/bio/0.1/death
"
],
[
"
http://dbpedia.org/ontology/deathPlace
"
],
[
"
http://dbpedia.org/ontology/influenced
"
],
[
"
http://dbpedia.org/ontology/influencedBy
"
],
[
"
http://dbpedia.org/ontology/notableWork
"
,
"
http://data.bnf.fr/vocabulary/roles/r70
"
,
"
http://id.loc.gov/vocabulary/relators/aut
"
,
"
http://purl.org/dc/terms/contributor
"
],
// Creator
[
"
http://rdfs.org/sioc/types#has_creator
"
,
"
http://purl.org/dc/elements/1.1/creator
"
,
"
http://purl.org/dc/terms/creator
"
,
"
http://purl.org/dc/terms/contributor
"
,
"
http://dbpedia.org/ontology/author
"
,
"
http://dbpedia.org/ontology/writer
"
,
"
http://dbpedia.org/ontology/composer
"
,
"
http://dbpedia.org/ontology/musicComposer
"
,
"
http://id.loc.gov/vocabulary/relators/aut
"
],
[
"
http://purl.org/ontology/bibo/Book
"
,
"
http://schema.org/Book
"
,
"
http://umbel.org/umbel/rc/Book_CW
"
,
"
http://dbpedia.org/ontology/Book
"
,
"
http://dbpedia.org/ontology/WrittenWork
"
],
// Object title
[
"
http://www.w3.org/2000/01/rdf-schema#label
"
,
"
http://dbpedia.org/property/title
"
,
"
http://dbpedia.org/property/name
"
,
"
http://purl.org/dc/elements/1.1/title
"
,
"
http://purl.org/dc/terms/title
"
],
[
"
http://dbpedia.org/ontology/abstract
"
],
[
"
http://www.w3.org/2000/01/rdf-schema#comment
"
],
[
"
http://dbpedia.org/ontology/publisher
"
,
"
http://purl.org/dc/elements/1.1/publisher
"
],
[
"
http://dbpedia.org/property/releaseDate
"
],
[
"
http://data.semanticweb.org/ns/swc/ontology#ConferenceEvent
"
],
[
"
http://data.semanticweb.org/ns/swc/ontology#TrackEvent
"
],
[
"
http://data.semanticweb.org/ns/swc/ontology#TalkEvent
"
],
[
"
http://data.semanticweb.org/ns/swc/ontology#hasAcronym
"
],
[
"
http://swrc.ontoware.org/ontology#isSuperEventOf
"
],
[
"
http://data.semanticweb.org/ns/swc/ontology#isPartOf
"
],
[
"
http://swrc.ontoware.org/ontology#abstract
"
],
[
"
http://swrc.ontoware.org/ontology#author
"
],
[
"
http://data.semanticweb.org/ns/swc/ontology#hasRelatedDocument
"
],
[
"
http://purl.org/dc/elements/1.1/title
"
],
[
"
http://www.w3.org/2002/12/cal/ical#dtstart
"
],
[
"
http://www.w3.org/2002/12/cal/ical#date
"
],
[
"
http://www.w3.org/2002/12/cal/ical#dtend
"
],
[
"
http://www.w3.org/2002/12/cal/ical#url
"
],
// description or object content
[
"
http://ns.cubicweb.org/cubicweb/0.0/content
"
,
"
http://purl.org/dc/elements/1.1/description
"
,
"
http://purl.org/dc/terms/description
"
,
"
http://rdfs.org/sioc/types#content
"
],
// date (of creation)
[
"
http://ns.cubicweb.org/cubicweb/0.0/creation_date
"
,
"
http://purl.org/dc/elements/1.1/date
"
,
"
http://purl.org/dc/terms/date
"
],
[
"
http://ns.cubicweb.org/cubicweb/0.0/BlogEntry
"
,
"
http://rdfs.org/sioc/types#BlogPost
"
]
];
export
function
httpsAlias
(
uri
:
string
)
{
if
(
uri
.
startsWith
(
"
https
"
))
{
return
[
uri
,
uri
.
replace
(
"
https
"
,
"
http
"
)];
}
return
[
uri
,
uri
.
replace
(
"
http
"
,
"
https
"
)];
}
src/common/inverses.ts
0 → 100644
View file @
f0b4207b
export
const
INVERSES
=
{
"
http://dbpedia.org/ontology/influenced
"
:
"
http://dbpedia.org/ontology/influencedBy
"
,
"
http://dbpedia.org/ontology/notableWork
"
:
"
http://purl.org/dc/terms/creator
"
};
src/common/schema.ts
View file @
f0b4207b
...
...
@@ -19,126 +19,15 @@
******************************************************************************/
import
{
application
,
rdfMeta
}
from
"
@logilab/libview
"
;
import
{
ALIASES
}
from
"
./aliases
"
;
import
{
INVERSES
}
from
"
./inverses
"
;
/**
* The main ontology for the views
*/
export
const
ONTOLOGY
:
rdfMeta
.
Ontology
=
{
aliases
:
[
[
"
http://xmlns.com/foaf/0.1/Person
"
,
"
http://dbpedia.org/ontology/Person
"
,
"
http://purl.org/dc/terms/Agent
"
],
[
"
http://xmlns.com/foaf/0.1/title
"
],
[
"
http://xmlns.com/foaf/0.1/gender
"
],
[
"
http://xmlns.com/foaf/0.1/nick
"
],
[
"
http://xmlns.com/foaf/0.1/name
"
,
"
http://www.w3.org/2000/01/rdf-schema#label
"
],
[
"
http://xmlns.com/foaf/0.1/firstName
"
,
"
http://xmlns.com/foaf/0.1/givenName
"
,
"
http://xmlns.com/foaf/0.1/givenName
"
],
[
"
http://xmlns.com/foaf/0.1/lastName
"
,
"
http://xmlns.com/foaf/0.1/familyName
"
],
[
"
http://xmlns.com/foaf/0.1/phone
"
],
[
"
http://xmlns.com/foaf/0.1/homepage
"
,
"
http://dbpedia.org/ontology/wikiPageExternalLink
"
,
"
http://xmlns.com/foaf/0.1/isPrimaryTopicOf
"
],
[
"
http://xmlns.com/foaf/0.1/weblog
"
],
[
"
http://xmlns.com/foaf/0.1/openid
"
],
[
"
http://xmlns.com/foaf/0.1/made
"
,
"
http://dbpedia.org/ontology/soundRecording
"
],
[
"
http://xmlns.com/foaf/0.1/maker
"
],
[
"
http://xmlns.com/foaf/0.1/img
"
,
"
http://xmlns.com/foaf/0.1/depiction
"
],
[
"
http://xmlns.com/foaf/0.1/thumbnail
"
,
"
http://dbpedia.org/ontology/thumbnail
"
],
[
"
http://xmlns.com/foaf/0.1/knows
"
],
[
"
http://xmlns.com/foaf/0.1/interest
"
],
[
"
http://xmlns.com/foaf/0.1/topic_interest
"
],
[
"
http://xmlns.com/foaf/0.1/publications
"
],
[
"
http://xmlns.com/foaf/0.1/currentProject
"
],
[
"
http://xmlns.com/foaf/0.1/birthday
"
],
[
"
http://xmlns.com/foaf/0.1/age
"
],
[
"
http://xmlns.com/foaf/0.1/status
"
],
[
"
http://rdvocab.info/ElementsGr2/biographicalInformation
"
,
"
http://www.w3.org/2000/01/rdf-schema#comment
"
,
"
http://purl.org/dc/terms/abstract
"
,
"
http://dbpedia.org/ontology/abstract
"
],
[
"
http://dbpedia.org/ontology/birthDate
"
,
"
http://vocab.org/bio/0.1/birth
"
],
[
"
http://dbpedia.org/ontology/birthPlace
"
],
[
"
http://dbpedia.org/ontology/deathDate
"
,
"
http://vocab.org/bio/0.1/death
"
],
[
"
http://dbpedia.org/ontology/deathPlace
"
],
[
"
http://dbpedia.org/ontology/influenced
"
],
[
"
http://dbpedia.org/ontology/influencedBy
"
],
[
"
http://dbpedia.org/ontology/notableWork
"
,
"
http://data.bnf.fr/vocabulary/roles/r70
"
,
"
http://id.loc.gov/vocabulary/relators/aut
"
,
"
http://purl.org/dc/terms/contributor
"
],
[
"
http://purl.org/dc/terms/creator
"
,
"
http://purl.org/dc/terms/contributor
"
,
"
http://dbpedia.org/ontology/author
"
,
"
http://dbpedia.org/ontology/writer
"
,
"
http://dbpedia.org/ontology/composer
"
,
"
http://dbpedia.org/ontology/musicComposer
"
,
"
http://id.loc.gov/vocabulary/relators/aut
"
],
[
"
http://purl.org/ontology/bibo/Book
"
,
"
http://schema.org/Book
"
,
"
http://umbel.org/umbel/rc/Book_CW
"
,
"
http://dbpedia.org/ontology/Book
"
,
"
http://dbpedia.org/ontology/WrittenWork
"
],
[
"
http://www.w3.org/2000/01/rdf-schema#label
"
,
"
http://dbpedia.org/property/title
"
,
"
http://dbpedia.org/property/name
"
],
[
"
http://dbpedia.org/ontology/abstract
"
],
[
"
http://www.w3.org/2000/01/rdf-schema#comment
"
],
[
"
http://dbpedia.org/ontology/publisher
"
,
"
http://purl.org/dc/elements/1.1/publisher
"
],
[
"
http://dbpedia.org/property/releaseDate
"
],
[
"
http://data.semanticweb.org/ns/swc/ontology#ConferenceEvent
"
],
[
"
http://data.semanticweb.org/ns/swc/ontology#TrackEvent
"
],
[
"
http://data.semanticweb.org/ns/swc/ontology#TalkEvent
"
],
[
"
http://data.semanticweb.org/ns/swc/ontology#hasAcronym
"
],
[
"
http://swrc.ontoware.org/ontology#isSuperEventOf
"
],
[
"
http://data.semanticweb.org/ns/swc/ontology#isPartOf
"
],
[
"
http://swrc.ontoware.org/ontology#abstract
"
],
[
"
http://swrc.ontoware.org/ontology#author
"
],
[
"
http://data.semanticweb.org/ns/swc/ontology#hasRelatedDocument
"
],
[
"
http://purl.org/dc/elements/1.1/title
"
],
[
"
http://www.w3.org/2002/12/cal/ical#dtstart
"
],
[
"
http://www.w3.org/2002/12/cal/ical#date
"
],
[
"
http://www.w3.org/2002/12/cal/ical#dtend
"
],
[
"
http://www.w3.org/2002/12/cal/ical#url
"
]
],
inverses
:
{
"
http://dbpedia.org/ontology/influenced
"
:
"
http://dbpedia.org/ontology/influencedBy
"
,
"
http://dbpedia.org/ontology/notableWork
"
:
"
http://purl.org/dc/terms/creator
"
}
aliases
:
ALIASES
,
inverses
:
INVERSES
};
/**
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment