/** * Misc: return the property of name 'name' */ public AttrProp getAttrProp(String name) { return this.getAttrProp(name, false); }
/** * When the bean tree is built from an XML document and an attribute * not defined in the DTD is found, the attribute is dynamically added * to the list of defined attribute with the TRANSIENT status. */ public void createTransientAttribute(String dtdName) { // Add the attribute only if we don't know about it AttrProp ap = this.getAttrProp(dtdName, true); if (ap != null) return; ap = new AttrProp(this.dtdName, dtdName, Common.convertName(dtdName), AttrProp.CDATA | AttrProp.IMPLIED | AttrProp.TRANSIENT, null, null); this.attributes.add(ap); if (DDLogFlags.debug) { TraceLogger.put(TraceLogger.DEBUG, TraceLogger.SVC_DD, DDLogFlags.DBG_BLD, 5, DDLogFlags.CREATEATTR, this.beanName + ": " + ap.toString()); } }
/** * Get the attribute value */ public String getAttributeValue(int index, String name) { String ret = null; AttrProp ap = this.getAttrProp(name); if (!Common.isArray(this.type)) { // Value not set for single type property - return null if ((index > 0) || (this.bindingsSize() == 0)) return null; } DOMBinding b = (DOMBinding)this.bindings.get(index); if (b != null) ret = b.getAttributeValue(this, ap.getDtdName()); if (DDLogFlags.debug) { TraceLogger.put(TraceLogger.DEBUG, TraceLogger.SVC_DD, DDLogFlags.DBG_BLD, 10, DDLogFlags.GETATTR, this.beanName + "[" + index + "]." + ap.getDtdName() + ": " + ret + " " + ((b==null)?"<no binding>":("B("+b.hashCode()+")"))+ " BP(" + this.hashCode() + ")"); } return ret; }
public void setDefaultNamespace(String namespace) { defaultNamespace = namespace; createAttribute("xmlns", "xmlns", AttrProp.CDATA | AttrProp.IMPLIED, null, namespace); setAttributeValue("xmlns", namespace); if (beanProp().getAttrProp("xsi:schemaLocation", true) == null) { createAttribute("xmlns:xsi", "xmlns:xsi", AttrProp.CDATA | AttrProp.IMPLIED, null, null); createAttribute("xsi:schemaLocation", "xsi:schemaLocation", AttrProp.CDATA | AttrProp.IMPLIED, null, null); } }
public String _getSchemaLocation() { if (beanProp().getAttrProp("xsi:schemaLocation", true) == null) { createAttribute("xmlns:xsi", "xmlns:xsi", AttrProp.CDATA | AttrProp.IMPLIED, null, "http://www.w3.org/2001/XMLSchema-instance"); setAttributeValue("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); createAttribute("xsi:schemaLocation", "xsi:schemaLocation", AttrProp.CDATA | AttrProp.IMPLIED, null, null); } return getAttributeValue("xsi:schemaLocation"); }
public void _setSchemaLocation(String location) { if (beanProp().getAttrProp("xsi:schemaLocation", true) == null) { createAttribute("xmlns:xsi", "xmlns:xsi", AttrProp.CDATA | AttrProp.IMPLIED, null, "http://www.w3.org/2001/XMLSchema-instance"); setAttributeValue("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); createAttribute("xsi:schemaLocation", "xsi:schemaLocation", AttrProp.CDATA | AttrProp.IMPLIED, null, location); } setAttributeValue("xsi:schemaLocation", location); }
public void _setSchemaLocation(String location) { if (beanProp().getAttrProp("xsi:schemaLocation", true) == null) { createAttribute("xmlns:xsi", "xmlns:xsi", AttrProp.CDATA | AttrProp.IMPLIED, null, "http://www.w3.org/2001/XMLSchema-instance"); setAttributeValue("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); createAttribute("xsi:schemaLocation", "xsi:schemaLocation", AttrProp.CDATA | AttrProp.IMPLIED, null, location); } setAttributeValue("xsi:schemaLocation", location); }
public String _getSchemaLocation() { if (beanProp().getAttrProp("xsi:schemaLocation", true) == null) { createAttribute("xmlns:xsi", "xmlns:xsi", AttrProp.CDATA | AttrProp.IMPLIED, null, "http://www.w3.org/2001/XMLSchema-instance"); setAttributeValue("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); createAttribute("xsi:schemaLocation", "xsi:schemaLocation", AttrProp.CDATA | AttrProp.IMPLIED, null, null); } return getAttributeValue("xsi:schemaLocation"); }
AttrProp ap = this.getAttrProp(name);
for(int j=0; j<attrs.length; j++) { String a = attrs[j]; if (!this.beanProp().getAttrProp(a).isFixed()) { String v = this.getAttributeValue(a); if (bean.getAttributeValue(a) != v) for(int j=0; j<attrs.length; j++) { String a = attrs[j]; if (!prop.getAttrProp(a).isFixed()) { for(int i=0; i<size; i++) { String v = prop.getAttributeValue(i, a); for(int j=0; j<attrs.length; j++) { String a = attrs[j]; if (!prop.getAttrProp(a).isFixed()) { String v = prop.getAttributeValue(0, a); if (bean.getAttributeValue(name, 0, a) != v)