Sets the components of the given composite property.

    All parameters are <feature>value strings
3055
def compose (composite_property_s, component_properties_s):
    
    from . import property

    component_properties_s = to_seq (component_properties_s)
    composite_property = property.create_from_string(composite_property_s)
    f = composite_property.feature

    if len(component_properties_s) > 0 and isinstance(component_properties_s[0], property.Property):
        component_properties = component_properties_s
    else:
        component_properties = [property.create_from_string(p) for p in component_properties_s]

    if not f.composite:
        raise BaseException ("'%s' is not a composite feature" % f)

    if property in __composite_properties:
        raise BaseException ('components of "%s" already set: %s' % (composite_property, str (__composite_properties[composite_property])))

    if composite_property in component_properties:
        raise BaseException ('composite property "%s" cannot have itself as a component' % composite_property)

    __composite_properties[composite_property] = component_properties
1081076
def change (properties, feature, value = None):
    
    assert is_iterable_typed(properties, basestring)
    assert isinstance(feature, basestring)
    assert isinstance(value, (basestring, type(None)))
    result = []

    feature = add_grist (feature)

    for p in properties:
        if get_grist (p) == feature:
            if value:
                result.append (replace_grist (value, feature))

        else:
            result.append (p)

    return result
1085461
def SetProperties(has_props_cls, input_dict, include_immutable=True):
    """"""
    props = has_props_cls()
    if not isinstance(input_dict, (dict, collections.OrderedDict)):
        raise RuntimeError('input_dict invalid: ', input_dict)
    for k, v in iter(input_dict.items()):
        if (k in has_props_cls._props and (
                include_immutable or
                any(hasattr(has_props_cls._props[k], att) for att in ('required', 'new_name'))
                )
           ):
            p = props._props.get(k)
            if isinstance(p, properties.HasProperties):
                props._set(k, SetProperties(p, v, include_immutable=include_immutable))
            elif isinstance(p, properties.Instance):
                props._set(k, SetProperties(p.instance_class, v, include_immutable=include_immutable))
            elif isinstance(p, properties.List):
                if not isinstance(v, list):
                    raise RuntimeError('property value mismatch', p, v)
                if not isinstance(v[0], properties.HasProperties):
                    prop = p.prop.instance_class
                    newlist = []
                    for i in v:
                        value = SetProperties(prop, i, include_immutable=include_immutable)
                        newlist.append(value)
                    props._set(k, newlist)
                else:
                    props._set(k, v)
            else:
                props._set(k, p.from_json(v))

    # Return others as well
    # others_dict = {k: v for k, v in iter(input_dict.items())
    #                if k not in has_props_cls._props}
    return props
1270862
public void setComponent(String component, Variable ... vars) {
		for (Variable var : vars) {
			if (var.getComponent() != null && !var.getComponent().equals(component)) {
				components.get(var.getComponent()).remove(var);
			}
		}
		if (!components.containsKey(component)) components.put(component, new ArrayList<Variable>());
		for (Variable var : vars) components.get(component).add(var);
	}

	/**
	 * Create a batch of new {@link Variable}s for this {@link ConstraintSolver}.
	 * @param num The number of variables to create.
	 * @return A batch of new {@link Variable}s.
	 */
	public final Variable[] createVariables(int num) {
		return this.createVariables(num, null);
	}

	/**
	 * Create a batch of new {@link Variable}s for this {@link ConstraintSolver}.
	 * @param num The number of variables to create.
	 * @param component The component tag to associate to these new variables.
	 * @return A batch of new {@link Variable}s.
	 */
	public final Variable[] createVariables(int num, String component) {
		Variable[] ret = createVariablesSub(num, component);
		if (ret == null) return null;
		//need to add all to network so if sth goes wrong I can delete all of them concurrently
		for (Variable v : ret) this.theNetwork.addVariable(v);
		if (!skipPropagation && autoprop && checkDomainsInstantiated() && !noPropOnVarCreation) this.propagate();
		logger.finest("Created variables " + Arrays.toString(ret));
		return ret;
	}
730642
public FeatureState setParameter(String name, String value) {
        if (value != null) {
            this.parameters.put(name, value);
        }
        else {
            this.parameters.remove(name);
        }
        return this;
    }
696170
public static void setStructuralFeature(EObject object, EStructuralFeature property, Object value) {
		assert object != null;
		assert property != null;
		if (value == null) {
			object.eUnset(property);
		} else {
			object.eSet(property, value);
		}
	}
232362
protected void createFeatureConversionSectionItems(Composite parentComposite) {
		final FeatureNameConversionTable typeConversionTable = new FeatureNameConversionTable(
				this, getTargetLanguageImage(),
				getPreferenceStore(), getPreferenceID());
		typeConversionTable.doCreate(parentComposite, getDialogSettings());
		makeScrollableCompositeAware(typeConversionTable.getControl());
		addExtraControl(typeConversionTable);
	}
364118
public void setFeatures(List<Feature> features) {
        this.mFeatures.clear();
        if (features != null) {
            this.mFeatures.addAll(features);
        }
    }
