public Collection createStandaloneChildren(Standalone standaloneComponent) { Collection standaloneChildren = new ArrayList(); standaloneChildren.addAll(createBaseChildren(standaloneComponent)); // TODO: Improve to parse all the attribute in an annotation Annotation annotation = standaloneComponent.getAnnotation(); if(annotation != null) { CompositeNode annotationNode = new CompositeNode(Resources.ANOTATION.getId(), Resources.ANOTATION.get()); for(Element element : annotation.getAny()) { for(int i = 0; i < element.getChildNodes().getLength(); i++) { Node node = element.getChildNodes().item(i); if(node.getLocalName() != null && node.getLocalName().equals(Resources.DESCRIPTION.get())) { // TODO: Still need to extract about from node component CompositeNode descriptionNode = new CompositeNode(Resources.DESCRIPTION.getId(), Resources.DESCRIPTION.get()); for(int j = 0; j < node.getChildNodes().getLength(); j++) { descriptionNode.addChild(createAnnotationChild(node.getChildNodes().item(j))); } annotationNode.addChild(descriptionNode); } } } standaloneChildren.add(annotationNode); } standaloneChildren.add(PopulateNodesModelTreeUtils.createTextMetadataNode(Resources.NOTES.getId(), Resources.NOTES.get(), new StringValue(standaloneComponent.getNotes()))); standaloneChildren.add(PopulateNodesModelTreeUtils.createTextMetadataNode(Resources.METAID.getId(), Resources.METAID.get(), new StringValue(standaloneComponent.getMetaid()))); for (Property property : standaloneComponent.getProperty()){ standaloneChildren.add(PopulateNodesModelTreeUtils.createTextMetadataNode(property.getTag(), property.getTag(), new StringValue(property.getValue()))); } return standaloneChildren; }