/** * Convenience method that sets the named feature as a String. * * @param name the name of the feature * @param value the value of the feature */ public void setString(String name, String value) { setObject(name, value); }
/** * Sets the named feature. * * @param name the name of the feature * @param value the value of the feature */ public void setObject(String name, Object value) { features.setObject(name, value); }
/** * Adds the given item to the set of relations. Whenever an item is added * to a relation, it should add the name and the Item reference to this set * of name/item mappings. This allows an item to find out the set of all * relations that it is contained in. * * @param relationName the name of the relation * @param item the item reference in the relation */ public void addItemRelation(String relationName, Item item) { // System.out.println("AddItemRelation: " + relationName // + " item: " + item); relations.setObject(relationName, item); }
/** * Convenience method that sets the named feature as a int. * * @param name the name of the feature * @param value the value of the feature */ public void setInt(String name, int value) { setObject(name, new Integer(value)); }
/** * Convenience method that sets the named feature as a float. * * @param name the name of the feature * @param value the value of the feature */ public void setFloat(String name, float value) { setObject(name, new Float(value)); }
/** * Creates a new relation with the given name and adds it to this * utterance. * * @param name the name of the new relation * * @return the newly created relation */ public Relation createRelation(String name) { Relation relation = new Relation(name, this); relations.setObject(name, relation); return relation; }
/** * Convenience method that sets the named feature as a String. * * @param name the name of the feature * @param value the value of the feature */ public void setString(String name, String value) { setObject(name, value); }
/** * Sets the named feature. * * @param name the name of the feature * @param value the value of the feature */ public void setObject(String name, Object value) { features.setObject(name, value); }
/** * Adds the given item to the set of relations. Whenever an item is added * to a relation, it should add the name and the Item reference to this set * of name/item mappings. This allows an item to find out the set of all * relations that it is contained in. * * @param relationName the name of the relation * @param item the item reference in the relation */ public void addItemRelation(String relationName, Item item) { // System.out.println("AddItemRelation: " + relationName // + " item: " + item); relations.setObject(relationName, item); }
/** * Convenience method that sets the named feature as a float. * * @param name the name of the feature * @param value the value of the feature */ public void setFloat(String name, float value) { setObject(name, new Float(value)); }
/** * Convenience method that sets the named feature as a int. * * @param name the name of the feature * @param value the value of the feature */ public void setInt(String name, int value) { setObject(name, new Integer(value)); }
/** * Creates a new relation with the given name and adds it to this * utterance. * * @param name the name of the new relation * * @return the newly created relation */ public Relation createRelation(String name) { Relation relation = new Relation(name, this); relations.setObject(name, relation); return relation; }