public void createInstanceFromExisting(KeplerDocumentationAttribute da) {
//System.out.println("da att list: " + da.attributeList());
//need to get: description, author, version, userleveldocumentation, ports, properties
Iterator itt = da.attributeList().iterator();
while (itt.hasNext()) {
ConfigurableAttribute att = (ConfigurableAttribute) itt.next();
String attName = att.getName();
if (attName.equals("description")) {
this.description = att.getConfigureText();
} else if (attName.equals("author")) {
this.author = att.getConfigureText();
} else if (attName.equals("version")) {
this.version = att.getConfigureText();
} else if (attName.equals("userLevelDocumentation")) {
this.userLevelDocumentation = att.getConfigureText();
} else if (attName.indexOf("port:") != -1) { //add to the port hash
String portName = attName.substring(attName.indexOf(":") + 1,
attName.length());
String portDesc = att.getConfigureText();
if (portName != null) {
if (portDesc == null) {
portDesc = "";
}
portHash.put(portName, portDesc);
}
} else if (attName.indexOf("prop:") != -1) { //add to the prop hash
String propName = attName.substring(attName.indexOf(":") + 1,
attName.length());
String propDesc = att.getConfigureText();
if (propName != null) {
if (propDesc == null) {
propDesc = "";
}
propertyHash.put(propName, propDesc);