add triple by providing p,o, assumes s = subject

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

		Returns:
			None: adds triple to self.rdf.graph
183905
def add_triple(self, p, o, auto_refresh=True):

		'''
		
		'''

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

		# determine if triples refreshed
		self._handle_triple_refresh(auto_refresh)
540313
def <<(statement)
      # ActiveTriples::Resource expects: RDF::Statement, Hash, or Array
      statement = RDF::Statement.from(statement) unless statement.is_a? RDF::Statement

      # Only push statement if the statement's predicate is defined on the class
      field_name = field_from_predicate(statement.predicate)
      return unless field_name

      objects = statement.object.is_a?(RDF::Node) && block_given? ? yield : statement.object

      update_field(field_name, *objects) if fields[field_name]
      update_relation(field_name, *objects) if relations[field_name]
    end
362157
def add_vertex(self, vertex, **attr):
        
        self.vertices[vertex] = []
        if attr:
            self.nodes[vertex] = attr
1044215
def _post_create(self, auto_refresh=False):

		'''
		
		'''

		# set PCDM triple as Collection
		self.add_triple(self.rdf.prefixes.rdf.type, self.rdf.prefixes.pcdm.Collection)
		self.update(auto_refresh=auto_refresh)

		# create /members child resource
		members_child = PCDMMembersContainer(
			self.repo,
			'%s/members' % self.uri_as_string(),
			membershipResource=self.uri,
			hasMemberRelation=self.rdf.prefixes.pcdm.hasMember,
			insertedContentRelation=self.rdf.prefixes.ore.proxyFor)
		members_child.create(specify_uri=True)

		# create /related child resource
		related_child = PCDMRelatedContainer(
			self.repo,
			'%s/related' % self.uri_as_string(),
			membershipResource=self.uri,
			hasMemberRelation=self.rdf.prefixes.ore.aggregates,
			insertedContentRelation=self.rdf.prefixes.ore.proxyFor)
		related_child.create(specify_uri=True)
1171220
def rdf_insert(uriS, uriP, uriO)
      @rdf.insert RDF::Statement(uriS, uriP, uriO)
    end
831538
def _detailTuples(self, uriRefs):
        
        details = []
        for uriRef in uriRefs:
            for subject, predicate, object_ in self._rdfGraph.triples(
                    (uriRef, None, None)):
                details.append({
                    'subject': subject.toPython(),
                    'predicate': predicate.toPython(),
                    'object': object_.toPython()
                })
        return details
1176952
def add_dr( self, dr ):
         
        this_bin = int( dr / self.dr ) 
        if this_bin > self.number_of_bins:
            raise IndexError( 'dr is larger than rdf max_r' )
        self.data[ this_bin ] += 1
487246
def add_chain(self, *nodes, _input=BEGIN, _output=None, _name=None):
        
        if len(nodes):
            _input = self._resolve_index(_input)
            _output = self._resolve_index(_output)
            _first = None
            _last = None

            for i, node in enumerate(nodes):
                _last = self.add_node(node)
                if not i and _name:
                    if _name in self.named:
                        raise KeyError("Duplicate name {!r} in graph.".format(_name))
                    self.named[_name] = _last
                if _first is None:
                    _first = _last
                self.outputs_of(_input, create=True).add(_last)
                _input = _last

            if _output is not None:
                self.outputs_of(_input, create=True).add(_output)

            if hasattr(self, "_topologcally_sorted_indexes_cache"):
                del self._topologcally_sorted_indexes_cache

            return GraphRange(self, _first, _last)
        return GraphRange(self, None, None)
554434
public function add(\core_kernel_classes_Triple $triple) {
        switch ($triple->predicate) {
        	case OntologyRdf::RDF_TYPE :
                $resource = new \core_kernel_classes_Resource($triple->subject);
        	    $class = new \core_kernel_classes_Class($triple->object);
        	    return $this->rdfsInterface->getResourceImplementation()->setType($resource, $class);
        	    break;
        	    
    	    case OntologyRdfs::RDFS_RANGE :
    	        $resource = new \core_kernel_classes_Property($triple->subject);
    	        $class = new \core_kernel_classes_Class($triple->object);
        	    return $this->rdfsInterface->getPropertyImplementation()->setRange($resource, $class);
        	    break;
        	    
        	case GenerisRdf::PROPERTY_MULTIPLE :
        	    $resource = new \core_kernel_classes_Property($triple->subject);
        	    $value = $triple->object == GenerisRdf::GENERIS_TRUE;
        	    return $this->rdfsInterface->getPropertyImplementation()->setMultiple($resource, $value);
        	    break;
        	    
    	    case GenerisRdf::PROPERTY_IS_LG_DEPENDENT :
    	        $resource = new \core_kernel_classes_Property($triple->subject);
        	    $value = $triple->object == GenerisRdf::GENERIS_TRUE;
        	    return $this->rdfsInterface->getPropertyImplementation()->setLgDependent($resource, $value);
        	    break;
    	        
	        case OntologyRdfs::RDFS_DOMAIN :
	        default:
	            $resource = new \core_kernel_classes_Resource($triple->subject);
	            $property = new \core_kernel_classes_Property($triple->predicate);
	            if (empty($triple->lg)) {
	                return $this->rdfsInterface->getResourceImplementation()->setPropertyValue($resource, $property, $triple->object);
	            }  else {
	                return $this->rdfsInterface->getResourceImplementation()->setPropertyValueByLg($resource, $property, $triple->object, $triple->lg);
	            }
        }
    }
