Public: Get multiple features in one call. Defaults to one get per
 feature. Feel free to override per adapter to make this more efficient and
 reduce network calls.
328376
def get_multi(features)
      result = {}
      features.each do |feature|
        result[feature.key] = get(feature)
      end
      result
    end
835439
def system_multicall(self, call_list):
        

        results = []
        for call in call_list:
            method_name = call['methodName']
            params = call['params']

            try:
                # XXX A marshalling error in any response will fail the entire
                # multicall. If someone cares they should fix this.
                results.append([self._dispatch(method_name, params)])
            except Fault as fault:
                results.append(
                    {'faultCode' : fault.faultCode,
                     'faultString' : fault.faultString}
                    )
            except:
                exc_type, exc_value, exc_tb = sys.exc_info()
                results.append(
                    {'faultCode' : 1,
                     'faultString' : "%s:%s" % (exc_type, exc_value)}
                    )
        return results
553320
def get_apis(self):
        
        out = set(x.api for x in self.types.values() if x.api)
        for ft in self.features.values():
            out.update(ft.get_apis())
        for ext in self.extensions.values():
            out.update(ext.get_apis())
        return out
7930
def _get_features_string(self, features=None):
    
    string = ""
    if features is None:
        features = []
    elif features == []:
        features = self.features

    for pr in features:
        if hasattr(self, pr):
            raw = getattr(self, pr)
            if type(raw) in ITERABLE_TYPES:
                raw = '|'.join([str(i) for i in raw])
            elif type(raw) == dict:
                raw = '|'.join(
                    map(lambda x,y: "%s-%s" %(x, y), six.iteritems(raw)))
            elif type(raw) == str:
                pass
            else:
                raw = str(raw)

            value = re.sub("["+_ILEGAL_NEWICK_CHARS+"]", "_", \
                             raw)
            if string != "":
                string +=":"
            string +="%s=%s"  %(pr, str(value))
    if string != "":
        string = "[&&NHX:"+string+"]"

    return string
322970
def get_a(name=None, ipv4addr=None, allow_array=True, **api_opts):
    '''
    
    '''
    data = {}
    if name:
        data['name'] = name
    if ipv4addr:
        data['ipv4addr'] = ipv4addr
    r = get_object('record:a', data=data, **api_opts)
    if r and len(r) > 1 and not allow_array:
        raise Exception('More than one result, use allow_array to return the data')
    return r
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
375146
def _getFeatureById(self, featureId):
        
        featureRef = rdflib.URIRef(featureId)
        featureDetails = self._detailTuples([featureRef])
        feature = {}
        for detail in featureDetails:
            feature[detail['predicate']] = []

        for detail in featureDetails:
            feature[detail['predicate']].append(detail['object'])

        pbFeature = protocol.Feature()

        term = protocol.OntologyTerm()
        # Schema for feature only supports one type of `type`
        # here we default to first OBO defined
        for featureType in sorted(feature[TYPE]):
            if "obolibrary" in featureType:
                term.term = self._featureTypeLabel(featureType)
                term.term_id = featureType
                pbFeature.feature_type.MergeFrom(term)
                break

        pbFeature.id = featureId
        # Schema for feature only supports one type of `name` `symbol`
        # here we default to shortest for symbol and longest for name
        feature[LABEL].sort(key=len)
        pbFeature.gene_symbol = feature[LABEL][0]
        pbFeature.name = feature[LABEL][-1]

        pbFeature.attributes.MergeFrom(protocol.Attributes())
        for key in feature:
            for val in sorted(feature[key]):
                pbFeature.attributes.attr[key].values.add().string_value = val

        if featureId in self._locationMap:
            location = self._locationMap[featureId]
            pbFeature.reference_name = location["chromosome"]
            pbFeature.start = location["begin"]
            pbFeature.end = location["end"]

        return pbFeature
1122385
def get_pres_features(self, features=None):
        
        if features is None:
            features = self.dist_funcs.keys()
        elif not isinstance(features, list):
            features = [features]
        return self.pres.applymap(lambda x: {k:v for k,v in x.items() if k in features} if x is not None else None)
944466
def getFeature(self, compoundId):
        
        feature = self._getFeatureById(compoundId.featureId)
        feature.id = str(compoundId)
        return feature
399348
def hasFeature(featureList, feature):
    
    for f in featureList:
        if f[0] == feature or Features[f[0]] == feature:
            return f[1]
309127
function parseFeatures (features) {
  features = defaultValue(features, '')
  if (!features) {
    return {}
  }

  return features
    .split(',')
    .map(toNameAndValuePair)
    .reduce(toPlainObject, {})
}
113801
def provide(self, feature_name, provider, *args, **kwargs):
        
        if not self.allow_replace:
            assert feature_name not in self.providers, "Duplicate feature: {!r}".format(
                feature_name
            )
        if callable(provider) and not isinstance(provider, type):
            self.providers[feature_name] = lambda: provider(*args, **kwargs)
        else:
            self.providers[feature_name] = lambda: provider
372451
def get(feature_name):
        
        implementations = MetadataExtractor._implementations()
        try:
            return implementations[feature_name]
        except KeyError:
            raise UnsupportedFeatureException(
                'no MetadataExtractor registered for feature "{feature_name}" '
                '(try any of the following: {supported_features})'
                .format(feature_name=feature_name,
                        supported_features=', '.join(sorted(implementations))))
1321957
function(){
    var feature = this.supportsFeature()
      , op
      , expr;
    if (feature) {
      expr = new nodes.Expression;
      expr.push(feature);
      while (op = this.accept('&&') || this.accept('||')) {
        expr.push(new nodes.Literal('&&' == op.val ? 'and' : 'or'));
        expr.push(this.supportsFeature());
      }
      return expr;
    }
  }
369375
function getFeature(feature, scenariosNumberInFeature, passedScenariosNumberInFeature, stepsNumberInFeature, passedStepsInFeature) {

        var template = grunt.file.read(templates.featureTemplate),
            featureTemplate;

        featureTemplate = grunt.template.process(template, {
            data: {
                name: feature.name,
                scenariosNumberInFeature: scenariosNumberInFeature,
                passedScenariosNumberInFeature: passedScenariosNumberInFeature,
                stepsNumberInFeature: stepsNumberInFeature,
                passedStepsInFeature: passedStepsInFeature
            }
        });
        return featureTemplate;
    }
932839
def get_multi(cls, blob_keys, **ctx_options):
    
    futs = cls.get_multi_async(blob_keys, **ctx_options)
    return [fut.get_result() for fut in futs]
661093
@Api
	public void panToFeatures(List<Feature> features) {
		PanToFeaturesLazyLoadCallback callback = new PanToFeaturesLazyLoadCallback(features.size());
		for (Feature feature : features) {
			// no need to fetch if we already have the geometry !
			if (feature.isGeometryLoaded()) {
				callback.execute(Arrays.asList(feature));
			} else {
				feature.getLayer().getFeatureStore()
						.getFeature(feature.getId(), GeomajasConstant.FEATURE_INCLUDE_GEOMETRY, callback);			
			}
		}
	}