protected void bindParentConcept( Element element, Domain domain, IConcept concept ) { Element tagged = null; NodeList pccn = element.getChildNodes(); for ( int j = 0; j < pccn.getLength(); j++ ) { if ( pccn.item( j ).getNodeType() == Node.ELEMENT_NODE ) { if ( pccn.item( j ).getNodeName().equals( "CWM:ModelElement.taggedValue" ) ) { //$NON-NLS-1$ tagged = (Element) pccn.item( j ); } } } if ( tagged != null ) { String conceptParentName = getKeyValue( tagged, "CWM:TaggedValue", "tag", "value", "CONCEPT_PARENT_NAME" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ if ( conceptParentName != null ) { Concept parent = domain.findConcept( conceptParentName ); if ( parent == null ) { logger.error( Messages .getErrorString( "XmiParser.ERROR_0006_FAILED_TO_LOCATE_CONCEPT", conceptParentName ) ); //$NON-NLS-1$ } else { concept.setParentConcept( parent ); } } } }
if ( parentName != null ) { concept.removeChildProperty( "__TMP_CONCEPT_PARENT_NAME" ); //$NON-NLS-1$ Concept conceptParent = domain.findConcept( parentName ); concept.setParentConcept( conceptParent ); conceptParent.addChild( concept );