/** * Return the BaseProperty object for the current bean */ public BaseProperty getProperty() { return (BaseProperty)this.beanProp(); }
/** * Return the BaseProperty object for the specified property */ public BaseProperty getProperty(String propName) { return (BaseProperty)this.beanProp(propName); }
/** * Return the BaseBean parent of the current bean. This might return null * either because this is the root of the graph or because this node is not * part of a schema2beans graph yet. */ public BaseBean parent() { BeanProp bp = this.beanProp(); if (bp != null) return this.beanProp().getBean(); else return null; }
/** * Return the values of the indexed property named name. The result * can be cast as an array of the property type. */ public Object[] getValues(String name) { return this.beanProp(name).getValues(); }
/** * Equivalent to isChoiceProperty(name) on the current bean property. */ public boolean isChoiceProperty() { return this.beanProp().isChoiceProperty(); }
/** * Return the list of all known attribute names for the current bean */ public String[] getAttributeNames() { BeanProp bp = this.beanProp(); if (bp != null) return bp.getAttributeNames(); else return null; }
public void addPropertyChangeListener(String n, PropertyChangeListener l) { BeanProp p = this.beanProp(n); if (p != null) p.addPCListener(l); }
/** * Convert the user index value into the internal unique index value. * The property name specified must be an indexed property. */ public int indexToId(String name, int index) { return this.beanProp(name).indexToId(index); }
/** * Add a value to the indexed property named name. */ public int addValue(String name, Object value) { return addValue(beanProp(name), value); }
/** * Set the value of the attribute (see the BeanClass class) */ public void setAttributeValue(String propName, String name, String value) { this.beanProp(propName).setAttributeValue(0, name, value); }
/** * Return the value of the single property named name. */ public Object getValue(String name) { return this.beanProp(name).getValue(0); }
/** * Return one element of the indexed property named name. */ public Object getValue(String name, int index) { return this.beanProp(name).getValue(index); }
/** * Return the size of the indexed property named name (the size * might be greater than the number of elements if the indexed * property array contains null elements). */ public int size(String name) { return this.beanProp(name).size(); }
/** * Return true if the property name is a choice property (defined * in the DTD with the | char, such as (a | b | c ...) */ public boolean isChoiceProperty(String name) { return this.beanProp(name).isChoiceProperty(); }
/** * Get the attribute value (see BeanProp class) */ public String getAttributeValue(String propName, int index, String name) { return this.beanProp(propName).getAttributeValue(index, name); }
/** * Return the list of all known attribute names for this property * (even if they are not set). */ public BaseAttribute[] listAttributes(String propName) { return this.beanProp(propName).getAttributes(); }
/** * Return a new instance of the specified bean property */ public BaseBean newInstance(String name) { return this.beanProp(name).newBeanInstance(); }
public void removePropertyChangeListener(String n, PropertyChangeListener l) { BeanProp p = this.beanProp(n); if (p != null) p.removePCListener(l); }
/** * Set the value of an element for the indexed property named name, * using the unique internal index. */ public void setValueById(String name, int id, Object value) { BeanProp bp = this.beanProp(name); int index = bp.idToIndex(id); bp.setValue(index, value); }