/** * Get the property. */ protected Object getProperty(Object info) { Object ret = null; if(info instanceof AttributeInfo) { ret = ((AttributeInfo)info).getAttributeIdentifier(); } else if(info instanceof OAVAttributeType) { ret = info; } else { throw new RuntimeException("Unknown property type: "+info); } return ret; }
/** * Get the property. */ protected Object getProperty(Object info) { Object ret = null; if(info instanceof AttributeInfo) { ret = ((AttributeInfo)info).getAttributeIdentifier(); } else if(info instanceof OAVAttributeType) { ret = info; } else { throw new RuntimeException("Unknown property type: "+info); } return ret; }
/** * Create the attribute info map (xml name -> attribute info). */ protected Map createAttributeInfos(AttributeInfo[] attributeinfos) { Map ret = new LinkedHashMap(); for(int i=0; i<attributeinfos.length; i++) { QName xmlname = attributeinfos[i].getXMLAttributeName(); if(xmlname==null) { Object attrid = attributeinfos[i].getAttributeIdentifier(); if(attrid!=null) { xmlname = new QName(attrid.toString()); // System.out.println("Warning, no xml name for attribute:"+attrid); } } ret.put(xmlname, attributeinfos[i]); } return ret; }
attrtype = (OAVAttributeType)info.getAttributeIdentifier(); if(val==null && info.getAccessInfo().getDefaultValue()!=null)
attrtype = (OAVAttributeType)info.getAttributeIdentifier(); if(val==null && info.getAccessInfo().getDefaultValue()!=null)