Windchill10.x建模_第1頁
Windchill10.x建模_第2頁
Windchill10.x建模_第3頁
Windchill10.x建模_第4頁
Windchill10.x建模_第5頁
已閱讀5頁,還剩9頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、目錄WIndchill10、x建模?錯(cuò)誤!未定義書簽。一、在 Windch ill中建一個(gè)簡(jiǎn)單得模型 第一步,編輯j a va文件第二步,編譯模型得J ava文件?錯(cuò)誤味定義書簽。 第三步,生成 sq l文件 第四步,導(dǎo)入sql文件錯(cuò)誤!未定義書簽。錯(cuò)誤!未定義書簽。第五步,S tart/re s tart t h e Meth o dSer ve r二、G en As 介紹1、 GenAsP er sistab le錯(cuò)誤!未定義書簽。 錯(cuò)誤!未定義書簽。錯(cuò)誤!未定義書簽。 錯(cuò)誤!未定義書簽。與 GenAsBin a ryLink提供三種機(jī)制指定數(shù)據(jù)庫中得列: 錯(cuò)誤!未定義書簽。2、常用注釋介

2、紹:?錯(cuò)誤!未定義書簽。三、創(chuàng)建并注冊(cè)服務(wù)(Serv i ce) 1、創(chuàng)建H elp er類2、創(chuàng)建服務(wù)接口 5?3、創(chuàng)建標(biāo)準(zhǔn)服務(wù)類 4、 在s it e、xc 0 nf文件中注冊(cè)服務(wù) ?錯(cuò)誤!未定義書簽。四、本地化顯示信息 錯(cuò)誤!未定義書簽。錯(cuò)誤!未定義書簽。錯(cuò)誤!未定義書簽。1、創(chuàng)建e xam pl eMo del RB、rbinf o2、創(chuàng)建 ex ampleRes3、執(zhí)行如下命令:?錯(cuò)誤!未定義書簽。五、枚舉類型1、 創(chuàng)建put er Typ e、jav a文件?錯(cuò)誤!未定義書簽。2、創(chuàng)建puterTy p eRB、r binf o文件?錯(cuò)誤!未定義書簽。3、執(zhí)行命令?錯(cuò)誤!未定義書簽

3、。六、Ec lip se集成開發(fā) 七、部署客制化建模0 ur ce、j ava ?錯(cuò)誤!未定義書簽。WIn d ch i l ll 0、x 建模一、在Wi ndch1 I l中建一個(gè)簡(jiǎn)單得模型第一步,編輯j ava文件錯(cuò)誤!未定義書簽。 錯(cuò)誤!未定義書簽。錯(cuò)誤!未定義書簽。錯(cuò)誤!未定義書簽。 錯(cuò)誤!未定義書簽。創(chuàng)建、a cme、ex amp le、Sim p leE x am pie 與、acme、examp le、Si mpl eExa mpleLin k 文件pac ka ge 、ac m e、exa mp l e;i mpo rt wt、f c、 I n val i d At tri b

