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

        args: Crossref allowed document Types (String)

        return: Works()
356207
def works(self, type_id):
        
        context = '%s/%s' % (self.ENDPOINT, str(type_id))
        return Works(context=context)
1108497
def get_info(self):
        ''
        escaped_doi = urllib2.quote(self.doi, '')
        html = get_resource("www.crossref.org", '/guestquery?queryType=doi&restype=unixref&doi=%s&doi_search=Search' % escaped_doi)

        xml_matches = []
        for m in re.finditer('(<doi_records>.*?</doi_records>)', html, re.DOTALL):
            xml_matches.append(m.group(0))

        if len(xml_matches) == 0:
            raise DOIRetrievalException('No matches found for the DOI "%s".' % self.doi)
        elif len(xml_matches) == 1:
            return xml_matches[0]
        else:
            raise DOIRetrievalException('Multiple (%d) matches found for the DOI "%s".' % (len(xml_matches), self.doi))
1064957
public Document getDocuments(int i) {
    if (SourceFile_Type.featOkTst && ((SourceFile_Type)jcasType).casFeat_documents == null)
      jcasType.jcas.throwFeatMissing("documents", "de.julielab.jules.types.ace.SourceFile");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((SourceFile_Type)jcasType).casFeatCode_documents), i);
    return (Document)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((SourceFile_Type)jcasType).casFeatCode_documents), i)));}
1113166
def get_types(self):
        

        # Convert translators into a set of content types
        content_types = set()
        for name in self.translators:
            content_types |= type_names[name]

        return content_types
714794
def get_xrefs_list(cls, class_item, method=None):
        
        log.debug("Getting XREF for %s" % class_item)

        item = class_item
        if method:
            item = method

        return XrefDialog.get_xrefs_list_from_element(item)
78887
function retrieveRecords(rType, source) {
  return function(options, callback) {
    var q = {
      _source : source,
      size : hitSize,
      "query": {
        "filtered": {
          "query": {
            "bool": {
              "must": [
                {
                  query_string: {
                    query: 'member:' + (options.member ? '"' + options.member + '"' : '*')
                  }
                }
              ]
            }
          }
        }
      }
    };

    getEs().search({ _index : GLOBAL.config.ESEARCH._index, _type : rType}, q, function(err, res) {
      callback(err, res);
    });
  };
}
638248
function _get_result(Type) {
	return function(rows) {
		if(!rows) { throw new TypeError("failed to parse result"); }
		var doc = rows.shift();
		if(!doc) { return; }

		if(doc instanceof Type) {
			return doc;
		}

		var obj = {};
		ARRAY(Object.keys(doc)).forEach(function(key) {

			if(key === 'documents') {
				obj['$'+key] = {};
				ARRAY(Object.keys(doc[key])).forEach(function(k) {
					if(is.uuid(k)) {
						obj['$'+key][k] = _get_result(NoPg.Document)([doc[key][k]]);
					} else {
						obj['$'+key][k] = doc[key][k];
					}
				});
				return;
			}

			obj['$'+key] = doc[key];
		});

		_parse_object_expressions(obj);

		return new Type(obj);
	};
}
110864
def validate(self, **kwargs):
        
        self.check_crossrefs()
        for value in self.values():
            value.validate(**kwargs)
183884
def get_page_objects_by_type(context, object_type):
    
    try:
        objects = context['page']['content'][object_type]
    except KeyError:
        raise template.TemplateSyntaxError('wrong content type: {0:>s}'.format(object_type))
    return objects
227223
def _gather_keys_by_type(self, type):
        
        foreign = self._foreign_key

        keys = (
            BaseCollection.make(list(self._dictionary[type].values()))
            .map(lambda models: getattr(models[0], foreign))
            .unique()
        )

        return keys
6349
def get_all_conversion_chains_from_type(self, from_type: Type[Any]) \
            -> Tuple[List[Converter], List[Converter], List[Converter]]:
        
        return self.get_all_conversion_chains(from_type=from_type)
696271
def documents(self, full=False):
        ''''''
        url = self.base_url + self.DOCUMENTS_PAGE
        class_ = Document
        results = self._retrieve_resources(url, class_, full)
        return results
955953
def get_links_of_type(self, link_type):
        
        return (link for link in self.links if link.get('type', '') == link_type)
731952
def get_page_objects_by_ext_type(context, object_type):
    
    try:
        objects = context['page']['ext_content'][object_type]
    except KeyError:
        raise template.TemplateSyntaxError('wrong content type: {0:>s}'.format(object_type))
    return objects
431964
@Override
    public void getXliffFromDocuments(String srcLanguage, String trgLanguage,
            Map<DocumentType, Set<String>> documentsMap,
            OutputStream outputXliff) throws ServiceException, IOException {

        if (srcLanguage == null || srcLanguage.isEmpty()) {
            throw new IllegalArgumentException("Non-empty srcLanguage must be specified.");
        }
        if (trgLanguage == null || trgLanguage.isEmpty()) {
            throw new IllegalArgumentException("Non-empty trgLanguage must be specified.");
        }

        StringBuilder urlBuf = new StringBuilder();
        urlBuf
            .append(escapePathSegment(account.getInstanceId()))
            .append("/v2/doc-xliff/")
            .append(srcLanguage)
            .append("/")
            .append(trgLanguage);

        if (documentsMap != null && !documentsMap.isEmpty()) {
            urlBuf.append("?");
            int count = documentsMap.size();
            for (Map.Entry<DocumentType, Set<String>> entry : documentsMap.entrySet()) {
                DocumentType type = entry.getKey();
                Set<String> documentIds = entry.getValue();
                urlBuf.append(type.toString().toLowerCase()).append("=");
                boolean first = true;
                for (String docId : documentIds) {
                    if (first) {
                        first = false;
                    } else {
                        urlBuf.append(",");
                    }
                    urlBuf.append(docId);
                }
                count--;
            }
            if (count != 0) {
                urlBuf.append("&");
            }
        }

        ApiResponse resp = null;
        try {
            resp = invokeApi("GET", urlBuf.toString(), null, null, false);
        } catch (Exception e) {
            String errMsg = "Error while processing API request GET " + urlBuf;
            throw new ServiceException(errMsg, e);
        }
        assert resp != null;

        if (resp.contentType == null || !resp.contentType.equalsIgnoreCase("application/xliff+xml")) {
            throw new ServiceException("Received HTTP status: " + resp.status
                    + " with non-XLIFF response (" + resp.contentType + ") from GET"
                    + " " + urlBuf.toString());
        }
        assert resp.body != null;
        outputXliff.write(resp.body);
    }
836841
def decode_work_type(obj)
      if obj['type'] =~ WORK_TYPE_WITH_PREFIX_PATTERN
        return 'GenericWork' if Regexp.last_match(2).nil?
        Regexp.last_match(2)
      else
        # this will return nil if key t does not exist
        work_type = obj['type'].downcase
        WORK_TYPES[work_type]
      end
    end
410955
def supported_cache_type(types):
    
    if isinstance(types, str):
        types = [typ.strip() for typ in types.split(",")]
    for typ in types:
        if typ not in ["reflink", "hardlink", "symlink", "copy"]:
            return False
    return True