Instantiates a recommender according to the provided properties mapping.

@param properties the properties to be used when initializing the
recommender
@return the recommender instantiated
515657
public static AbstractRunner<Long, Long> instantiateRecommender(final Properties properties) {
        if (properties.getProperty(RECOMMENDER) == null) {
            System.out.println("No recommenderClass specified, exiting.");
            return null;
        }
        if (properties.getProperty(TRAINING_SET) == null) {
            System.out.println("No training set specified, exiting.");
            return null;
        }
        if (properties.getProperty(TEST_SET) == null) {
            System.out.println("No training set specified, exiting.");
            return null;
        }

        AbstractRunner<Long, Long> rr = null;
        if (properties.getProperty(FRAMEWORK).equals(MAHOUT)) {
            rr = new MahoutRecommenderRunner(properties);
        } else if (properties.getProperty(FRAMEWORK).equals(LENSKIT)) {
            rr = new LenskitRecommenderRunner(properties);
        } else if (properties.getProperty(FRAMEWORK).equals(RANKSYS)) {
            rr = new RanksysRecommenderRunner(properties);
        }
        return rr;
    }
452033
public PropertyDescriptor[] getPropertyDescriptors() {

        try {

            return new PropertyDescriptor[] {
                new PropertyDescriptor("name", JMSReceiver.class),
                new PropertyDescriptor("topicFactoryName", JMSReceiver.class),
                new PropertyDescriptor("topicName", JMSReceiver.class),
                new PropertyDescriptor("threshold", JMSReceiver.class),
                new PropertyDescriptor("jndiPath", JMSReceiver.class),
                new PropertyDescriptor("userId",
                        JMSReceiver.class),
            };
        } catch (Exception e) {
        }

        return null;
    }
870873
public void updateProperties(Map<Object, Object> properties) {
        this.commonProperties = properties;
        this.myConfig = new HttpFactoryConfig(properties);
    }
1194882
public Map<String, Object> convertPropertiesToMap(Properties properties) {
        return properties.entrySet().stream()
                .collect(toLinkedMap(
                        e -> e.getKey().toString(),
                        e -> e.getValue()));
    }
880107
public PropertyRequest addProperty(ElementDescriptor<?> property)
	{
		if (mProp == null)
		{
			mProp = new HashMap<ElementDescriptor<?>, Object>(16);
		}
		mProp.put(property, null);
		return this;
	}
743452
public static Map<String, CmsProperty> toObjectMap(Iterable<CmsProperty> properties) {

        Map<String, CmsProperty> result = new LinkedHashMap<String, CmsProperty>();
        for (CmsProperty property : properties) {
            result.put(property.getName(), property);
        }
        return result;
    }
43202
protected Map<String, CmsProperty> getPropertiesByName(List<CmsProperty> properties) {

        Map<String, CmsProperty> result = new HashMap<String, CmsProperty>();
        for (CmsProperty property : properties) {
            String key = property.getName();
            result.put(key, property.clone());
        }
        return result;
    }
380617
public SimpleHTMLTag setProperties(Map<String, String> properties) {
        if (properties == null || properties.isEmpty()) {
            this.properties = null;
        } else {
            this.properties = new HashMap<>();

            for (Entry<String, String> entry : properties.entrySet()) {
                String key = entry.getKey();
                key = UniformUtils.checkPropertyNameAndLowerCase(key);

                this.properties.put(key, entry.getValue());
            }
        }

        return this;
    }
629222
public static void runRanksysRecommenders(final Set<String> paths, final Properties properties) {
        for (AbstractRunner<Long, Long> rec : instantiateRanksysRecommenders(paths, properties)) {
            RecommendationRunner.run(rec);
        }
    }
839240
public static Sort by(final String... properties) {

    Assert.notNull(properties, "Properties must not be null!");

    return properties.length == 0 ? Sort.unsorted() : new Sort(properties);
  }
695619
public MYSELF defaultValueProperty(String... properties) {
		for (String prop : properties) {
			String propertyKey = BuilderUtils.isExpression(prop) ? BuilderUtils.getPropertyKey(prop) : prop;
			this.defaultValueProperties.add(propertyKey);
		}
		return myself;
	}
620562
private Properties loadProperties() {

        props = new Properties();

        try {
            InputStream in = Version.class.getResourceAsStream("version.properties");
            props.load(in);
            in.close();
        } catch (Exception e) {
            throw new Error("Missing version.properties");
        }

        return props;
    }
323796
@Override
	public synchronized void setProperties(Map<Object, Object> properties)
	{
		if(this.properties == null)
			this.properties = new Properties();
		
		
		this.properties.putAll(properties);
	}
711894
public static ApplicationDescriptor load( Properties properties ) {

		ApplicationDescriptor result = new ApplicationDescriptor();
		result.name = properties.getProperty( APPLICATION_NAME, null );
		result.description = properties.getProperty( APPLICATION_DESCRIPTION, null );
		result.templateName = properties.getProperty( APPLICATION_TPL_NAME, null );
		result.templateVersion = properties.getProperty( APPLICATION_TPL_VERSION, null );

		return result;
	}
802577
public static QueryOptimizer newOptimizer(HazelcastProperties properties) {
        HazelcastProperty property = GroupProperty.QUERY_OPTIMIZER_TYPE;
        String string = properties.getString(property);
        Type type;
        try {
            type = Type.valueOf(string);
        } catch (IllegalArgumentException e) {
            throw onInvalidOptimizerType(string);
        }
        switch (type) {
            case RULES:
                return new RuleBasedQueryOptimizer();
            default:
                return new EmptyOptimizer();
        }
    }
1108773
public Map<String,Object> addPropertiesFile(Map<String,Object> properties)
    {
        String propertiesPath = (String)properties.get("webStartPropertiesFile");
        if (propertiesPath == null)
            return properties;
        if (propertiesPath.startsWith("/"))
            propertiesPath = propertiesPath.substring(1);
        URL url = null;
        try {
            url = ClassServiceUtility.getClassService().getResourceURL(propertiesPath, null, null, this.getClass().getClassLoader());
        } catch (RuntimeException e) {
            e.printStackTrace();    // ???
        }           
        Reader inStream = null;
        if (url != null)
        {
            try {
                inStream = new InputStreamReader(url.openStream());
            } catch (Exception e) {
                // Not found
            }
        }
        if (inStream != null)
        {
            try {
                // Todo may want to add cache info (using bundle lastModified).
                Properties cachedProperties = new Properties();
                cachedProperties.load(inStream);
                inStream.close();
                for (Object key : cachedProperties.keySet())
                {
                    properties.put(key.toString(), cachedProperties.get(key));
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return properties;
    }
665144
public InterceptorConfigurationBuilder withProperties(Properties properties) {
      attributes.attribute(PROPERTIES).set(TypedProperties.toTypedProperties(properties));
      return this;
   }