Get the entry's OpenGraph card
489664
def card(self):
        
        body, more, is_markdown = self._entry_content
        return TrueCallableProxy(
            self._get_card,
            body or more) if is_markdown else CallableProxy(None)
317586
public function opengraphImage()
    {
        $context = $this->contextObject();

        $img = null;
        if ($context instanceof HasOpenGraphInterface) {
            $img = (string)$context['opengraph_image'];
        }

        if (!$img) {
            $img = (string)$this->fallbackOpengraphImage();
        }

        if ($img) {
            $uri = $this->baseUrl();
            return $uri->withPath(strval($img));
        }

        return $this->metaImage();
    }
1239449
def get_named_graph(identifier, store_id=DEFAULT_STORE, create=True):
    
    if not isinstance(identifier, URIRef):
        identifier = URIRef(identifier)

    store = DjangoStore(store_id)
    graph = Graph(store, identifier=identifier)
    if graph.open(None, create=create) != VALID_STORE:
        raise ValueError("The store identified by {0} is not a valid store".format(store_id))
    return graph
916163
def retrieve(cls, *args, **kwargs):
        """"""
        return super(Card, cls).retrieve(*args, **kwargs)
368632
def get_entry(self, id_, scope=None):
        
        if id_[-1] in DEPRECATED_SUFFIXES:
            id_ = id_[:-1]  # Remove it

        if scope is not None:
            assert len(self.table) > scope
            return self[scope][id_]

        for sc in self:
            if sc[id_] is not None:
                return sc[id_]

        return None
693129
def get_card_list(self, openid, card_id=None):
        
        card_data = {
            'openid': openid
        }
        if card_id:
            card_data['card_id'] = card_id
        return self._post(
            'card/user/getcardlist',
            data=card_data
        )
606769
def get_match(self, match_key, card_type="full_card"):
        

        match_url = self.api_path + "match/" + match_key + "/"
        params = {}
        params["card_type"] = card_type
        response = self.get_response(match_url, params)
        return response
764048
def getEdge(self, _id):
        """"""
        try:
            edge = self.neograph.relationships.get(_id)
        except client.NotFoundError:
            return None
        return Edge(edge)
990326
function getCardId(o) {
  return o.master + '#' + o.combination.front.join(',') + '@' + o.combination.back.join(',');
}
780672
protected String getFacebookGraphEndpointUrl() {
    if (apiVersion.isUrlElementRequired()) {
      return getFacebookEndpointUrls().getGraphEndpoint() + '/' + apiVersion.getUrlElement();
    } else {
      return getFacebookEndpointUrls().getGraphEndpoint();
    }
  }
133067
def get_stats_punch_card(self):
        
        headers, data = self._requester.requestJsonAndCheck(
            "GET",
            self.url + "/stats/punch_card"
        )
        if not data:
            return None
        else:
            return github.StatsPunchCard.StatsPunchCard(self._requester, headers, data, completed=True)
604487
def fetch(self):
        
        self.retrieveVals()
        for parent_name in self._graphNames:
            graph = self._graphDict[parent_name]
            if self.isMultigraph:
                print "multigraph %s" % self._getMultigraphID(parent_name)
            print self._formatVals(graph.getVals())
            print
        if (self.isMultigraph and self._nestedGraphs 
            and self._subgraphDict and self._subgraphNames):
            for (parent_name, subgraph_names) in self._subgraphNames.iteritems():
                for graph_name in subgraph_names:
                    graph = self._subgraphDict[parent_name][graph_name]
                    print "multigraph %s" % self.getMultigraphID(parent_name, 
                                                                 graph_name)
                    print self._formatVals(graph.getVals())
                    print
        return True
372064
def get_uri(self, alias):
        
        if alias in self.aliases.keys():
            return self.aliases[alias]
        if alias in self.aliases.values():
            return alias
        raise GraphException('No such schema: %r' % alias)
126650
def get_entry(self, key, column=None, table=None):
        """"""
        if table is None:  table  = self.main_table
        if column is None: column = "id"
        if isinstance(key, basestring): key = key.replace("'","''")
        query = 'SELECT * from "%s" where "%s"=="%s" LIMIT 1;'
        query = query % (table, column, key)
        self.own_cursor.execute(query)
        return self.own_cursor.fetchone()
1344855
private OntModel getGraphSparqlQuery(URI graphUri) {

        StringBuilder queryStr = new StringBuilder("CONSTRUCT { ?s ?p ?o } \n")
                .append("WHERE {\n");

        // Add named graph if necessary
        if (graphUri != null) {
            queryStr.append("GRAPH <").append(graphUri.toASCIIString()).append("> ");
        }
        queryStr.append("{ ?s ?p ?o } } \n");

        log.debug("Querying graph store: {}", queryStr.toString());

        Query query = QueryFactory.create(queryStr.toString());
        QueryExecution qe = QueryExecutionFactory.sparqlService(this.getSparqlQueryEndpoint().toASCIIString(), query);
        MonitoredQueryExecution qexec = new MonitoredQueryExecution(qe);
        // Note that we are not using the store specification here to avoid retrieving remote models
//        OntModel resultModel = ModelFactory.createOntologyModel();
        OntModel resultModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_MICRO_RULE_INF);
        try {
            qexec.execConstruct(resultModel);
            return resultModel;
        } finally {
            qexec.close();
        }
    }
658952
def get_description(self):
        
        if self.card:
            card_description = self.card.get_description()
        else:
            card_description = 'Cardless'

        if card_description:
            card_description += ' | '

        return card_description + self.description if self.description else card_description + self.type + ' ' + str(self.IsoMessage.FieldData(11))
1102769
def _get_pubs(self, entry, graph):
        

        ref_to_pmid = {}
        entry_num = entry['mimNumber']
        if 'referenceList' in entry:
            reflist = entry['referenceList']
            for rlst in reflist:
                if 'pubmedID' in rlst['reference']:
                    pub_id = 'PMID:' + str(rlst['reference']['pubmedID'])
                    ref = Reference(
                        graph, pub_id, self.globaltt['journal article'])
                else:
                    # make blank node for internal reference
                    pub_id = '_:OMIM' + str(entry_num) + 'ref' + str(
                        rlst['reference']['referenceNumber'])

                    ref = Reference(graph, pub_id)
                    title = author_list = source = citation = None
                    if 'title' in rlst['reference']:
                        title = rlst['reference']['title']
                        ref.setTitle(title)
                    if 'authors' in rlst['reference']:
                        author_list = rlst['reference']['authors']
                        ref.setAuthorList(author_list)
                        citation = re.split(r'\.\,', author_list)[0] + ' et al'
                    if 'source' in rlst['reference']:
                        source = rlst['reference']['source']
                    citation = '; '.join(
                        [tok for tok in [citation, title, source] if tok is not None])
                    ref.setShortCitation(citation)
                ref.addRefToGraph()
                ref_to_pmid[rlst['reference']['referenceNumber']] = pub_id

                # add is_about for the pub
                omim_id = 'OMIM:' + str(entry_num)
                graph.addTriple(omim_id, self.globaltt['mentions'], pub_id)

        return ref_to_pmid