/** * Returns a String representing this SBase with all the * attributes that are defined. * * @return a String representing this SBase with all its * attributes */ @Override public String toString() { Map<String, String> attMap = writeXMLAttributes(); StringBuilder sb = new StringBuilder(""); sb.append(getElementName()).append(" ["); if (attMap != null) { // print id, name and metaid first sb.append(extractAttribute(attMap, "id")); sb.append(extractAttribute(attMap, "name")); sb.append(extractAttribute(attMap, "metaid")); for (String attributeName : attMap.keySet()) { sb.append(" ").append(attributeName).append("=\""); sb.append(attMap.get(attributeName)).append("\""); } } sb.append("]"); return sb.toString(); }