Set a single variable with the frameids of matching entity
197947
def _set_id_from_xml_frameid(self, xml, xmlpath, var):
        '''
        
        '''
        e = xml.find(xmlpath)
        if e is not None:
            setattr(self, var, e.attrib['frameid'])
1255161
def _set_value(self, entity, value):
    """"""
    if value is not None:
      value = _validate_key(value, entity=entity)
      value = entity._validate_key(value)
    entity._entity_key = value
501149
public void setEntity_mentions(int i, EntityMention v) { 
    if (Entity_Type.featOkTst && ((Entity_Type)jcasType).casFeat_entity_mentions == null)
      jcasType.jcas.throwFeatMissing("entity_mentions", "de.julielab.jules.types.ace.Entity");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Entity_Type)jcasType).casFeatCode_entity_mentions), i);
    jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Entity_Type)jcasType).casFeatCode_entity_mentions), i, jcasType.ll_cas.ll_getFSRef(v));}
1112441
public void setEntity_attributes(int i, EntityAttribute v) { 
    if (Entity_Type.featOkTst && ((Entity_Type)jcasType).casFeat_entity_attributes == null)
      jcasType.jcas.throwFeatMissing("entity_attributes", "de.julielab.jules.types.ace.Entity");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Entity_Type)jcasType).casFeatCode_entity_attributes), i);
    jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Entity_Type)jcasType).casFeatCode_entity_attributes), i, jcasType.ll_cas.ll_getFSRef(v));}
656246
def _set_value(self, entity, value):
    
    if entity._projection:
      raise ReadonlyPropertyError(
          'You cannot set property values of a projection entity')
    if self._repeated:
      if not isinstance(value, (list, tuple, set, frozenset)):
        raise datastore_errors.BadValueError('Expected list or tuple, got %r' %
                                             (value,))
      value = [self._do_validate(v) for v in value]
    else:
      if value is not None:
        value = self._do_validate(value)
    self._store_value(entity, value)
406025
private void setId(EntityMetadata m, Object entity, Object columnValue, boolean isCql3Enabled)
    {
        if (isCql3Enabled && !m.getType().equals(Type.SUPER_COLUMN_FAMILY))
        {
            setFieldValueViaCQL(entity, columnValue, m.getIdAttribute());
        }
        else
        {
            setFieldValue(entity, columnValue, m.getIdAttribute());
        }
    }
995757
def create_set(self, set_id, etype, entities):
        
        if etype not in {"sample", "pair", "participant"}:
            raise ValueError("Unsupported entity type:" + str(etype))

        payload = "membership:" + etype + "_set_id\t" + etype + "_id\n"

        for e in entities:
            if e.etype != etype:
                msg =  "Entity type '" + e.etype + "' does not match "
                msg += "set type '" + etype + "'"
                raise ValueError(msg)
            payload += set_id + '\t' + e.entity_id + '\n'


        r = fapi.upload_entities(self.namespace, self.name,
                                    payload, self.api_url)
        fapi._check_response_code(r, 201)
399575
private static void markEntityVars(HeadedSyntacticCategory cat, int[] uniqueVars,
      boolean[] isEntityVar) {
    if (cat.isAtomic()) {
      for (int var : cat.getUniqueVariables()) {
        int index = Ints.indexOf(uniqueVars, var);
        isEntityVar[index] = true;
      }
    } else {
      markEntityVars(cat.getArgumentType(), uniqueVars, isEntityVar);
      markEntityVars(cat.getReturnType(), uniqueVars, isEntityVar);
    }
  }
590341
protected void initializeVariable(HistoricVariableInstanceEntity e) {
    if (Context.getCommandContext() != null && e != null && e.getVariableType() != null) {
      e.getValue();

      // make sure JPA entities are cached for later retrieval
      if (JPAEntityVariableType.TYPE_NAME.equals(e.getVariableType().getTypeName()) || JPAEntityListVariableType.TYPE_NAME.equals(e.getVariableType().getTypeName())) {
        ((CacheableVariable) e.getVariableType()).setForceCacheable(true);
      }
    }
  }
669073
def internal_change_variable(dbg, seq, thread_id, frame_id, scope, attr, value):
    '''  '''
    try:
        frame = dbg.find_frame(thread_id, frame_id)
        if frame is not None:
            result = pydevd_vars.change_attr_expression(frame, attr, value, dbg)
        else:
            result = None
        xml = "<xml>"
        xml += pydevd_xml.var_to_xml(result, "")
        xml += "</xml>"
        cmd = dbg.cmd_factory.make_variable_changed_message(seq, xml)
        dbg.writer.add_command(cmd)
    except Exception:
        cmd = dbg.cmd_factory.make_error_message(seq, "Error changing variable attr:%s expression:%s traceback:%s" % (attr, value, get_exception_traceback_str()))
        dbg.writer.add_command(cmd)
