Skip to content

Commit

Permalink
Using CSIPVocabularyContentCategory and CSIPVocabularyContentInformat…
Browse files Browse the repository at this point in the history
…ionType terms
  • Loading branch information
shsdev committed Nov 28, 2024
1 parent 5716998 commit 1473fe1
Show file tree
Hide file tree
Showing 11 changed files with 436 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [0.2.8] - 2024-11-28

### Changed
- **CSIPVocabularyContentCategory** resource added, function for using dictionary and or term list added
- **CSIPVocabularyContentInformationType** resource added, function for using dictionary and or term list added

## [0.2.7] - 2024-11-25
### Changed
- **Pairtree** as directory-based storage with differential versioning.
Expand Down
6 changes: 3 additions & 3 deletions eatb/metadata/mets_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def addChildRelation(self, identifier):
else:
logger.debug('Couldn\'t find the parent %ss Mets file.' % packagetype)

def createMets(self, mets_data, mets_file_path=None):
def createMets(self, mets_data, mets_file_path=None, additional_metadata={}):
self.mets_data = mets_data
packageid = mets_data['packageid']
packagetype = mets_data['type']
Expand All @@ -192,8 +192,8 @@ def createMets(self, mets_data, mets_file_path=None):
METS_ATTRIBUTES = {"OBJID": packageid,
"LABEL": "METS file describing the %s matching the OBJID." % packagetype,
"PROFILE": PROFILE_XML,
"TYPE": "Databases",
q(CSIP_NS, "CONTENTINFORMATIONTYPE"): "SIARD2"}
"TYPE": additional_metadata["content_category"] if "content_category" in additional_metadata else "Mixed",
q(CSIP_NS, "CONTENTINFORMATIONTYPE"): additional_metadata["content_information_type"] if "content_information_type" in additional_metadata else "MIXED"}
root = M.mets(METS_ATTRIBUTES)

if os.path.isfile(os.path.join(schemafolder, 'mets.xsd')):
Expand Down
4 changes: 2 additions & 2 deletions eatb/oais_ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class OAISPackageType(Enum):


def create_sip(package_dir: str, package_name: str, identifier: str, generate_premis: bool=True,
generate_package: bool=True, custom_logger=None) -> bool:
generate_package: bool=True, additional_metadata={}, custom_logger=None) -> bool:

logger = custom_logger if custom_logger else LOGGER

Expand Down Expand Up @@ -75,7 +75,7 @@ def create_sip(package_dir: str, package_name: str, identifier: str, generate_pr
'parent': ''}
metsgen = MetsGenerator(rep_path)

