This method retrieve a iterable of Works of the given prefix.

        args: Crossref Prefix (String)

        return: Works()
357908
def works(self, prefix_id):
        
        context = '%s/%s' % (self.ENDPOINT, str(prefix_id))
        return Works(context=context)
8760
def prefixedname_to_iriref(self, prefix: ShExDocParser.PrefixedNameContext) -> ShExJ.IRIREF:
        
        return ShExJ.IRIREF(self.prefixedname_to_str(prefix))
78309
private LinkedHashMap<String, Long> getPrefixRefs(String field) {
    if (fieldReferences.containsKey(field)) {
      FieldReferences fr = fieldReferences.get(field);
      if (!prefixReferences.containsKey(field)) {
        LinkedHashMap<String, Long> refs = new LinkedHashMap<String, Long>();
        try {
          IndexInput inPrefix = indexInputList.get("prefix");
          inPrefix.seek(fr.refPrefix);
          for (int i = 0; i < fr.numberOfPrefixes; i++) {
            Long ref = inPrefix.getFilePointer();
            String prefix = inPrefix.readString();
            refs.put(prefix, ref);
          }
        } catch (Exception e) {
          log.error(e);
          refs.clear();
        }
        prefixReferences.put(field, refs);
        return refs;
      } else {
        return prefixReferences.get(field);
      }
    } else {
      return null;
    }
  }
915214
def list(
            self,
            bucket: str,
            prefix: str=None,
            delimiter: str=None,
    ) -> typing.Iterator[str]:
        
        kwargs = dict()
        if prefix is not None:
            kwargs['Prefix'] = prefix
        if delimiter is not None:
            kwargs['Delimiter'] = delimiter
        for item in (
                boto3.resource("s3").Bucket(bucket).
                objects.
                filter(**kwargs)):
            yield item.key
212638
def _iterate_prefix(self, callsign, timestamp=timestamp_now):
        """"""
        prefix = callsign

        if re.search('(VK|AX|VI)9[A-Z]{3}', callsign): #special rule for VK9 calls
            if timestamp > datetime(2006,1,1, tzinfo=UTC):
                prefix = callsign[0:3]+callsign[4:5]

        while len(prefix) > 0:
            try:
                return self._lookuplib.lookup_prefix(prefix, timestamp)
            except KeyError:
                prefix = prefix.replace(' ', '')[:-1]
                continue
        raise KeyError
1150847
def get_metadata(doi):
    """"""
    url = crossref_url + 'works/' + doi
    res = requests.get(url)
    if res.status_code != 200:
        logger.info('Could not get CrossRef metadata for DOI %s, code %d' %
                    (doi, res.status_code))
        return None
    raw_message = res.json()
    metadata = raw_message.get('message')
    return metadata
1338468
def fetchall_labels(ont):
    
    logging.info("fetching rdfs:labels for: "+ont)
    namedGraph = get_named_graph(ont)
    queryBody = querybody_label()
    query = """
    SELECT * WHERE {{
    GRAPH <{g}>  {q}
    }}
    """.format(q=queryBody, g=namedGraph)
    bindings = run_sparql(query)
    rows = [(r['c']['value'], r['l']['value']) for r in bindings]
    return rows
754087
def crossrefs(self):
        """"""
        # TODO: memoize this?
        crefs = set()
        for node in self.node:
            if node.repo != self.target.repo or node.path != self.target.path:
                crefs.add(node)
        return crefs
980436
def GetFileEntries(self, path_prefix=''):
    
    if self._file_entries:
      for path, file_entry in iter(self._file_entries.items()):
        if path.startswith(path_prefix):
          yield file_entry
848805
def _allKeys(self, prefix):
        
        global dictItemsIter
        result = [prefix + self.key] if self.key != None else []
        for key, trie in dictItemsIter(self.slots):        
            result.extend(trie._allKeys(prefix + key))        
        return result
346680
def find_all(self, prefix):
        '''
        
        '''
        prefix = ip_network(prefix)

        # Check that we are authoritative for the given prefix
        if not self.prefix.overlaps(prefix) \
        or self.prefix[0] > prefix[0] \
        or self.prefix[-1] < prefix[-1]:
            raise NotAuthoritativeError('This node is not authoritative for %r'
                                        % prefix)

        # Find all matching existing prefixes and return them in a set
        matches = set()
        for child in self.children:
            if prefix.overlaps(child.prefix):
                matches.add(child)

        return matches