276927
public void setEntities(int i, Entity v) { 
    if (Document_Type.featOkTst && ((Document_Type)jcasType).casFeat_entities == null)
      jcasType.jcas.throwFeatMissing("entities", "de.julielab.jules.types.ace.Document");
    jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Document_Type)jcasType).casFeatCode_entities), i);
    jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Document_Type)jcasType).casFeatCode_entities), i, jcasType.ll_cas.ll_getFSRef(v));}
1317528
@Override
  public void recordVariableUpdate(VariableInstanceEntity variable) {
    if (isHistoryLevelAtLeast(HistoryLevel.ACTIVITY)) {
      HistoricVariableInstanceEntity historicProcessVariable = getEntityCache().findInCache(HistoricVariableInstanceEntity.class, variable.getId());
      if (historicProcessVariable == null) {
        historicProcessVariable = getHistoricVariableInstanceEntityManager().findHistoricVariableInstanceByVariableInstanceId(variable.getId());
      }

      if (historicProcessVariable != null) {
        getHistoricVariableInstanceEntityManager().copyVariableValue(historicProcessVariable, variable);
      } else {
        getHistoricVariableInstanceEntityManager().copyAndInsert(variable);
      }
    }
  }
416393
private void addEntityID(Map<String, String> requestParameters, StringBuilder uri) {
        if (StringUtils.hasText(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_ID))) {
            uri.append("/").append(requestParameters.get(RequestElements.REQ_PARAM_ENTITY_ID));
        }
    }
175687
def update_frame(self):
        
        d = self.declaration
        if d.x or d.y or d.width or d.height:
            self.frame = (d.x, d.y, d.width, d.height)
1286344
def set_state_data(cls, entity, data):
        
        attr_names = get_domain_class_attribute_names(type(entity))
        nested_items = []
        for attr, new_attr_value in iteritems_(data):
            if not attr.entity_attr in attr_names:
                raise ValueError('Can not set attribute "%s" for entity '
                                 '"%s".' % (attr.entity_attr, entity))
            if '.' in attr.entity_attr:
                nested_items.append((attr, new_attr_value))
                continue
            else:
                setattr(entity, attr.entity_attr, new_attr_value)
        for attr, new_attr_value in nested_items:
            try:
                set_nested_attribute(entity, attr.entity_attr, new_attr_value)
            except AttributeError as exc:
                if not new_attr_value is None:
                    raise exc
396019
def frameify(self, state, data):
        """"""

        try:
            yield state.recv_buf + data
        except FrameSwitch:
            pass
        finally:
            state.recv_buf = ''
566718
def set(self, name, value):
        """"""
        name = self._convert_name(name)

        if ((name in _ELEMENTSFIELD or name == 'Platform') and
            not isinstance(value, (list, tuple))):
            if isinstance(value, string_types):
                value = [v.strip() for v in value.split(',')]
            else:
                value = []
        elif (name in _LISTFIELDS and
              not isinstance(value, (list, tuple))):
            if isinstance(value, string_types):
                value = [value]
            else:
                value = []

        if logger.isEnabledFor(logging.WARNING):
            project_name = self['Name']

            scheme = get_scheme(self.scheme)
            if name in _PREDICATE_FIELDS and value is not None:
                for v in value:
                    # check that the values are valid
                    if not scheme.is_valid_matcher(v.split(';')[0]):
                        logger.warning(
                            "'%s': '%s' is not valid (field '%s')",
                            project_name, v, name)
            # FIXME this rejects UNKNOWN, is that right?
            elif name in _VERSIONS_FIELDS and value is not None:
                if not scheme.is_valid_constraint_list(value):
                    logger.warning("'%s': '%s' is not a valid version (field '%s')",
                                   project_name, value, name)
            elif name in _VERSION_FIELDS and value is not None:
                if not scheme.is_valid_version(value):
                    logger.warning("'%s': '%s' is not a valid version (field '%s')",
                                   project_name, value, name)

        if name in _UNICODEFIELDS:
            if name == 'Description':
                value = self._remove_line_prefix(value)

        self._fields[name] = value