4、 u te E x ce p tion;im p o rtimp or t w t、inw t、fc、W TObje ct;f、 conta i ner、W T C ontained;w t、u tiimp ortimp orti mp or t 、ptcw t、 utill、WTExc e ptio n;、WTP ro perty V etoExcept windc h ill 、ann o tat1 ons、metadataGe n A s P er si? su per C lasss tab le (=WTObject 、cl a ss ,in terfa ce spro per ti

5、es = WTCo ntai ne Ge ner a td、classedPr o pert? ?typ e = S t rin g、?con s tra ic l ass ,nt s = Prop e rt y Con s t r a int s (requirtrue )p ubliccla ss SimpleExa mple extends _Simp leExample st aticfinallongseri a l Ve r s ionUID = 1;nam ee d()t hp u blistaticc"name "Simp l eE x ample new

6、SimpleExampleExce pti on? f inalS impl in sta nee、eE x a mple iini t ial i z en stanee =newSim pl eExam ple();();?r eturni nstanee;? Overridep ublic e p t i o nV oid c hec k A t t ribu tes()thro w s I n validAttrib uteExc?su p er、t ry ? n ameVa l i d a te ( name);?chec k A t tr i but e s(); c atch (

7、WTPr o pert y VetoEx ce pt i on wt p? throw n e w In validA t t ri b uteEx c ep t ion(ve) w tp ve);pa c k a ge 、acme、e x a mp le ;im p ort wt、f c、Ob jectToOb imp or t wt、u t i l、 impo r t 、p tc、w i n GenAs B i n aryLink(j ect Li n k;W TExcep ti on ; d c hill、ann ot ati o ns、meta d a t a、*;?supe r Cl

8、a?role A =Ge nOb j e ctToO b je cr at edRole (n a mt Lic lass ,pare nt ",type=Sim pxample 、c lass),?role BGener atedRo le (n am eld"ty pe=Simp leE xampl e、class )mp l e Epubli c c las s S is ta t i c fi n al l o ngxam pleLinkse r i a IV ers i on U IDexte ndsple Example L in1;p ublic st at

9、i c Sim p leExa mpleL ? final S impleE x a m p 1 e pare? t hr ow s WTEx ce p t io n f in a1 S i m p leExa mp1 e Liin k n e w Simp 1 eEx a mp le L ink ( nt , final Simpl e Exa mple child)n k in sta n c e = new Sim pl e Ex am pl eLink();?instanee、i niti a li ze( p a rent , chi 1d);?retu r n instan c e

10、 ;第二步,編譯模型得java文件ant - fb in/to o Is、xml c1 ass - Dcl a ss、i neludes /ac m e/example命令執(zhí)行之后,會(huì)在wc-h om e>/s rc_g en目錄下生成一些ja v a文件,對(duì)應(yīng)這些jav a文件與之前我們自己寫得java文件第三步,生成sq I文件ant - f bi n /too 1s、xm 1 s ql_sc ript D gen、inpu t =、acme examp le、*命令執(zhí)行之后,在VW C- home/db下生成sq文件第四步,導(dǎo)入sql文件Cd db/s q I3S qiplus w

11、i nd/windWIN D? Make _pkg_sq 13 _T a ble sq 1Make _ pkg_sql3_lnd ex、sq l第五步,St art/r e s t ar t the M e thod Se rver二、Ge nAs介紹1、G e nAsPersisla b 1 e 與 GenAsB inaryL i nk 提供三種機(jī)制指定數(shù)據(jù)庫中 得列:1、 pr ope rtie s (一個(gè) Gen e ra te dPr o per t y s 得數(shù)組)表示 strings,numb ers, booleans等等、2、forei g nK ey s 一個(gè) Gene ra

12、 t ed F o reignKeys得數(shù)組)參考其她持久化對(duì)象( and are storedas a classname/key pa ir)3、r o1 eA/roleB (僅有G en AsBinary Lin k中使用) 一種特殊形式得外鍵,用來表述關(guān)聯(lián)關(guān)系 2、常用注釋介紹:GenAsPer s i stabl e創(chuàng)建持久化對(duì)象,并將該類映射為一張表表G e nA s BinaryLink創(chuàng)建兩個(gè)持久對(duì)象關(guān)聯(lián)關(guān)系得對(duì)象,并將這種關(guān)聯(lián)關(guān)系映射為一張表Gener at ed Role 與 Ge nAsBinary Link 一起使用用來描述1 in k 關(guān)系Gen erat edPro

13、p erty 生成屬性PropertyConstr a i nts指定約束,(requir ed = true )則需要進(jìn)行驗(yàn)證,需要重寫方法 c hec kAt tr i b u t es ()Gene ratedFo re ig nKey 指定外鍵Generat edF ore ignKe y( name="Cont a inerL ink",fo r ei gn KeyR o le= For eig nKeyR ol e (nam e="co n ta in e r ",type=wt、i nf、con t aine r、W TContai n e

14、r、c l a ss, refer e nc eT y p e=w t、inf、co nt a iner、WTC ontain erRef、c l ass , supp o rtedA PI = Sup porte d A PI、P RIVATE,const r ai n t s=Pr op erty Co n st rai nts (requ ir e d = t rue), myRo le= MyR o le ( name="c o ntents", s u p ported A PI=Sup p o r ted A PI、 PRIVATE )De rived Pr o

15、p erty控制外鍵關(guān)聯(lián)對(duì)象屬性得調(diào)用Derived Pro pe rt y (n ame ="c", der i ved From=" a、b、 c")DerivedP r ope r ty (name = " nam e " , d e rive dF rom =”ma stern ame " )三、創(chuàng)建并注冊(cè)服務(wù)(Ser vice)1創(chuàng)建Helper類p ackage 、acm e、example ;、s er vices 、 Servicimp ort/ *wtcto r y;t a tic fi e l d s/m

16、ethodsp u blicf inalcla ssE xa mpl eH elper ?/ *U se t h eSe r vice Factory to acquire an in sta neeo f t h eservice、* */?p ublicstatic finalExa m pl e Servi ce service= ServiceF a c tory?、getService(E xam p le S er v ice 、class );dof1 peec onsi sta nd sho ul d* Her s are notinstantiat2、創(chuàng)建服務(wù)接口pa c k

17、 a ge 、acme、e xa mple;i m portwt、m ethod 、Remo t e I nt er f ac e;im p ortwt、util 、WTExce pti on5/* * R emote In t erface anno t ati on isr equired foralls e r vi c ein terfaces* /Re mo teIn terf a c epub l icin terf ace E x ampl eServ ice?/ *Alli n terface methods are c a1 l a bleviaRM landmust thr

18、 o w WTE x cept ion*/?Si m ple Exam ple cr e at eSi mp 1 eExampleByName( final Strin g name)? t h rows WTE x c e ption;ac ka g e、acme、ex am ple ; mp ort w t、 fc、P ersistenceHel?returinst ance ;3、創(chuàng)建標(biāo)準(zhǔn)服務(wù)類i mpo rt w t、ut i l、WTEx ceptio n ;imp ortw t、util、WTPro p e irtyV e t o E xception5/* ser vic emu

19、st eext endSt a ndardManager5impl e me nt se r vi cein terf ac e */p ublicc 1a ss Sta nd a rdExamp l eSe rviceextend s S t an dard Ma n agerimp 1eme ntsExa m p1 eService ?/* *M e thodServer re fecti v el y c a ll sthis API d u ri n g st a r t up* * /pub 1ic st aticS ta ndardExa mp1 eSe rvicen ewStan

20、 d ardExamp 1 e Service ()? throws WTE x ception ?finalStan d a rdE xampleS er v ice ins tance =new Stan dardExa mp leSer vice();pe r ;i?in sta nee、ini ti a l i ze();nPimportwt、s er v ice s、Standa rdMa nager ;Override?publ ic S im p)l e Exa mp 1 e cre at eSi mp leExa mp1 eBy Name( fin al S tng n ame

21、t h r ows WTE xce?f i nal Simp();1 eExp tion a mple example = SimpleExample、ne w Simpl e Exampltr y ? exa m plesetNam e (name);ca t ch(WTPr?thr on ewo per t yVetoE xc eption w t pveW T E xcep t ion( w tpve) ;? ? returx ampln (S i mple E xam p1 e) Persis t enc e Helpere );、ma nag e r、st ore(e4、在si te

22、、xcon f文件中注冊(cè)服務(wù)< P ropertyn am e = "wt、se rvic e s、service 、9 9 999"t arg etF i l e =" codebase /wt、 pr o pe rties " va 1 ue = "、acme、exa mpl-IIe、E xa mpleServic e/、acme、e x a mpl e、Standa r dExampleS e rvice "/>四、本地化顯示信息1 創(chuàng)建 ex amp le Mo de l R B、rbl nfoR esource

23、Info、cl a ss =wt、 toolsr esou r ce、M e t a d ataR e so u r ce InfoEn tryForma t (values equaltod efault valueare no t in c 1u d e<k ey>、vVkey>、ca t ego r y=< key>、ment=< k e y>、a rg men t < n> =< ke y>、con st ant =k e y、cu st om i z a b le=< ke y、d e p re c ate d

24、=key>、a b breviated Di s play=< k e y >、ful 1 Di s play =< k eyshortD e scr ipt ion =< ke y >、lo n gDes cr ip tio n =E nt r y Co nte n tsSimpleExamp1 e、v a 1u e=SimpleSi m pleExamplena m e、va lue=ak a2、創(chuàng)建 examp l e R e sour cejav ap a c ka ge 、a cme、ex a m pie ;imp ort w t、u t il 、

25、r esou r ce、/ * * T hi sRBU UID (”p u blictionR BEntr"RBme nty ( " Th i s i s t 0"("An e xamplet antly plag ia rize d f r om th eJa vaDexa mpl eReso ur ce)es o urceex tend sWT L istResourceBun dl ee localized te x twith a sin gle sub stitacme、examp 1 e、Rhuoc、ex amp1 e b 1aa s s e

26、 xa mplee e ntr y、pu b lic ?pu b licc lasstatics puter Type ex finalp u ter T ypten ds _ pu tDESKTOP =public p ublic r “);atic fina ti c fa lput ei na 1rType LAPTOPpu terTy p e S ER VERe rTyp e toput e rT yp e ("de=toputer Typ e ( ” 1=t o puterTypekto p”);P to p “);("serveR BArg m ent0 ("Any s tri ng、")?publ i c s ta tic final S t ringEX A MPLE_STRING =” 0”3、執(zhí)行如下命令:ant f bi n/ t ools、xml bun die D b und 1 e、i np ut =、ac me、exam pl e、ant f bin /tool s、xm l class -D class i ncludes=/ acme/exa mp le/e xampl eRes o

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論