1150315
def parse_xrefs(self, token):
        
        out, end = [], 0
        token = token.replace("\\n", "\n")
        for m in re.finditer(self.xref_registry, token, re.VERBOSE | re.DOTALL):
            if m.start(0) > end:
                out.append(String(token[end:m.start(0)], self.current_obj))
            end = m.end(0)
            if m.group("type"):
                xref_type = {"+": ValueXRef,
                             "!": VariableXRef,
                             "@": ElementXRef}[m.group("type")]
                out.append(xref_type(m.group("xref"), self.current_obj))
            elif m.group("uri") is not None:
                path = m.group("uri")
                out.append(MetaURI(path, self.current_obj))
            elif m.group("repeat") is not None:
                repeat, separator, nodups = m.group("repeat", "separator", "nodups")
                if separator is None:
                    separator = ""
                if nodups is None:
                    nodups = ""
                out.append(MetaRepeat(self.parse_xrefs(repeat), separator, nodups, self.current_obj))
            elif m.group("block") is not None:
                path = m.group("block")
                out.append(MetaBlock(path, self.current_obj))
            elif m.group("choices") is not None:
                choices = m.group("choices")
                out.append(MetaChoice(choices, self.current_obj))
            else:
                startval, endval = m.group("start", "end")
                out.append(MetaRange(startval, endval, self.current_obj))
        if end < len(token):
            out.append(String(token[end:], self.current_obj))
        return out
1088855
def __get_keys(self, chrom, start, end=None):
    
    keys = []
    if chrom in self.whole_chrom_files:
      keys.append(self.whole_chrom_files[chrom])
    if chrom in self.partial_trees:
      if end is not None:
        hits = self.partial_trees[chrom].intersectingInterval(start, end)
      else:
        hits = self.partial_trees[chrom].intersectingPoint(start, end)
      for hit in hits:
        keys.append(hit.key)
    return keys
989481
def get_all_remote_methods(resolver=None, ns_prefix=''):
    
    if not resolver:
        resolver = get_resolver(get_urlconf())
    result = {}
    for name in resolver.reverse_dict.keys():
        if not isinstance(name, six.string_types):
            continue
        try:
            url = reverse(ns_prefix + name)
            resmgr = resolve(url)
            ViewClass = import_string('{0}.{1}'.format(resmgr.func.__module__, resmgr.func.__name__))
            if isclass(ViewClass) and issubclass(ViewClass, JSONResponseMixin):
                result[name] = _get_remote_methods_for(ViewClass, url)
        except (NoReverseMatch, ImproperlyConfigured):
            pass
    for namespace, ns_pattern in resolver.namespace_dict.items():
        sub_res = get_all_remote_methods(ns_pattern[1], ns_prefix + namespace + ':')
        if sub_res:
            result[namespace] = sub_res
    return result
133889
def get_xref_graph(ont):
    
    g = networkx.MultiGraph()
    for (c,x) in fetchall_xrefs(ont):
        g.add_edge(c,x,source=c)
    return g
687716
def _get_multi_param(self, param_prefix):
        
        if param_prefix.endswith("."):
            prefix = param_prefix
        else:
            prefix = param_prefix + "."
        values = []
        index = 1
        while True:
            value_dict = self._get_multi_param_helper(prefix + str(index))
            if not value_dict:
                break

            values.append(value_dict)
            index += 1

        return values
313046
def shapeRef_to_iriref(self, ref: ShExDocParser.ShapeRefContext) -> ShExJ.IRIREF:
        
        if ref.ATPNAME_NS():
            return ShExJ.IRIREF(self._lookup_prefix(ref.ATPNAME_NS().getText()[1:]))
        elif ref.ATPNAME_LN():
            prefix, local = ref.ATPNAME_LN().getText()[1:].split(':', 1)
            return ShExJ.IRIREF(self._lookup_prefix(prefix + ':') + (local if local else ""))
        else:
            return self.shapeexprlabel_to_IRI(ref.shapeExprLabel())