• 大小: 9.09MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-09
  • 语言: 其他
  • 标签: UML工具  

资源简介

UML工具JUDE-Community_5.5.2_典藏绿色汉化版

资源截图

代码片段和文件信息

import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import com.change_vision.jude.api.inf.exception.LicenseNotFoundException;
import com.change_vision.jude.api.inf.exception.NonCompatibleException;
import com.change_vision.jude.api.inf.exception.ProjectNotFoundException;
import com.change_vision.jude.api.inf.exception.ProjectLockedException;
import com.change_vision.jude.api.inf.model.IAttribute;
import com.change_vision.jude.api.inf.model.IClass;
import com.change_vision.jude.api.inf.model.IConstraint;
import com.change_vision.jude.api.inf.model.IElement;
import com.change_vision.jude.api.inf.model.IGeneralization;
import com.change_vision.jude.api.inf.model.IModel;
import com.change_vision.jude.api.inf.model.INamedElement;
import com.change_vision.jude.api.inf.model.IOperation;
import com.change_vision.jude.api.inf.model.IPackage;
import com.change_vision.jude.api.inf.model.IParameter;
import com.change_vision.jude.api.inf.model.IRealization;
import com.change_vision.jude.api.inf.project.ProjectAccessor;
import com.change_vision.jude.api.inf.project.ProjectAccessorFactory;

/**
 * Class to build class definition from selected project.
 */
public class ClassDefinitionBuilder {

    private static final String EMPTY_COLUMN = ““;

    private String inputFile;
    
    /**
     * @param inputFile
     *            File to input
     */
    public ClassDefinitionBuilder(String inputFile) {
        this.inputFile = inputFile;
    }

    /**
     * Get class information.
     * 
     * @return Class information (String List stored in the List)
     * @throws LicenseNotFoundException
     *             License cannot be found 
     * @throws ProjectNotFoundException
     *             Project cannot be found
     * @throws NonCompatibleException
     *             Old Model Version (The version of API is older than the version of JUDE that the project has been last edited with)
     * @throws ClassNotFoundException
     *             Cannot read some models
     * @throws IOException
     *             Input/Output error
     * @throws ProjectLockedException
     *             Project file has been locked
     */
    public List getContents() throws LicenseNotFoundException ProjectNotFoundException
            NonCompatibleException IOException ClassNotFoundException ProjectLockedException Throwable {

        ProjectAccessor prjAccessor = ProjectAccessorFactory.getProjectAccessor();
        prjAccessor.open(inputFile);
        IModel iModel = prjAccessor.getProject();

        List contents = new ArrayList();
        contents.add(getHeader());

        List iPackages = getAllPackages(iModel);

        for (Iterator iter = iPackages.iterator(); iter.hasNext();) {
            IPackage iPackage = (IPackage)iter.next();
            contents.addAll(getClassInfos(iPackage));
        }

        prjAccessor.close();

      

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-03-30 03:18  JUDE-Community_v5.5.2_CN_Green\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\template\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\template\project\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\ja\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\en\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\ja\sample\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\ja\doc\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\en\sample\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\en\doc\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\ja\sample\simpleRead\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\ja\sample\csvexporter\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\ja\doc\png\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\ja\doc\javadoc\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\en\sample\simpleRead\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\en\sample\csvexporter\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\en\doc\png\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\en\doc\javadoc\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\ja\doc\javadoc\resources\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\ja\doc\javadoc\java\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\ja\doc\javadoc\images\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\ja\doc\javadoc\com\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\en\doc\javadoc\resources\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\en\doc\javadoc\java\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\en\doc\javadoc\images\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\en\doc\javadoc\com\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\ja\doc\javadoc\java\util\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\ja\doc\javadoc\java\lang\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\ja\doc\javadoc\java\io\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\ja\doc\javadoc\java\awt\
     目录           0  2012-03-30 03:02  JUDE-Community_v5.5.2_CN_Green\api\ja\doc\javadoc\com\change_vision\
............此处省略648个文件信息

评论

共有 条评论