public ArrayList getElementNames(){ ArrayList elements = new ArrayList(); BaseProperty[] baseProperty = baseBean.listProperties(); int size = baseProperty.length; for(int i=0; i<size; i++){ elements.add(baseProperty[i].getName()); ///String format = /// BundleReader.getValue("Name_Value_Pair_Format"); //NOI18N ///Object[] arguments = new Object[]{"Name", //NOI18N /// baseProperty[i].getName()}; ///System.out.println(MessageFormat.format(format, arguments)); ///arguments = /// new Object[]{"FullName", baseProperty[i].getFullName()};//NOI18N ///System.out.println(MessageFormat.format(format, arguments)); } return elements; }
int seekNext() { // Seek doesn't move the pos - next() does if (this.baseProp.isBean()) { while(this.values.length>this.pos && this.values[this.pos] == null) { this.pos++; } } if (this.values.length == this.pos) return -1; return this.pos; }
public ArrayList getElementDtdNames(){ ArrayList elements = new ArrayList(); BaseProperty[] baseProperty = baseBean.listProperties(); int size = baseProperty.length; for(int i=0; i<size; i++){ elements.add(baseProperty[i].getDtdName()); ///String format = /// BundleReader.getValue("Name_Value_Pair_Format"); //NOI18N ///Object[] arguments = new Object[]{"Dtd Name", //NOI18N /// baseProperty[i].getDtdName()}; ///System.out.println(MessageFormat.format(format, arguments)); } return elements; }
String name = p.getName(); BeanProp bp = (BeanProp)p; int size = p.size(); if (!p.isBean()) { if (((propName != null && p.hasName(propName)) || (propName == null && attrName == null))) { if (DDLogFlags.debug) { if (p.isIndexed()) { attrs = p.getAttributes(); if (propName == null && attrs.length > 0) this.lookForAttribute(found, bp, null, attrs, if (p.isBean() && p.isIndexed()) { BaseBean[] ba = (BaseBean[])bean.getValues(name); for (int k=0; k<ba.length; k++) find(ba[k], found, propName, attrName, value); } else if (p.isBean()) { BaseBean b = (BaseBean)bean.getValue(name); find(b, found, propName, attrName, value);
void setValues(BaseBean b) { this.curParent = b; if (baseProp.isIndexed()) { this.values = b.getValues(this.name); } else { if (this.baseProp.isBean()) { if (this.keyName != null && this.keyValue != null) { if (this.baseProp.isBean()) { BaseBean bb = b.newInstance(this.name); if (this.keyName != null) bb.setValue(this.keyName, this.keyValue); if (this.baseProp.isIndexed()) b.addValue(this.name, bb); else if (this.keyValue != null) { this.values = new Object[] {this.keyValue}; if (this.baseProp.isIndexed()) { b.setValue(this.name, this.values); } else {
public boolean isIndexed(String elementName){ BaseProperty baseProperty = baseBean.getProperty(elementName); boolean returnValue = false; if(null != baseProperty) { returnValue = baseProperty.isIndexed(); } else { String format = BundleReader.getValue("Error_does_not_exists"); //NOI18N Object[] arguments = new Object[]{"Property", elementName}; //NOI18N String message = MessageFormat.format(format, arguments); assert false : message; } return returnValue; }
public int getElementCardinal(String elementName){ BaseProperty baseProperty = baseBean.getProperty(elementName); int returnValue = -1; if(null != baseProperty) { returnValue = baseProperty.getInstanceType(); } else { String format = BundleReader.getValue("Error_does_not_exists"); //NOI18N Object[] arguments = new Object[]{"Property", elementName}; //NOI18N String message = MessageFormat.format(format, arguments); assert false : message; } return returnValue; }
&& curBean.getProperty().isKey()) {
DDLocation getLocation() { return new DDParser.DDLocation(this.curParent, this.name, ((this.baseProp.isIndexed())? this.pos-1:-1), ((BeanProp)this.baseProp).getType()); }
public int getCardinal(){ String name = baseBean.name(); BaseBean parent = baseBean.parent(); BaseProperty baseProperty = parent.getProperty(name); return baseProperty.getInstanceType(); }
public boolean isBeanElement(String elementName){ BaseProperty baseProperty = baseBean.getProperty(elementName); boolean returnValue = false; if(null != baseProperty) { returnValue = baseProperty.isBean(); } else { String format = BundleReader.getValue("Error_does_not_exists"); //NOI18N Object[] arguments = new Object[]{"Property", elementName}; //NOI18N String message = MessageFormat.format(format, arguments); assert false : message; } return returnValue; }