def transform_literals(rdf, literalmap):
affected_types = (SKOS.Concept, SKOS.Collection,<EOL>SKOSEXT.DeprecatedConcept)<EOL>props = set()<EOL>for t in affected_types:<EOL><INDENT>for conc in rdf.subjects(RDF.type, t):<EOL><INDENT>for p, o in rdf.predicate_objects(conc):<EOL><INDENT>if isinstance(o, Literal)and (p in literalmap or not in_general_ns(p)):<EOL><INDENT>props.add(p)<EOL><DEDENT><DEDENT><DEDENT><DEDENT>for p in props:<EOL><INDENT>if mapping_match(p, literalmap):<EOL><INDENT>newval = mapping_get(p, literalmap)<EOL>newuris = [v[<NUM_LIT:0>] for v in newval]<EOL>logging.debug("<STR_LIT>", p, str(newuris))<EOL>replace_predicate(<EOL>rdf, p, newuris, subjecttypes=affected_types)<EOL><DEDENT>else:<EOL><INDENT>logging.info("<STR_LIT>", p)<EOL><DEDENT><DEDENT>
Transform literal properties of Concepts, as defined by config file.