metsgen.createMets(mets_data)
metsgen.createMets(mets_data=mets_data, mets_file_path=None, additional_metadata=additional_metadata)
if generate_premis:
# PREMIS
premisgen = PremisGenerator(package_dir)
Expand Down
249 changes: 249 additions & 0 deletions eatb/resources/vocabularies/CSIPVocabularyContentCategory.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="DILCISVocabularies.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<Vocabularies xmlns="https://DILCIS.eu/XML/Vocabularies/IP">
<Vocabulary Name="VocabularyContentCategory">
<Information>
<p>Vocabulary derived from http://www.loc.gov/preservation/resources/rfs/TOC.html and http://www.dublincore.org/documents/dcmi-type-vocabulary/</p>
<p>Values are mixed and the terms "Mixed" and "Other" are derived from E-ARK</p>
</Information>
<Entry>
<Term lang="en">Textual works – Print</Term>
<Definition>Books, musical compositions, etc.</Definition>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Textual works – Digital</Term>
<Definition>Electronic books, etc.</Definition>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Textual works – Electronic Serials</Term>
<Definition>A journal, etc.</Definition>
<RevisionInformation RevisionDate="2024-05-17">Addition of description</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Digital Musical Composition (score-based representations)</Term>
<Definition/>
<RevisionInformation RevisionDate="2024-05-17">This value is from an old version of the LoC list</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Musical Scores - Print</Term>
<Definition>A printed version of a musical score</Definition>
<RevisionInformation RevisionDate="2024-05-17">Value added from the LoC value list</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Musical Scores - Digital</Term>
<Definition>A digital version of a musical score</Definition>
<RevisionInformation RevisionDate="2024-05-17">Value added from the LoC value list</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Photographs – Print</Term>
<Definition>A printed version of the photograph</Definition>
<RevisionInformation RevisionDate="2024-05-17">Addition of description</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Photographs – Digital</Term>
<Definition>A digital version of the photograph</Definition>
<RevisionInformation RevisionDate="2024-05-17">Addition of description</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Other Graphic Images – Print</Term>
<Definition>A printed version of a Posters, architectural drawings, postcards, maps, fine prints, etc.</Definition>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Other Graphic Images – Digital</Term>
<Definition>A digital version of a Posters, architectural drawings, postcards, maps, fine prints, etc.</Definition>
<RevisionInformation RevisionDate="2024-05-17">Addition of description</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Microforms</Term>
<Definition>A print in the form of a roll microfilm</Definition>
<RevisionInformation RevisionDate="2024-05-17">Addition of description</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Audio – On Tangible Medium (digital or analog)</Term>
<Definition>Audio on a media</Definition>
<RevisionInformation RevisionDate="2024-05-17">Addition of description</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Audio – Media-independent (digital)</Term>
<Definition>A digital audio version</Definition>
<RevisionInformation RevisionDate="2024-05-17">Addition of description</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Motion Pictures – Digital and Physical Media</Term>
<Definition>Theatrically released films</Definition>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Video – File-based and Physical Media</Term>
<Definition>Final production version with the original production resolution and frame rate (i.e. 1080p24; 720p60, etc.) and file-based format that was delivered to the content distributor</Definition>
<RevisionInformation RevisionDate="2024-05-17">Addition of description</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Software</Term>
<Definition>Software, electronic gaming and learning</Definition>
<Source>Dublin Core value list</Source>
</Entry>
<Entry>
<Term lang="en">Software and Video Games</Term>
<Definition>This category includes software and games for desktop and mobile/handheld systems and video gaming consoles. Note: Games for gaming consoles often require submission of the proprietary platform as well (e.g., game console) or a virtual or emulated version of the proprietary platform that runs on a commonly available operating system.</Definition>
<RevisionInformation RevisionDate="2024-05-17">Value added from the LoC value list</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Email</Term>
<Definition>Email</Definition>
<RevisionInformation RevisionDate="2024-05-17">Value added from the LoC value list</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Datasets</Term>
<Definition>Data encoded in a defined structure.</Definition>
<Source>Dublin Core value list and LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Geospatial Data</Term>
<Definition/>
<RevisionInformation RevisionDate="2024-05-17">This value is from an old version of the LoC list</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Geographic Information System (GIS) - Vector Data</Term>
<Definition>Most complete data (all layers, appendices), even if proprietary, with a preference for preserving the native format and projection of the data</Definition>
<RevisionInformation RevisionDate="2024-05-17">Value added from the LoC value list</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">GIS Raster and Georeferenced Images</Term>
<Definition>GIS in raster form</Definition>
<RevisionInformation RevisionDate="2024-05-17">Value added from the LoC value list</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">GIS Vector and Raster Combined</Term>
<Definition>GIS in a combination of vector and raster form</Definition>
<RevisionInformation RevisionDate="2024-05-17">Value added from the LoC value list</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Non-GIS Cartographic</Term>
<Definition>Maps and other cartographic materials produced outside of Geographic Information Systems, or which have been published and disseminated primarily as image or textual works. </Definition>
<RevisionInformation RevisionDate="2024-05-17">Value added from the LoC value list</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">2D and 3D Computer Aided Design</Term>
<Definition>2D and 3D designs</Definition>
<RevisionInformation RevisionDate="2024-05-17">Value added from the LoC value list</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Design (schematics, architectural drawings) - Print</Term>
<Definition>Printed designs</Definition>
<RevisionInformation RevisionDate="2024-05-17">Value added from the LoC value list</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Scanned 3D Objects (output from photogrammetry scanning)</Term>
<Definition>Scanned 3D objects</Definition>
<RevisionInformation RevisionDate="2024-05-17">Value added from the LoC value list</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Databases</Term>
<Definition>A complete set of the content contained within the database</Definition>
<RevisionInformation RevisionDate="2024-05-17">Addition of description</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Websites</Term>
<Definition>Archived web content.</Definition>
<RevisionInformation RevisionDate="2024-05-17">This value is from an old version of the LoC value list list</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Web Archives</Term>
<Definition>Archived web content.</Definition>
<RevisionInformation RevisionDate="2024-05-17">Value added from the LoC value list</RevisionInformation>
<Source>LoC value list</Source>
</Entry>
<Entry>
<Term lang="en">Collection</Term>
<Definition>An aggregation of resources.</Definition>
<Source>Dublin Core value list</Source>
</Entry>
<Entry>
<Term lang="en">Event</Term>
<Definition>A non-persistent, time-based occurrence, e.g. exhibition, webcast, etc..</Definition>
<Source>Dublin Core value list</Source>
</Entry>
<Entry>
<Term lang="en">Image</Term>
<Definition>A visual representation other than text.</Definition>
<RevisionInformation RevisionDate="2024-05-17">Value added from DublinCore value list</RevisionInformation>
<Source>Dublin Core value list</Source>
</Entry>
<Entry>
<Term lang="en">Interactive resource</Term>
<Definition>A resource requiring interaction from the user to be understood, executed, or experienced.</Definition>
<Source>Dublin Core value list</Source>
</Entry>
<Entry>
<Term lang="en">Moving image</Term>
<Definition>A series of visual representations imparting an impression of motion when shown in succession.</Definition>
<RevisionInformation RevisionDate="2024-05-17">Value added from DublinCore value list</RevisionInformation>
<Source>Dublin Core value list</Source>
</Entry>
<Entry>
<Term lang="en">Sound</Term>
<Definition>A resource primarily intended to be heard.</Definition>
<RevisionInformation RevisionDate="2024-05-17">Value added from DublinCore value list</RevisionInformation>
<Source>Dublin Core value list</Source>
</Entry>
<Entry>
<Term lang="en">Still image</Term>
<Definition>A static visual representation.</Definition>
<RevisionInformation RevisionDate="2024-05-17">Value added from DublinCore value list</RevisionInformation>
<Source>Dublin Core value list</Source>
</Entry>
<Entry>
<Term lang="en">Text</Term>
<Definition>A resource consisting primarily of words for reading.</Definition>
<RevisionInformation RevisionDate="2024-05-17">Value added from DublinCore value list</RevisionInformation>
<Source>Dublin Core value list</Source>
</Entry>
<Entry>
<Term lang="en">Physical object</Term>
<Definition>An inanimate, three-dimensional object or substance.</Definition>
<Source>Dublin Core value list</Source>
</Entry>
<Entry>
<Term lang="en">Service</Term>
<Definition>A system that provides one or more functions.</Definition>
<Source>Dublin Core value list</Source>
</Entry>
<Entry>
<Term lang="en">Mixed</Term>
<Definition>The package contains a mix of content types</Definition>
<Source>E-ARK value list</Source>
</Entry>
<Entry>
<Term lang="en">Other</Term>
<Definition>A term other than present in the vocabulary is used</Definition>
<Source>E-ARK value list</Source>
</Entry>
</Vocabulary>
</Vocabularies>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
HostUrl=https://earkcsip.dilcis.eu/schema/CSIPVocabularyContentCategory.xml
Loading

0 comments on commit 1473fe1

Please sign in to comment.