/** * @return the raw architecture. */ public String getArchitecture() { return architecture.getInstanceDescription().getDescription() .toString().replace("\t", " ").replace(" ", " "); }
/** * Prints instance description. * @param name : instance name * @param out : default print stream * @param err : error print stream (if the instance is not found) */ private void printInstance(String name, PrintStream out, PrintStream err) { for (int i = 0; i < m_archs.length; i++) { InstanceDescription instance = m_archs[i].getInstanceDescription(); if (instance.getName().equalsIgnoreCase(name)) { out.println(instance.getDescription()); return; } } err.println("Instance " + name + " not found"); }
/** * Gets the instance description. * Overridden to add created objects. * @return the instance description */ public Element getDescription() { Element elem = super.getDescription(); elem.addElement(getInternalServices()); InstanceDescription[] descs = getContainedInstances(); if (descs.length > 0) { Element inst = new Element("ContainedInstances", ""); for (int i = 0; i < descs.length; i++) { inst.addElement(descs[i].getDescription()); } elem.addElement(inst); } return elem; }
InstanceDescription id = m_arch.getInstanceDescription(); if (id.getName().equalsIgnoreCase(instance)) { sb.append(id.getDescription()); sb.append('\n');
/** * Gets the instance description. * Overridden to add created objects. * @return the instance description */ public Element getDescription() { Element elem = super.getDescription(); elem.addElement(getInternalServices()); InstanceDescription[] descs = getContainedInstances(); if (descs.length > 0) { Element inst = new Element("ContainedInstances", ""); for (int i = 0; i < descs.length; i++) { inst.addElement(descs[i].getDescription()); } elem.addElement(inst); } return elem; }
/** * Gets the instance description. * Overridden to add created objects. * @return the instance description */ public Element getDescription() { Element elem = super.getDescription(); // Created Object (empty is composite) String[] objs = getCreatedObjects(); for (int i = 0; objs != null && i < objs.length; i++) { Element obj = new Element("Object", ""); obj.addAttribute(new Attribute("name", ((Object) objs[i]).toString())); elem.addElement(obj); } return elem; }
/** * Gets the instance description. * Overridden to add created objects. * @return the instance description */ public Element getDescription() { Element elem = super.getDescription(); // Created Object (empty is composite) String[] objs = getCreatedObjects(); for (int i = 0; objs != null && i < objs.length; i++) { Element obj = new Element("Object", ""); obj.addAttribute(new Attribute("name", ((Object) objs[i]).toString())); elem.addElement(obj); } return elem; }
/** * Method returning an instance object of the given component type. * This method must be called only on 'primitive' type. * @param type : type. * @return an instance object or null if not found. */ public Object getObjectFromInstance(String type) { for (int i = 0; i < m_configurations.length; i++) { if (m_configurations[i].getInstance() != null && type.equals(m_configurations[i].getFactory())) { if (m_configurations[i].getInstance().getState() == ComponentInstance.VALID) { return ((InstanceManager) m_configurations[i].getInstance()).getPojoObject(); } else { error("An object cannot be get from the instance of the type " + type + ": invalid instance" + m_configurations[i].getInstance().getInstanceDescription().getDescription()); return null; } } } return null; }
/** * Method returning an instance object of the given component type. * This method must be called only on 'primitive' type. * @param type : type. * @return an instance object or null if not found. */ public Object getObjectFromInstance(String type) { for (int i = 0; i < m_configurations.length; i++) { if (m_configurations[i].getInstance() != null && type.equals(m_configurations[i].getFactory())) { if (m_configurations[i].getInstance().getState() == ComponentInstance.VALID) { return ((InstanceManager) m_configurations[i].getInstance()).getPojoObject(); } else { error("An object cannot be get from the instance of the type " + type + ": invalid instance" + m_configurations[i].getInstance().getInstanceDescription().getDescription()); return null; } } } return null; }
pw.value(instance.getDescription().toString());