/** * Constructor sets Attribute. * * @param attribute * Attribute */ public GDSTableModel(Attribute attribute) { if (attribute != null) { this.attribute = attribute; this.dataType = attribute.getOfType().getDataTypeAsString(); } }
.getDataTypeAsString(); int gdsno = rs.getInt("gds.key");
String an = attrname.getDataTypeAsString();
String an = getAttributeName(id).getDataTypeAsString();
String an = attrname.getDataTypeAsString();
public void setValue(Object value) { String an = getOfType().getDataTypeAsString();
.getDataTypeAsString(); int gdsno = rs.getInt("gds.key");
public Object getValue() { String an = getOfType().getDataTypeAsString(); if (an.equals("java.lang.String") || an.equals("java.lang.Character")) {
/** * Generate metadata for Attribute Name. * @param attr * An AttributeName (from the Ondex API). * @return JSONObject * JSONObject containing information about the Attribute. */ private JSONObject buildAttributeName(AttributeName attrName) { JSONObject attrNameJson= new JSONObject(); attrNameJson.put(JSONAttributeNames.ID, attrName.getId()); attrNameJson.put(JSONAttributeNames.FULLNAME, attrName.getFullname()); // Attribute Unit (optional). Unit attrUnit= attrName.getUnit(); if(attrUnit != null) { attrNameJson.put(JSONAttributeNames.UNIT, buildUnit(attrUnit)); } attrNameJson.put(JSONAttributeNames.DATATYPE, attrName.getDataTypeAsString()); attrNameJson.put(JSONAttributeNames.DESCRIPTION, attrName.getDescription()); // Attribute SpecialisationOf (optional). AttributeName spec= attrName.getSpecialisationOf(); if(spec != null) { attrNameJson.put(JSONAttributeNames.SPECIALISATIONOF, buildAttributeName(spec)); } return attrNameJson; }
createRow.close(); String an = attrname.getDataTypeAsString();
String className = an.getDataTypeAsString();
+ attrName.toString() + ".\nShould be " + attrName.getDataTypeAsString() + " but found " + value.getClass()
anFull = an.getFullname(); anDesc = an.getDescription(); className = an.getDataTypeAsString(); selectedUnit = an.getUnit(); selectedAn = an.getSpecialisationOf();
aname.getId () + Optional.ofNullable ( aname.getUnit () ).map ( u -> u.getId () ).orElse ( "" ) + ObjectUtils.defaultIfNull ( aname.getDataTypeAsString (), "_" )
/** * Cast a given AttributeName into a BerkeleyAttributeName. * * @param old * AttributeName * @return BerkeleyAttributeName */ protected static BerkeleyAttributeName convert(AttributeName old) { BerkeleyAttributeName nu = new BerkeleyAttributeName(old.getSID(), old.getId(), old.getFullname(), old.getDescription(), old.getUnit(), old.getDataTypeAsString(), old.getSpecialisationOf()); return nu; }
a.getId (), a.getFullname (), a.getDataTypeAsString (), Optional.of ( a.getDataType () ).map ( Object::toString ).orElse ( "<null>" )
String editorName = Config.config.getProperty("Dialog.Attribute." + an.getDataTypeAsString()); if (editorName == null) editorName = "DefaultEditor";
xmlw.writeCharacters(attr.getDataTypeAsString()); xmlw.writeEndElement();