1069719
private void addMethodDefTriples(URIReference objURI,
                                     DOReader reader,
                                     Set<Triple> set)
            throws ResourceIndexException {
        try {
            for (MethodDef element : getAbstractMethods(reader)) {
                add(objURI, MODEL.DEFINES_METHOD, element.methodName, set);
            }
        } catch (ResourceIndexException e) {
            throw e;
        } catch (Exception e) {
            throw new ResourceIndexException("Error adding method def "
                    + "triples", e);
        }
    }
733941
def add_triple(self, subj, pred, obj):
        '''  '''
        subj_data, pred_data, obj_data = self.are_ilx([subj, pred, obj])
        # RELATIONSHIP PROPERTY
        if subj_data.get('id') and pred_data.get('id') and obj_data.get('id'):
            if pred_data['type'] != 'relationship':
                return self.test_check('Adding a relationship as formate \
                                       "term1_ilx relationship_ilx term2_ilx"')
            return self.add_relationship(term1=subj_data,
                                         relationship=pred_data,
                                         term2=obj_data)
        # ANNOTATION PROPERTY
        elif subj_data.get('id') and pred_data.get('id'):
            if pred_data['type'] != 'annotation':
                return self.test_check('Adding a relationship as formate \
                                       "term_ilx annotation_ilx value"')
            return self.add_annotation(entity=subj_data,
                                       annotation=pred_data,
                                       value=obj)
        # UPDATE ENTITY
        elif subj_data.get('id'):
            data = subj_data
            _pred = self.ttl2sci_map.get(pred)
            if not _pred:
                error = pred + " doesnt not have correct RDF format or It is not an option"
                return self.test_check(error)
            data = self.custom_update(data, _pred, obj)
            if data == 'failed':  # for debugging custom_update
                return data
            data = superclasses_bug_fix(data)
            url_base = self.base_path + 'term/edit/{id}'
            url = url_base.format(id=data['id'])
            return self.post(url, data)
        else:
            return self.test_check('The ILX ID(s) provided do not exist')
1327543
def _post_create(self, auto_refresh=False):

		'''
		
		'''

		# set PCDM triple as Object
		self.add_triple(self.rdf.prefixes.rdf.type, self.rdf.prefixes.pcdm.Object)
		self.update(auto_refresh=auto_refresh)

		# create /files child resource
		files_child = PCDMFilesContainer(
			self.repo,
			'%s/files' % self.uri_as_string(),
			membershipResource=self.uri,
			hasMemberRelation=self.rdf.prefixes.pcdm.hasFile)
		files_child.create(specify_uri=True)

		# create /members child resource
		members_child = PCDMMembersContainer(
			self.repo,
			'%s/members' % self.uri_as_string(),
			membershipResource=self.uri,
			hasMemberRelation=self.rdf.prefixes.pcdm.hasMember,
			insertedContentRelation=self.rdf.prefixes.ore.proxyFor)
		members_child.create(specify_uri=True)

		# create /related child resource
		related_child = PCDMRelatedContainer(
			self.repo,
			'%s/related' % self.uri_as_string(),
			membershipResource=self.uri,
			hasMemberRelation=self.rdf.prefixes.ore.aggregates,
			insertedContentRelation=self.rdf.prefixes.ore.proxyFor)
		related_child.create(specify_uri=True)

		# create /associated child resource
		associated_child = PCDMAssociatedContainer(
			self.repo,
			'%s/associated' % self.uri_as_string(),
			membershipResource=self.uri,
			hasMemberRelation=self.rdf.prefixes.pcdm.hasRelatedFile)
		associated_child.create(specify_uri=True)
18160
def add_ap(self, id_, label=None, addPrefix=True):
        
        self.add_trip(id_, rdf.type, owl.AnnotationProperty)
        if label:
            self.add_trip(id_, rdfs.label, label)
            if addPrefix:
                prefix = ''.join([s.capitalize() for s in label.split()])
                namespace = self.expand(id_)
                self.add_namespace(prefix, namespace)
223352
def addPeer(self):
        
        self._openRepo()
        try:
            peer = peers.Peer(
                self._args.url, json.loads(self._args.attributes))
        except exceptions.BadUrlException:
            raise exceptions.RepoManagerException("The URL for the peer was "
                                                  "malformed.")
        except ValueError as e:
            raise exceptions.RepoManagerException(
                "The attributes message "
                "was malformed. {}".format(e))
        self._updateRepo(self._repo.insertPeer, peer)
777139
def add(self, subj: Node, pred: URIRef, obj: Node) -> "FHIRResource":
        
        self._g.add((subj, pred, obj))
        return self
916695
def fetch_cached_graph(rdf_url)
      statements = @client.get_statements(subject: rdf_url.to_s)
      if statements.count == 0
        puts "[INFO] fetch_cached_graph(#{rdf_url.to_s}) not found in triplestore cache (#{@client.url})"
        return nil
      end
      RDF::Graph.new.insert(*statements)
    end
936738
def add(self, schema, data):
        
        binding = self.get_binding(schema, data)
        uri, triples = triplify(binding)
        for triple in triples:
            self.graph.add(triple)
        return uri