Creates Feature annotation object

@param value feature names array
@return Feature annotation object
509492
Features getFeaturesAnnotation(final String[] value) {
        return new Features() {

            @Override
            public String[] value() {
                return value;
            }

            @Override
            public Class<Features> annotationType() {
                return Features.class;
            }
        };
    }
171848
public PersistenceDescriptor addNamespace(String name, String value)
   {
      model.attribute(name, value);
      return this;
   }
530280
public ValidationMappingDescriptor addNamespace(String name, String value)
   {
      model.attribute(name, value);
      return this;
   }
100014
private void _addFeatureOnce(Object name, Feature feature) {
        String _name = String.valueOf(name);
        if (!this.feature().containsKey(_name)) {
            this.feature().put(_name, feature);
        }
    }
761221
public void addFeature(String feature) {
        if (feature == null) {
            throw new IllegalArgumentException("Invalid null argument passed for addFeature");
        }
        feature = feature.trim();
        if (!feature.isEmpty()) { 
            Feature newFeature = new Feature();
            newFeature.addText(feature);
            featureList.add(newFeature);
        }
    }
380106
public static <T extends Annotation> T create(Class<T> annotationType, Object value) {
    return new Builder<T>(annotationType).withValue(value).create();
  }
517152
public Toolbox feature(Object... values) {
        if (values == null && values.length == 0) {
            return this;
        }
        if (this.feature == null) {
            this.feature = new LinkedHashMap<String, Feature>();
        }
        for (Object t : values) {
            if (t instanceof Feature) {
                _addFeature((Feature) t);
            } else if (t instanceof Tool) {
                switch ((Tool) t) {
                    case dataView:
                        _addFeatureOnce(t, Feature.dataView);
                        break;
                    case dataZoom:
                        _addFeatureOnce(t, Feature.dataZoom);
                        break;
                    case magicType:
                        _addFeatureOnce(t, Feature.magicType);
                        break;
                    case mark:
                        _addFeatureOnce(t, Feature.mark);
                        break;
                    case restore:
                        _addFeatureOnce(t, Feature.restore);
                        break;
                    case saveAsImage:
                        _addFeatureOnce(t, Feature.saveAsImage);
                        break;
                    default:
                        //ignore
                }
            }
        }
        return this;
    }
523872
public function addValue(FeatureValue $value)
    {
        $value->setFeature($this);
        $this->values->add($value);

        return $this;
    }
468602
public Effort createEffort(double value, Map<String, Object> attributes) {
        return createEffort(value, null, null, attributes);
    }
674492
@Override
    public void visit(String name, Object value) {
        if (tc.isDebugEnabled()) {
            Tr.debug(tc, MessageFormat.format("visit [ {0} ] Name [ {1} ] Value [ 2 ]",
                                              getHashText(), name, value));
        }

        if (value instanceof Type) {
            Type valueAsType = (Type) value;

            // TODO: The value stored as the class name, not as an info object.
            //       For now, let the caller obtain the value as a class info.
            //
            //       Whether to allow resolution of class values as class info
            //       objects is an open question.  No particular value is known
            //       at this time for adding a class info type access API.
            //
            // See the similar code in 'InfoVisitor_DefaultValue.visit(String, Object)'.

            // value = infoStore.getDelayableClassInfo( valueAsType.getClassName() );

            value = valueAsType.getClassName();
        }

        AnnotationValueImpl newAnnotationValue = new AnnotationValueImpl(value);

        storeAnnotationValue(name, newAnnotationValue);
    }
1036490
public AnnotationDescr addAnnotation( String name,
                                          String value ) {
        if ( this.annotations == null ) {
            this.annotations = new HashMap<String, AnnotationDescr>();
        } else {
            AnnotationDescr existingAnnotation = annotations.get( name );
            if (existingAnnotation != null) {
                existingAnnotation.setDuplicated();
                return existingAnnotation;
            }
        }
        AnnotationDescr annotation = new AnnotationDescr( name,
                                                          value );
        annotation.setResource(getResource());
        return this.annotations.put( annotation.getName(),
                                     annotation );
    }
897359
static public LinkedHashMap<String,FeatureList> buildFeatureAtrributeIndex(String attribute,FeatureList list){

		LinkedHashMap<String,FeatureList> featureHashMap = new LinkedHashMap<String,FeatureList>();
		FeatureList featureList = list.selectByAttribute(attribute);
		for(FeatureI feature : featureList){
			String value = feature.getAttribute(attribute);
			FeatureList features = featureHashMap.get(value);
			if(features == null){
				features = new FeatureList();
				featureHashMap.put(value, features);
			}
			features.add(feature);
		}

		return featureHashMap;
	}
74
public SyntacticCategory assignAllFeatures(String value) {
    Set<Integer> featureVars = Sets.newHashSet();
    getAllFeatureVariables(featureVars);

    Map<Integer, String> valueMap = Maps.newHashMap();
    for (Integer var : featureVars) {
      valueMap.put(var, value);
    }
    return assignFeatures(valueMap, Collections.<Integer, Integer>emptyMap());
  }
1342144
public void addListFieldValue(String fieldName, Object value) {
		Object val = value;
		if (value instanceof DomainObject)
			val = ((DomainObject)value).getRawObject();
		Object lst = getFieldValue(fieldName, true); // internal
		
		DOField fld = getDomainObjectType().getFieldByName(fieldName);
		String ctn = fld.getComponentTypeName();
		Class<?> clazz;
		try {
			clazz = getDomainObjectType().getDomainModel().getClassForName(ctn);
			if (!clazz.isAssignableFrom(val.getClass()))
				throw new RuntimeException("value must be of type or subtype of: [" + clazz.getName() + "]");
			lst = tryInitListOrArray(lst, fld, clazz);
		} catch (ClassNotFoundException e) {
			throw new RuntimeException(e);
		}
		
		if (lst instanceof List<?>) {
			@SuppressWarnings("unchecked")
			List<Object> list = (List<Object>)lst;
			list.add(val);
		} else if (lst != null && lst.getClass().isArray()) {
			int len = Array.getLength(lst);
			Object array = Array.newInstance(clazz, len + 1);
			for (int i = 0; i < len; i++) {
				Array.set(array, i, Array.get(lst, i));
			}
			Array.set(array, len, val);
		} else {
			if (!getDomainObjectType().getFieldByName(fieldName).isListOrArray())
				throw new RuntimeException("field: [" + fieldName + "] is neither list nor array");
			if (lst == null)
				throw new RuntimeException("field: [" + fieldName + "] has not been initialized as list or array");
		}
	}
1155263
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "featureProperty")
    public JAXBElement<FeaturePropertyType> createFeatureProperty(FeaturePropertyType value) {
        return new JAXBElement<FeaturePropertyType>(_FeatureProperty_QNAME, FeaturePropertyType.class, null, value);
    }
903163
public BeansDescriptor addNamespace(String name, String value)
   {
      model.attribute(name, value);
      return this;
   }
205340
public int ensureFeature(String featureName) {
        int feature = featureToIndex.getOrDefault(featureName, -1);
        if (feature == -1) {
            synchronized (featureToIndex) {
                feature = featureToIndex.getOrDefault(featureName, -1);
                if (feature == -1) {
                    feature = featureToIndex.size();
                    featureToIndex.put(featureName, feature);
                }
            }
        }
        return feature;
    }