当前位置: 首页>>代码示例>>Java>>正文


Java Element.getOwnedElements方法代码示例

本文整理汇总了Java中org.eclipse.uml2.uml.Element.getOwnedElements方法的典型用法代码示例。如果您正苦于以下问题:Java Element.getOwnedElements方法的具体用法?Java Element.getOwnedElements怎么用?Java Element.getOwnedElements使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.uml2.uml.Element的用法示例。


在下文中一共展示了Element.getOwnedElements方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getSequenceUniqueIndex

import org.eclipse.uml2.uml.Element; //导入方法依赖的package包/类
/**
 * 
 * 
 * @param uniqueIndex
 * @return int
 */
private static int getSequenceUniqueIndex(int uniqueIndex, Element parent, String parentName) {

    for (Element child : parent.getOwnedElements()) {

        if (child instanceof NamedElement) {
            NamedElement namedChild = (NamedElement) child;

            if (uniqueIndex == 0) {
                if (parentName.equals(namedChild.getName())) {
                    uniqueIndex++;
                    uniqueIndex = getSequenceUniqueIndex(uniqueIndex, parent, parentName);
                }
            } else {
                if ((parentName + uniqueIndex).equals(namedChild.getName())) {
                    uniqueIndex++;
                    uniqueIndex = getSequenceUniqueIndex(uniqueIndex, parent, parentName);
                }
            }
        }
    }
    return uniqueIndex;
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:29,代码来源:UMLHelper.java

示例2: hasComponentChild

import org.eclipse.uml2.uml.Element; //导入方法依赖的package包/类
/**
 * 
 * SelectedElement 하위에 컴포넌트가 있는지 검사.
 * 
 * @param parentElement
 * @return
 */
private boolean hasComponentChild(Element parentElement) {
    
    for( Element child : parentElement.getOwnedElements() ) {
        if( child instanceof org.eclipse.uml2.uml.Class ) {
            if( COMPONENT_STEREOTYPE.equals( ProjectUtil.getStereotypeLabel(child).trim() ) ) {
                return true;
            }
        }
        if (child instanceof PackageableElement) {
            if(hasComponentChild( child )){
                return true;
            }
        }
    }
    return false;
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:24,代码来源:ComponentRefactorAction.java

示例3: getElementsWithStereotype

import org.eclipse.uml2.uml.Element; //导入方法依赖的package包/类
/**
 * Same as getElementsWithStereotype(Model model...) searches in an Element members, not in a Model members.
 * This function is private and used by getElementsWithStereotype(Model model...)
 * @param parent_elt
 * @param stereotype
 * @param target_list
 */
static private void getElementsWithStereotype(Element parent_elt, String stereotype, LinkedList<NamedElement> target_list) {
	for (Element ne : parent_elt.getOwnedElements()) {
		if (ne instanceof NamedElement) {
			if (ne instanceof org.eclipse.uml2.uml.Class) {
				if(hasStereotype((org.eclipse.uml2.uml.Class)ne, stereotype)){
					target_list.add((NamedElement)ne);
				}					
			}
			getElementsWithStereotype(ne,stereotype,target_list);
		}
	}
	return;
}
 
开发者ID:bmaggi,项目名称:Eclipse-Gendoc-Templates,代码行数:21,代码来源:RobotML_Queries.java

示例4: getPackage

import org.eclipse.uml2.uml.Element; //导入方法依赖的package包/类
private static void getPackage(Element parent_elt, LinkedList<NamedElement> target_list) {
	for (Element ne : parent_elt.getOwnedElements()) {
		if (ne instanceof NamedElement) {
			if (ne instanceof org.eclipse.uml2.uml.Package) {
				target_list.add((NamedElement)ne);					
			}
			getPackage(ne,target_list);
		}
	}
	return;
	
}
 
开发者ID:bmaggi,项目名称:Eclipse-Gendoc-Templates,代码行数:13,代码来源:RobotML_Queries.java

示例5: getClass

import org.eclipse.uml2.uml.Element; //导入方法依赖的package包/类
static private void getClass(Element parent_elt, LinkedList<NamedElement> target_list) {
	for (Element ne : parent_elt.getOwnedElements()) {
		if (ne instanceof NamedElement) {
			if (ne instanceof org.eclipse.uml2.uml.Class) {
				target_list.add((NamedElement)ne);					
			}
			getClass(ne,target_list);
		}
	}
	return;
}
 
开发者ID:bmaggi,项目名称:Eclipse-Gendoc-Templates,代码行数:12,代码来源:RobotML_Queries.java

示例6: getPackage

import org.eclipse.uml2.uml.Element; //导入方法依赖的package包/类
private static void getPackage(Element parent_elt, LinkedList<NamedElement> target_list) {
	
	for (Element ne : parent_elt.getOwnedElements()) {
		if (ne instanceof org.eclipse.uml2.uml.Package) {
			target_list.add((NamedElement)ne);
		}
		getPackage(ne,target_list);
	}
}
 
开发者ID:bmaggi,项目名称:Eclipse-Gendoc-Templates,代码行数:10,代码来源:SysML_Queries.java

示例7: findComponentId

import org.eclipse.uml2.uml.Element; //导入方法依赖的package包/类
/**
 * 요소로부터 component id 찾는 메소드
 * 
 * @param element BizUnit
 * @param selectedElementList
 * @return String
 */
public static String findComponentId(Element element, List<Element> selectedElementList) {
    String methodLowerCaseName = null;
    List<Element> componentChildList = null;
    String componentChildLowerCaseName = null;

    List<Element> componentList = getComponentElementList(selectedElementList);
    if (componentList.size() == 1) {
        return getComponentId(componentList.get(0));
    }
    
    for (Element componentElement : componentList) {
        if (!componentElement.getOwnedElements().isEmpty()
                && componentElement.getOwnedElements().size() > 0) {
            componentChildList = componentElement.getOwnedElements();

            for (Element componentChild : componentChildList) {
                if (componentChild instanceof Operation) {
                    componentChildLowerCaseName = ((NamedElement) componentChild)
                            .getName().toLowerCase();
                    
                    List<Element> methodElementList = getMethodElementList(element);
                    if (null != methodElementList) {
                        for (Element methodElement : methodElementList) {
                            methodLowerCaseName = ((NamedElement) methodElement)
                                    .getName().toLowerCase();

                            if (methodLowerCaseName
                                    .startsWith(componentChildLowerCaseName)) {
                                return getComponentId(componentElement);
                            }
                        }
                    }
                }
            }
        }
    }

    return null;
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:47,代码来源:NexcoreMDACUtil.java

示例8: getMethodElementList

import org.eclipse.uml2.uml.Element; //导入方法依赖的package包/类
/**
 * 선택된 BizUnit 요소 하위목록 중에서 method 스테레오타입이 적용된 요소의 목록을 반환
 * 
 * @param bizUnitElement
 * @return List<Element>
 */
public static List<Element> getMethodElementList(Element bizUnitElement) {
    List<Element> allElementChildList = null;
    List<Element> methodChildElementList = null;

    if (!bizUnitElement.getOwnedElements().isEmpty()
            && bizUnitElement.getOwnedElements().size() > 0) {
        allElementChildList = bizUnitElement.getOwnedElements();
    }
    
    if (null != allElementChildList) {
        for (Element childElement : allElementChildList) {
            for (Stereotype appliedStereotype : childElement
                    .getAppliedStereotypes()) {
                if (appliedStereotype
                        .getLabel()
                        .equals(
                                MDDCoreConstant.BIZUNIT_METADATA_METHOD_STEREOTYPE_NAME)) {
                    if (methodChildElementList == null) {
                        methodChildElementList = new ArrayList<Element>();
                    }

                    methodChildElementList.add(childElement);
                }
            }
        }
    }
    return methodChildElementList;
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:35,代码来源:NexcoreMDACUtil.java

示例9: getPackageList

import org.eclipse.uml2.uml.Element; //导入方法依赖的package包/类
/**
 * 
 * 컴포넌트에 복사할 오퍼레이션을 가지고 있는 biz 패키지를 찾는다.
 * 
 * @param parent
 * @param packageList
 * @return
 */
private List<org.eclipse.uml2.uml.Package> getPackageList(Element parent, List<org.eclipse.uml2.uml.Package> packageList) {
    
    for( Element child : parent.getOwnedElements() ) {
        if( child instanceof org.eclipse.uml2.uml.Package ) {
            org.eclipse.uml2.uml.Package childPackage = (org.eclipse.uml2.uml.Package) child ;
            packageList.add(childPackage);
            
            packageList = getPackageList(childPackage, packageList);
        }
    }
    return packageList;
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:21,代码来源:ComponentRefactorAction.java

示例10: setComponentList

import org.eclipse.uml2.uml.Element; //导入方法依赖的package包/类
/**
 * 
 * SelectedElement 하위에 있는 전체 컴포넌트를 리스트로 보관.
 * 
 * @param parentElement
 */
private void setComponentList(Element parentElement) {
    for( Element child : parentElement.getOwnedElements() ) {
        if( child instanceof org.eclipse.uml2.uml.Class ) {
            if( COMPONENT_STEREOTYPE.equals( ProjectUtil.getStereotypeLabel(child).trim() ) ) {
                
                if( !componentList.contains(child) ) {
                    componentList.add((Class) child);
                }
            }
        } else if ( child instanceof PackageableElement ) {
            setComponentList(child);
        }
    }
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:21,代码来源:ComponentRefactorAction.java

示例11: runThroughModelRecursive

import org.eclipse.uml2.uml.Element; //导入方法依赖的package包/类
private void runThroughModelRecursive(Queue<Element> queue, Multimap<Class<?>, Element> map) {
	if(!queue.isEmpty()){
		Element head = queue.poll();
		List<Element> children = head.getOwnedElements();
		if(children != null)
			queue.addAll(children);
		map.put(head.eClass().getInstanceClass(), head);
		runThroughModelRecursive(queue, map);
	}else{
		return;
	}
}
 
开发者ID:ELTE-Soft,项目名称:txtUML,代码行数:13,代码来源:UMLModelManager.java


注:本文中的org.eclipse.uml2.uml.Element.getOwnedElements方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。