The surf.store Module

class surf.store.Store(reader=None, writer=None, *args, **kwargs)[source]

Bases: object

The Store class is comprised of a reader and a writer, getting access to an underlying triple store. Also store specific parameters must be handled by the class, the plugins act based on various settings.

The Store is also the plugin manager and provides convenience methods for working with plugins.

add_triple(s=None, p=None, o=None, context=None)[source]

See surf.plugin.writer.RDFWriter.add_triple() method.

clear(context=None)[source]

See surf.plugin.writer.RDFWriter.clear() method.

close()[source]

Close the store.

Both the reader and the writer plugins are closed. See surf.plugin.writer.RDFWriter.close() and surf.plugin.reader.RDFReader.close() methods.

concept(resource)[source]

surf.plugin.reader.RDFReader.concept() method.

enable_logging(enable)[source]

Toggle logging on or off.

execute(query)[source]

see surf.plugin.query_reader.RDFQueryReader.execute() method.

execute_sparql(sparql_query, format='JSON')[source]

see surf.plugin.query_reader.RDFQueryReader.execute_sparql() method.

get(resource, attribute, direct)[source]

surf.plugin.reader.RDFReader.get() method.

index_triples(**kwargs)[source]

See surf.plugin.writer.RDFWriter.index_triples() method.

instances_by_attribute(resource, attributes, direct, context)[source]

surf.plugin.reader.RDFReader.instances_by_attribute() method.

is_enable_logging()[source]

True if logging is enabled, False otherwise.

is_present(resource)[source]

surf.plugin.reader.RDFReader.is_present() method.

load(resource, direct)[source]

surf.plugin.reader.RDFReader.load() method.

load_triples(context=None, **kwargs)[source]

See surf.plugin.writer.RDFWriter.load_triples() method.

remove(*resources, **kwargs)[source]

See surf.plugin.writer.RDFWriter.remove() method.

remove_triple(s=None, p=None, o=None, context=None)[source]

See surf.plugin.writer.RDFWriter.remove_triple() method.

save(*resources)[source]

See surf.plugin.writer.RDFWriter.save() method.

set_triple(s=None, p=None, o=None, context=None)[source]

See surf.plugin.writer.RDFWriter.set_triple() method.

size()[source]

See surf.plugin.writer.RDFWriter.size() method.

update(*resources)[source]

See surf.plugin.writer.RDFWriter.update() method.

Previous topic

The surf.session Module

Next topic

The surf.util Module

This Page