資源簡(jiǎn)介
astah-professional-6.8.zip
代碼片段和文件信息
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.ProjectLockedException;
import?com.change_vision.jude.api.inf.exception.ProjectNotFoundException;
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.AstahAPI;
/**
?*?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?Astah?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?{
???? //?Open?a?project.?And?get?the?model.
????????ProjectAccessor?prjAccessor?=?AstahAPI.getAstahAPI().getProjectAccessor();
????????prjAccessor.open(inputFile);
????????IModel?iModel?=?prjAccessor.getProject();
????????List?contents?=?new?ArrayList();
????????contents.add(getHeader());
????????//?get?all?packages?of?the?project.
????????List?iPackages?=?getAllPackages(iModel);
????????//?build?the?information?for?each?package.
????????for?(Iterator?iter?=?iPackages.iterator();?iter.hasNext();)?{
????????????IPackage?iPackage?=?(IPackage)iter.next();
????????????contents.addAll(getClassInfos(iPackage));
??????
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-12-12?17:28??__MACOSX\
?????文件?????????171??2015-12-12?17:22??__MACOSX\._astah使用說(shuō)明.txt
?????目錄???????????0??2015-12-12?17:28??__MACOSX\astah_professional\
?????文件?????????171??2015-12-12?17:22??__MACOSX\astah_professional\._astah使用說(shuō)明.txt
?????目錄???????????0??2015-07-26?15:22??astah_professional\
?????文件????????1978??2014-01-14?20:34??astah_professional\Astah_API_sample_program_license_agreement.txt
?????文件????????1666??2014-01-14?20:34??astah_professional\Astah_API_sample_program_license_agreement_ja.txt
?????文件????????5192??2014-01-14?20:34??astah_professional\CommandRunner.html
?????文件????????5518??2014-01-14?20:34??astah_professional\CommandRunner_ja.html
?????文件????????5943??2015-07-17?11:14??astah_professional\Flowchart0.asta
?????文件?????7738275??2014-01-14?20:34??astah_professional\ReferenceManual-astah-UML_professional.pdf
?????文件?????7599262??2014-01-14?20:34??astah_professional\ReferenceManual-astah-UML_professional_ja.pdf
?????文件??????118208??2014-01-14?20:39??astah_professional\Sample.asta
?????文件???????45480??2014-01-14?20:39??astah_professional\Welcome.asta
?????文件???????45976??2014-01-14?20:39??astah_professional\Welcome_ja.asta
?????目錄???????????0??2015-04-22?17:55??astah_professional\api\
?????目錄???????????0??2015-04-22?17:55??astah_professional\api\en\
?????目錄???????????0??2015-04-22?17:55??astah_professional\api\en\doc\
?????文件?????????592??2014-01-14?20:34??astah_professional\api\en\doc\api_search.html
?????文件??????322431??2014-01-14?20:34??astah_professional\api\en\doc\astahAPI.asta
?????文件????????5292??2014-01-14?20:34??astah_professional\api\en\doc\astahAPI_create.html
?????文件????????3938??2014-01-14?20:34??astah_professional\api\en\doc\astahAPI_diagram_create.html
?????文件???????13188??2014-01-14?20:34??astah_professional\api\en\doc\astahAPI_diagram_editor_outline.html
?????文件????????1206??2014-01-14?20:34??astah_professional\api\en\doc\astahAPI_easy_merge.html
?????文件????????2048??2014-01-14?20:34??astah_professional\api\en\doc\astahAPI_edit.html
?????文件???????22240??2014-01-14?20:34??astah_professional\api\en\doc\astahAPI_language.html
?????文件???????14901??2014-01-14?20:34??astah_professional\api\en\doc\astahAPI_models.html
?????文件???????27490??2014-01-14?20:34??astah_professional\api\en\doc\astahAPI_presentation_create.html
?????文件????????4411??2014-01-14?20:34??astah_professional\api\en\doc\astahAPI_presentation_edit.html
?????文件???????21072??2014-01-14?20:34??astah_professional\api\en\doc\astahAPI_presentation_outline.html
?????文件????????1278??2014-01-14?20:34??astah_professional\api\en\doc\astahAPI_presentation_reference.html
............此處省略1329個(gè)文件信息
評(píng)論
共有 條評(píng)論