swh.indexer.metadata_dictionary.composer module#

class swh.indexer.metadata_dictionary.composer.ComposerMapping(log_suffix='')[source]#

Bases: JsonMapping, SingleFileIntrinsicMapping

Dedicated class for Packagist(composer.json) mapping and translation

name = 'composer'#
mapping = {'author.email': rdflib.term.URIRef('http://schema.org/email'), 'author.name': rdflib.term.URIRef('http://schema.org/name'), 'authors': rdflib.term.URIRef('http://schema.org/author'), 'description': rdflib.term.URIRef('http://schema.org/description'), 'homepage': rdflib.term.URIRef('http://schema.org/url'), 'keywords': rdflib.term.URIRef('http://schema.org/keywords'), 'license': rdflib.term.URIRef('http://schema.org/license'), 'name': rdflib.term.URIRef('http://schema.org/name'), 'support.issues': rdflib.term.URIRef('https://codemeta.github.io/terms/issueTracker'), 'support.source': rdflib.term.URIRef('http://schema.org/codeRepository'), 'version': rdflib.term.URIRef('http://schema.org/version')}#
filename: bytes | Pattern[bytes] = b'composer.json'#
string_fields: List[str] = ['name', 'description', 'version', 'keywords', 'license', 'author', 'authors']#

List of fields that are simple strings, and don’t need any normalization.

uri_fields: List[str] = ['homepage']#

List of fields that are simple URIs, and don’t need any normalization.

normalize_license(s)[source]#
translate_authors(graph: Graph, root: URIRef, authors) None[source]#