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
83187f1d0bbd
Commit
56ce3792
authored
Mar 23, 2020
by
Élodie Thiéblin
Browse files
[DublinCore] Put dc rdfmeta schema in separated file
parent
f0b4207bb31f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/dublincore/dcschema.ts
0 → 100644
View file @
83187f1d
import
{
rdfMeta
,
application
}
from
"
@logilab/libview
"
;
import
{
ONTOLOGY
}
from
"
../common/schema
"
;
/**
* The data for DublinCore Elements metadata
*/
export
interface
DublinCoreElement
extends
rdfMeta
.
Loadable
{
title
:
string
;
description
:
string
;
creator
:
string
;
date
:
string
;
}
/**
* The metaclass for DublinCore Element
*/
const
DCE_METACLASS
=
new
rdfMeta
.
MetaClass
();
DCE_METACLASS
.
properties
=
[
new
rdfMeta
.
MetaPropertyData
(
"
title
"
,
"
http://purl.org/dc/elements/1.1/title
"
),
new
rdfMeta
.
MetaPropertyData
(
"
description
"
,
"
http://purl.org/dc/elements/1.1/description
"
),
new
rdfMeta
.
MetaPropertyData
(
"
creator
"
,
"
http://purl.org/dc/elements/1.1/creator
"
),
new
rdfMeta
.
MetaPropertyData
(
"
date
"
,
"
http://purl.org/dc/elements/1.1/date
"
)
];
/**
* Loads the data for the entity of interest
* @param renderer The current renderer
* @param context The current rendering context
* @param target The current RDF entity to be rendered
*/
export
function
loadDublinCoreElement
(
renderer
:
application
.
ViewRenderer
,
context
:
application
.
RenderingContext
,
target
:
application
.
Resource
):
DublinCoreElement
{
return
rdfMeta
.
loadEntity
(
renderer
,
context
,
ONTOLOGY
,
DCE_METACLASS
,
target
);
}
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