dipper.utils.GraphUtils module

class dipper.utils.GraphUtils.GraphUtils(curie_map)

Bases: object

static add_property_axioms(graph, properties)
static add_property_to_graph(results, graph, property_type, property_list)
digest_id()

Form a deterministic digest of input Leading ‘b’ is an experiment forcing the first char to be non numeric but valid hex Not required for RDF but some other contexts do not want the leading char to be a digit

: param str wordage arbitrary string : return str

static get_properties_from_graph(graph)

Wrapper for RDFLib.graph.predicates() that returns a unique set :param graph: RDFLib.graph :return: set, set of properties

write(graph, fileformat=None, file=None)

A basic graph writer (to stdout) for any of the sources. this will write raw triples in rdfxml, unless specified. to write turtle, specify format=’turtle’ an optional file can be supplied instead of stdout :return: None