903370
public void setProperties(String props) {
        Map hashTable = new HashMap();
        StringTokenizer pairs = new StringTokenizer(props, ",");
        while (pairs.hasMoreTokens()) {
            StringTokenizer entry = new StringTokenizer(pairs.nextToken(), "=");
            hashTable.put(entry.nextElement().toString().trim(), entry.nextElement().toString().trim());
        }
        synchronized(this) {
            properties = hashTable;
        }
    }
391858
def set_property(self, prop, objects):
        """"""
        self._properties.add(prop)
        objects = set(objects)
        self._objects |= objects
        pairs = self._pairs
        for o in self._objects:
            if o in objects:
                pairs.add((o, prop))
            else:
                pairs.discard((o, prop))
928699
public void setValues(FSArray v) {
    if (Document_Type.featOkTst && ((Document_Type)jcasType).casFeat_values == null)
      jcasType.jcas.throwFeatMissing("values", "de.julielab.jules.types.ace.Document");
    jcasType.ll_cas.ll_setRefValue(addr, ((Document_Type)jcasType).casFeatCode_values, jcasType.ll_cas.ll_getFSRef(v));}
1370599
public void setCustomProperties() {
		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
			SibTr.entry(tc, "setCustomProperties", this);

		// Set the properties that belong to the bus
		/*
		 * List props =
		 * ((ConfigObject)getEObject()).getObjectList(CT_SIBus.PROPERTIES_NAME);
		 * for (Iterator iter = props.iterator(); iter.hasNext();) {
		 * ConfigObject p = (ConfigObject)iter.next(); String name =
		 * p.getString(CT_Property.NAME_NAME, CT_Property.NAME_DEFAULT); String
		 * value = p.getString(CT_Property.VALUE_NAME,
		 * CT_Property.VALUE_DEFAULT); setCustomProperty(name, value); }
		 */

		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
			SibTr.exit(tc, "setCustomProperties");
	}
779913
public void setProperties(Map<String, Value> properties) {
        if (properties != null) {
            this.properties = new HashMap<>(properties);
        } else {
            this.properties = null;
        }
    }
476973
public static void setProperties(Object bean, Map<String,?> props, Class<? extends Annotation> tagCls) throws IntrospectionException, IllegalAccessException, InvocationTargetException, InstantiationException
	{
		Class<?> beanCls;
		PropertyDescriptor[] descriptors;
		Map<String,PropertyDescriptor> descriptorMap = new HashMap<String,PropertyDescriptor>();
		Method meth;
		String name;
		Object value;
		Class<?> propCls;
		Class<?> valCls;

		beanCls = bean.getClass();
		if((descriptors = Introspector.getBeanInfo(beanCls).getPropertyDescriptors())==null)
			throw new IllegalArgumentException("Unable to get PropertyDescriptors for class " + beanCls.getName() + '.');
		for(PropertyDescriptor pd : descriptors)
			descriptorMap.put(pd.getName(), pd);
		for(Map.Entry<String,?> prop : props.entrySet())
		{
			name = prop.getKey();
			value = prop.getValue();
			PropertyDescriptor pd;

			if((pd=descriptorMap.get(name))==null)
				throw new IllegalArgumentException("Bean class " + beanCls.getName() + " does not have property " + name + '.');
			if((meth=pd.getWriteMethod())==null)
				throw new IllegalArgumentException("Bean class " + beanCls.getName() + " does not have a setter for property " + name + '.');
			if((propCls = pd.getPropertyType())==null)
				throw new IllegalArgumentException("Bean class " + beanCls.getName() + " does not have a type for property " + name + '.');
			propCls = Reflections.wrapperIfPrimitive(propCls);
			if(value==null)
				valCls = propCls;
			else
				valCls = value.getClass();
			if(!propCls.isAssignableFrom(valCls))
			{
				if(String.class.equals(valCls))
				{
					setPropertyAsText(bean, name, (String)value, pd, propCls, tagCls);
					continue;
				}
				throw new IllegalArgumentException("Property " + name + " of class " + beanCls.getName() + " is of type " + propCls.getName() + " which is not assignable from " + valCls.getName() + '.');
			}
			if(tagCls!=null&&!meth.isAnnotationPresent(tagCls))
				throw new IllegalArgumentException("Write method " + meth + " for property " + name + " of class " + bean.getClass() + " does not have annotation " + tagCls + '.');
			meth.invoke(bean, prop.getValue());
		}
	}
680131
public void setProperties( Map<String,String> properties ) {
        Map<String,String> userProperties = systemSession.getUserProperties();
        if ( userProperties == null ) {
            userProperties = new HashMap<String,String>();
        }
        userProperties.putAll( properties );
        
        log.debug( "Session userProperties: {}", userProperties );
        
        systemSession = (MavenRepositorySystemSession)systemSession.setUserProperties( userProperties );
        
    }
1048010
public void setParent(Constituent v) {
    if (Constituent_Type.featOkTst && ((Constituent_Type)jcasType).casFeat_parent == null)
      jcasType.jcas.throwFeatMissing("parent", "de.julielab.jules.types.Constituent");
    jcasType.ll_cas.ll_setRefValue(addr, ((Constituent_Type)jcasType).casFeatCode_parent, jcasType.ll_cas.ll_getFSRef(v));}
314571
def setComponents(self, components):
        
        layout = self.layout()
        for comp in components:
            attrWidget = ComponentAttributerChecker(comp)
            layout.addWidget(attrWidget)