-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d2a7a99
commit 062d2ab
Showing
3 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/python | ||
''' | ||
This script demonstrates using the HeritagedataProvider with the | ||
eh_period conceptscheme already loaded. | ||
''' | ||
|
||
from skosprovider_heritagedata.providers import HeritagedataProvider | ||
from skosprovider_heritagedata.utils import CONCEPTSCHEMES | ||
|
||
cs_uri = 'http://purl.org/heritagedata/schemes/eh_period' | ||
|
||
periodprovider = HeritagedataProvider( | ||
{'id': 'Heritagedata'}, | ||
scheme_uri=cs_uri, | ||
concept_scheme = CONCEPTSCHEMES[cs_uri] | ||
) | ||
|
||
cs = periodprovider.concept_scheme | ||
|
||
print('Labels') | ||
print('------') | ||
for l in cs.labels: | ||
print(l.language + ': ' + l.label + ' [' + l.type + ']') | ||
print() | ||
|
||
print('Notes') | ||
print('-----') | ||
for n in cs.notes: | ||
print(n.language + ': ' + n.note + ' [' + n.type + ']') | ||
print() | ||
|
||
print('Sources') | ||
print('-------') | ||
for s in cs.sources: | ||
print(s.citation) | ||
print() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters