remove triple by supplying p,o

		Args:
			p (rdflib.term.URIRef): predicate
			o (): object
			auto_refresh (bool): whether or not to update object-like self.rdf.triples

		Returns:
			None: removes triple from self.rdf.graph
439836
def remove_triple(self, p, o, auto_refresh=True):

		'''
		
		'''

		self.rdf.graph.remove((self.uri, p, self._handle_object(o)))

		# determine if triples refreshed
		self._handle_triple_refresh(auto_refresh)
736505
def _iter_metadata_triples(cls, metadata_archive_path):
        
        pg_rdf_regex = re.compile(r'pg\d+.rdf$')
        with closing(tarfile.open(metadata_archive_path)) as metadata_archive:
            for item in metadata_archive:
                if pg_rdf_regex.search(item.name):
                    with disable_logging():
                        extracted = metadata_archive.extractfile(item)
                        graph = Graph().parse(extracted)
                    for fact in graph:
                        if cls._metadata_is_invalid(fact):
                            logging.info('skipping invalid triple %s', fact)
                        else:
                            yield fact
136886
def removeOntology(self):
        
        self._openRepo()
        ontology = self._repo.getOntologyByName(self._args.ontologyName)

        def func():
            self._updateRepo(self._repo.removeOntology, ontology)
        self._confirmDelete("Ontology", ontology.getName(), func)
11884
function indexTriple(g, { subject, predicate, object }) {
  if (!workingPredicates.includes(predicate)) return;
  if (!(isIri(subject) && isIri(predicate)) || g[subject] && g[subject][predicate] && g[subject][predicate].includes(object)) return;

  upsert(g, subject, predicate, object);

  g.nTriples++;

  if (isIri(object)) upsert(g, object, `_${predicate}`, subject);
}
34407
def _post_create(self, auto_refresh=False):

		'''
		
		'''

		# set rdf type
		self.add_triple(self.rdf.prefixes.rdf.type, self.rdf.prefixes.ore.Proxy)

		# set triple for what this resource is a proxy for
		if self.proxyForURI:
			self.add_triple(self.rdf.prefixes.ore.proxyFor, self.proxyForURI)

		# if proxyIn set, add triple
		if self.proxyInURI:
			self.add_triple(self.rdf.prefixes.ore.proxyFor, self.proxyForURI)

		# update
		self.update(auto_refresh=auto_refresh)
895583
def _delete(self, **kwargs):
        
        requests_params = self._handle_requests_params(kwargs)

        delete_uri = self._meta_data['uri']
        session = self._meta_data['bigip']._meta_data['icr_session']
        response = session.delete(delete_uri, **requests_params)
        if response.status_code == 200 or 201:
            self.__dict__ = {'deleted': True}
704651
def removePeer(self):
        
        self._openRepo()

        def func():
            self._updateRepo(self._repo.removePeer, self._args.url)
        self._confirmDelete("Peer", self._args.url, func)
1303778
private Triple toTriple(TripleID tripleId) {
        return new Triple(
            dictionary.getNode(tripleId.getSubject(), TripleComponentRole.SUBJECT),
            dictionary.getNode(tripleId.getPredicate(), TripleComponentRole.PREDICATE),
            dictionary.getNode(tripleId.getObject(), TripleComponentRole.OBJECT)
        );
    }
713459
private Tuple3<ReadOnlyStyledDocument<PS, SEG, S>, RichTextChange<PS, SEG, S>, MaterializedListModification<Paragraph<PS, SEG, S>>> replace(
            BiIndex start, BiIndex end, UnaryOperator<ReadOnlyStyledDocument<PS, SEG, S>> f) {
        int pos = tree.getSummaryBetween(0, start.major).map(s -> s.length() + 1).orElse(0) + start.minor;

        List<Paragraph<PS, SEG, S>> removedPars =
                getParagraphs().subList(start.major, end.major + 1);

        return end.map(this::split).map((l0, r) -> {
            return start.map(l0::split).map((l, removed) -> {
                ReadOnlyStyledDocument<PS, SEG, S> replacement = f.apply(removed);
                ReadOnlyStyledDocument<PS, SEG, S> doc = l.concatR(replacement).concat(r);
                RichTextChange<PS, SEG, S> change = new RichTextChange<>(pos, removed, replacement);
                List<Paragraph<PS, SEG, S>> addedPars = doc.getParagraphs().subList(start.major, start.major + replacement.getParagraphCount());
                MaterializedListModification<Paragraph<PS, SEG, S>> parChange =
                        MaterializedListModification.create(start.major, removedPars, addedPars);
                return t(doc, change, parChange);
            });
        });
    }
937592
def removedirs_p(self):
        
        try:
            self.removedirs()
        except OSError:
            _, e, _ = sys.exc_info()
            if e.errno != errno.ENOTEMPTY and e.errno != errno.EEXIST:
                raise
        return self
765344
def removedirs_p(self):
        
        with contextlib.suppress(FileExistsError, DirectoryNotEmpty):
            with DirectoryNotEmpty.translate():
                self.removedirs()
        return self
1027572
def refresh(self, refresh_binary=True):

		'''
		
		'''

		updated_self = self.repo.get_resource(self.uri)

		# if resource type of updated_self != self, raise exception
		if not isinstance(self, type(updated_self)):
			raise Exception('Instantiated %s, but repository reports this resource is %s' % (type(updated_self), type(self)) )

		if updated_self:

			# update attributes
			self.status_code = updated_self.status_code
			self.rdf.data = updated_self.rdf.data
			self.headers = updated_self.headers
			self.exists = updated_self.exists

			# update graph if RDFSource
			if type(self) != NonRDFSource:
				self._parse_graph()

			# empty versions
			self.versions = SimpleNamespace()

			# if NonRDF, set binary attributes
			if type(updated_self) == NonRDFSource and refresh_binary:
				self.binary.refresh(updated_self)

			# fire resource._post_create hook if exists
			if hasattr(self,'_post_refresh'):
				self._post_refresh()

			# cleanup
			del(updated_self)

		else:
			logger.debug('resource %s not found, dumping values')
			self._empty_resource_attributes()
1346476
def triplify_object(binding):
    
    triples = []
    if binding.uri:
        triples.append((binding.subject, RDF.type, binding.uri))

    if binding.parent is not None:
        parent = binding.parent.subject
        if binding.parent.is_array:
            parent = binding.parent.parent.subject
        triples.append((parent, binding.predicate, binding.subject))
        if binding.reverse is not None:
            triples.append((binding.subject, binding.reverse, parent))

    for prop in binding.properties:
        _, prop_triples = triplify(prop)
        triples.extend(prop_triples)

    return binding.subject, triples
455123
void unlink(Node<E> p, Node<E> trail) {
        // assert isFullyLocked();
        // p.next is not changed, to allow iterators that are
        // traversing p to maintain their weak-consistency guarantee.
        p.item = null;
        trail.next = p.next;
        if (last == p)
            last = trail;
        if (count.getAndDecrement() == capacity)
            notFull.signal();
    }
1212433
def replace_uri(rdf, fromuri, touri):
    
    replace_subject(rdf, fromuri, touri)
    replace_predicate(rdf, fromuri, touri)
    replace_object(rdf, fromuri, touri)
836756
def triples(self, pattern: QueryTriple):
        
        self.total_calls += 1
        if self.graph_name is not None:
            gn = "?g" if not self.graph_name else self.graph_name
            gquery = f"graph {gn} {{"
            gqueryend = '}'
        else:
            gquery = gqueryend = ''
        if not self.already_resolved(pattern):
            subj = self._repr_element(pattern[0]) if pattern[0] is not None else '?s'
            pred = self._repr_element(pattern[1]) if pattern[1] is not None else '?p'
            obj = self._repr_element(pattern[2]) if pattern[2] is not None else '?o'
            query = f"SELECT ?s ?p ?o {{{gquery}{subj} {pred} {obj}{gqueryend}}}"
            start = time.time()
            if self.debug_slurps:
                print(f"SPARQL: ({query})", end="")
            self.sparql.setQuery(query)
            resp = self.sparql.query().convert()
            elapsed = time.time() - start
            ntriples = len(resp['results']['bindings'])
            self.total_slurptime += elapsed
            self.total_triples += ntriples
            self.total_queries += 1
            if self.debug_slurps:
                print(f" ({round(elapsed, 2)} secs) - {ntriples} triples")
            query_result = self._query_result_hook(self) if self._query_result_hook is not None else None
            for row in resp['results']['bindings']:
                triple = RDFTriple(pattern[0] if pattern[0] is not None else self._map_type(row['s']),
                                   pattern[1] if pattern[1] is not None else self._map_type(row['p']),
                                   pattern[2] if pattern[2] is not None else self._map_type(row['o']))
                self.add(triple)
                if query_result:
                    query_result.add(triple)
            if query_result:
                query_result.done()
            self.resolved_nodes.append(pattern)
        return super().triples(pattern)
476780
public static Graph filterTriples (
            final Iterator<Triple> triples,
            final Node... properties) {
        final Graph filteredGraph = new RandomOrderGraph(RandomOrderGraph.createDefaultGraph());
        final Sink<Triple> graphOutput = new SinkTriplesToGraph(true, filteredGraph);
        final RDFSinkFilter rdfFilter = new RDFSinkFilter(graphOutput, properties);
        rdfFilter.start();
        while (triples.hasNext()) {
            final Triple triple = triples.next();
            rdfFilter.triple(triple);
        }
        rdfFilter.finish();
        return filteredGraph;
    }