ããã¯ãã¢ãã«é§ååéçºãµã€ã¯ã«ã®2çªç®ã®èšäºã§ãã ä»æ¥ã¯ãEcoreã¡ã¿ã¡ã¿ã¢ãã«ã«åºã¥ããŠã¡ã¿ã¢ãã«ãäœæããŸãã ããŒã¿ã¢ããªã³ã°ãã€ãŸãã¢ã³ã«ãŒã6NFãããã³æŠå¿µã¢ããªã³ã°ã«ã€ããŠç°¡åã«è§ŠããŸãã
ã¯ããã«
OCLãšã¡ã¿ã¢ããªã³ã°ã«é¢ãã以åã®èšäºããã£ãšèªãããšãã§ããŸãããããã¯å¿ é ã§ã¯ãããŸããã ãããã®è«æã ãã§ååã§ãïŒ
- çŸå®äžçã«ã¯ããŸããŸãªãªããžã§ã¯ãïŒäººãçµç¹ãã€ãã³ãã建ç©ãéè¡å£åº§ãæãææãæšãé³æ¥œãªã©ïŒããããŸãã
- äžéšã®æ å ±ã·ã¹ãã ã§ã¯ããããã®ãªããžã§ã¯ãã«é¢ããããŸããŸãªæ å ±ãåŠçã§ããŸãã
- æ å ±ã¯ããã€ãã®ã¢ãã«ã«å¯Ÿå¿ããŠããŸãã ã¢ãã«ã¯å€ããå°ãªãã圢åŒåãæ瀺çãŸãã¯æé»çã§ãããå®äžçã®ãªããžã§ã¯ãã®ããŸããŸãªåŽé¢ãèšè¿°ããããšãã§ããããèªäœãå®äžçã®ãªããžã§ã¯ãã§ãã ããšãã°ãäžéšã®UMLã¯ã©ã¹å³ã¯ã¢ãã«ã§ãã
- ã¢ãã«ã¯ãããã€ãã®ã¡ã¿ã¢ãã«ãã¢ããªã³ã°èšèªïŒUMLãªã©ïŒã«åŸã£ãŠæ§ç¯ãããŸãã
- ã¡ã¿ã¢ãã«ã¯ãã¡ã¿ã¡ã¿ã¢ãã«ïŒEcoreãMOFãªã©ïŒã«åŸã£ãŠæ§ç¯ãããŸãã
ããæœè±¡çã«ã¯ããããã®è«æã¯ã ã¢ãã«é§ååã¢ãŒããã¯ãã£ã®OMGïŒObject Management GroupïŒã³ã³ãœãŒã·ã¢ã ã«ãã£ãŠèšè¿°ãããŸããã
ãã®èšäºãèªãã åŸãç¬èªã®ã¡ã¿ã¢ãã«ïŒã¢ããªã³ã°èšèªïŒãäœæããæ¹æ³ãåŠã³ãŸãã
å®è£ ããã¡ã¿ã¢ãã«ã®éžæ
ãŸããå®è£ ããã¡ã¿ã¢ãã«ã決å®ããå¿ èŠããããŸãã
äŸãšããŠã®ã¿äœæããã人工ã¡ã¿ã¢ãã«ã¯åœ¹ã«ç«ããªãã
ãšã³ãã£ãã£æ¥ç¶ã¢ãã«ããããªããããªã© ã·ã³ãã«ãããŠé¢çœããªãã
äžéšã®PMMLã¯èå³æ·±ãã§ãããè€éãããŸãã
EMFã䜿çšããŠãã£ãªãã£ãå®è£ ã§ããŸãã ããããéåžžã«èå³æ·±ãã§ãããïŒãã¹ãŠãå¯æå³ã䜿çšããŠèšè¿°ãããŠããããã°ã©ãã³ã°èšèªãæ³åããŠãã ããïŒããããã¯ç¡æå³ã§ãã
ç§ã®æèŠã§ã¯ãé»éã®å¹³åã¯ã¢ã³ã«ãŒã§ãã ãã®èšèªã®äŸã䜿çšãããšãããã«1ã€ã®ç³ã§å€ãã®é³¥ãæãŸããããšãã§ããŸãã
- ã¡ã¿ã¢ãã«ãäœæããæ¹æ³ãåŠã³ãŸãã
- ãšã³ãã£ãã£é¢ä¿å³ã«ä»£ããæ¹æ³ã®1ã€ãç解ããŸãããã
- ããŒã¿ã®æ£èŠåã«é¢ããã¹ãã¬ãªã¿ã€ãã®äžéšã¯ç Žãããå¯èœæ§ããããŸãã
- æŠå¿µã¢ããªã³ã°ã«ã€ããŠèŠãŠãããŸãããã
ä»ã®ããŒã¿ã¢ããªã³ã°èšèªãå¿ èŠãªçç±ã«ã€ããŠã®äœè«
ç§ãæåŸã®ä»äºã«å°±ãããšããã€ã³ã¿ãã¥ãŒã§ãåã®ä»äºã§è¡ã£ããã°ãããåºãšãã¥ãŒããäœã§ãããã話ããŸããã ãããŠã圌ãã¯ç§ã«å°ããïŒããŒã¿ã¹ããŒã ãå€æŽãããå Žåããã®ã¹ãã¬ãŒãžãšãã¥ãŒãã¯ã©ããªããŸããïŒ çµå±ã®ãšãããã¹ãã¬ãŒãžæ§é ãšãã¥ãŒããå€æŽãããšãå€ãããŒã¿ã¹ããŒã ã«åºã¥ãéå»ã®æéã®ã¬ããŒããåä¿¡ã§ããªããªããŸãã ç§ã¯ãããŒã¿ã¹ããŒã ãæ éã«èããããã«å€§ããªå€æŽã¯ãªããäœããè¿œå ãããããªã©ã®ãããªããšãçããŸãããããã«æ·±å»ãªå€æŽãããå Žåãããã«ã€ããŠäœãããããšã¯ãããŸããã§ããã
ãã°ããããŠãããŒã¿ã¹ããŒããç°¡åã«å€æŽãããã®ã¿ã¹ã¯ã¯å®å šã«ç°¡åã§ããããšã«æ°ä»ããŸããã æ£ããããŒã¿ã¢ããªã³ã°ææ³ãéžæããã ãã§ãã 3NF-5NFã«åºã¥ããŠã¹ãã¬ãŒãžãæ§ç¯ããå Žåãå®éãããŒã¿ã¹ããŒã ã®ããããªå€æŽã§ããã¹ãŠãå£ããŸãã ããŒã¿ã6NFã«æ£èŠåãããšãå€æŽã¯ããŒã¿ããŒã¹ã«æ¢ã«ä¿åãããŠããããŒã¿ã«åœ±é¿ããŸããã
Data VaultãšAnchorã¯ãããŒã¿ã6NFã«æ£èŠåãããšããèãã«ããçšåºŠåºã¥ããŠããŸãã ãã®ãªããªãŒããããªãã®ã¢ã³ã«ãŒã«èå³ãåŒãã®ã«ååã§ããããšãé¡ã£ãŠããŸãã
ã泚æ
å®éãããã¯ããŒã¿ã¢ããªã³ã°ã®é ç¹ã§ã¯ãããŸããããããã®ã¢ãããŒãã§ã¯èæ ®ãããŠããªããã®ãããã€ããããŸãã ãããããããã¯ãäŸãã°ãç§ãã¡ã®ã¢ããªã³ã°ææ³ã§èæ ®ãããŸãããããªããç§ãã¡ãšä»äºããããªãã°ãããªãã¯ããã«ã€ããŠç¥ãã§ããã;-)
ããŒã¿ã¢ããªã³ã°ã®æŽå²ã«é¢ããäœè«
æåŸã«ã¢ã³ã«ãŒã«ç§»ãåã«ãå°ãæŽå²ãæžããŠãã ããïŒããã«ã€ããŠæ¹å€çã§ç®èãªããšããé¡ãããŸãïŒã
1970幎代ã«ã¯ãããŒã¿ã¢ããªã³ã°ã«é¢ããå€ãã®ç 究ããããŸããã ãããã®å¹Žã«çºæãããæªããªãã¢ãããŒãã®1ã€ã¯ãªããžã§ã¯ãããŒã«ã¢ããªã³ã°ã§ãã ããã¯ã¢ã«ãã¡ãšãªã¡ã¬ã®ããŒã¿ã¢ããªã³ã°ã§ãããå®éã«ã¯ããŒã¯ã§ããããã®åŸããã®é åã®å£åã®æŽå²ãå§ãŸããŸããã ãã®ã¢ãããŒãã«ã€ããŠã¯è©³ãã説æããŸããã äžèšã§èšãã°ãããã«ããããŒã¿ã¯äºå®ã®åœ¢ã§èšè¿°ãããŠããŸãããRDFã®ãããªãsubject-predicate-objectãã§ã¯ãªããä»»æã®æ°ã®ãªããžã§ã¯ããæã€ã¿ãã«ã®åœ¢ã§èšè¿°ãããŠããŸãã
æ®å¿µãªãããåœæã®èª°ããORã¢ããªã³ã°ã®å€©æã«æ°ä»ããŠããªãã£ããããPeter Chenã¯1976幎ã«ãšã³ãã£ãã£é¢ä¿ã¢ãã«ã«ã€ããŠèª¬æããèšäºãå ¬éããŸããã ERã¢ãã«ã¯ãäºå®ã§ã¯ãªãå±æ§ãæã€ãšããç¹ã§ORã¢ãã«ãšç°ãªããŸãã ããã¯éåžžã«å€§ããªéãã§ãã
è±èªçãŠã£ãããã£ã¢ã® TheMattrixã«ããã ER Diagram MMORPG ãã Commonsãä»ããŠCC BY-SA 3.0ã®äžã§ã©ã€ã»ã³ã¹ãããŠããŸãã
ORã¢ãã«ã§ã¯ããªããžã§ã¯ãã«é¢é£ããäžé£ã®äºå®ã¯éåžžã«arbitraryæçã§ãã ããšãã°ããåŸæ¥å¡1-ååã¯ã€ãŽã¡ã³-åŸæ¥å¡1--1990幎çãŸãããšããäºå®ãå®åŒåã§ããŸãã ãŸãã¯ããã«è€éïŒãåŸæ¥å¡1äœ-åŠäœååŸ-ç§åŠå士-2010幎ãã ããããããã¯ãåŸæ¥å¡ã«é¢ããä»ã®äºå®ãå®åŒåã§ããªãããšãæå³ããããã§ã¯ãªããããåŸæ¥å¡ã®ååãšç幎ææ¥ããã®é åºã§åžžã«ç€ºãå¿ èŠããããšããæå³ã§ã¯ãããŸããã
ERã¢ãã«ã§ã¯ããã¡ã¯ãããå±æ§ã«ç§»åãããšããã®ãããªã¢ãã«ã®æè»æ§/éæŸæ§ã倱ãããç¹å®ã®æ¹æ³ã§é åºä»ããããå±æ§ã«é ç·ããããã¡ã¯ãã®åºå®ã»ãããèšè¿°ããåºå®æ§é ã®ã¢ããªã³ã°ãéå§ããŸãã
Peter Chenã®è¡šèšã®ERã¢ãã«ã§ã¯ãæ¥ç¶ã¯è±åœ¢ã§ãå±æ§ã¯æ¥åã§è¡šããããšããäºå®ã«æ³šæããŠãã ããã ããã«ãéä¿¡ã¯ãã€ããªã ãã§ã¯ãããŸããã
1981幎ãç£æ¥çšã³ã³ãã¥ãŒã¿ãŒå
itl.nist.govã«ãã ã B 5 1 IDEF1Xãã€ã¢ã°ã©ã ã- æ å ±ã¢ããªã³ã°ã®çµ±åå®çŸ©ïŒIDEFIXïŒ-93 12æ21æ¥ ã Commonsãä»ããŠPublic Domainã§ã©ã€ã»ã³ã¹ãããŠããŸãã
ãã®åŸãUMLãRDFãXSDãã¢ã³ã«ãŒãããããçš®é¡ã®NoSQLãªã©ãããŒã¿ãã¢ãã«åã§ããå€ãã®èšèªãšã¡ãœãããç»å ŽããŸããã ããããããããã¹ãŠã«æ°ããé©æ°çãªãã®ã¯ãããŸããã ã¡ãªã¿ã«ãããã¯ãã¡ãã·ã§ããã«ãªãã€ãã¹ã«ã远跡ããå¿ èŠããªããšããäºå®ã®è¯ãäŸã§ãããã»ãšãã©ã®ãã®ã¯é·ãéçºæãããŠãããããŒã±ã¿ãŒã®ããã®æ°ããã©ãããŒã«å€ãããŸãã
ã¢ã³ã«ãŒãªããªãŒã
ããã§ã ã¢ã³ã«ãŒã«çããŸããã ãã®èšèªã¯ãéåžžã®IDEF1XãŸãã¯UMLã¯ã©ã¹å³ãšã¯ç°ãªããŸãããå®éã«ã¯ãå€ãã®äººãå¿ããŠãããããããªãPeter Chenã®å€ãERã¢ãã«ããã®ãã¬ãŒã·ã³ã°ããŒããŒã«ãããŸããã äž»ãªéãããªã¹ãããŸãã
LarsRönnbÀckã«ããã ã¢ã³ã«ãŒã¢ããªã³ã°ã®äŸ ã-http : //www.anchormodeling.comã Commonsãä»ããŠMITã§ã©ã€ã»ã³ã¹ãããŠããŸãã
ã¢ã³ã«ãŒã§ã¯ããšã³ãã£ãã£ã®ååãã¢ã³ã«ãŒã«å€æŽãããé¢ä¿ã®ååãäžæ¬åŒ§ã«å€æŽãããŸãïŒã¿ã€-äžæ¬åŒ§ãšåŒã¶ããšãã§ããŸããããäžæ¬åŒ§ããšããèšèã¯ãã®ã¢ãã«ã«é åãå ããŸãïŒãå±æ§ã¯å€æŽãããŸããã
ERã¢ãã«ã§ã¯ãå±æ§ã«è¡šçŸããããŸãã ã¢ã³ã«ãŒã§ã¯ããããã¯ãã芪ãã¿ã®ããããŒã¿åãšåŒã°ããŸãã
ERã¢ãã«ã§ã¯ããã¥ãŒã¯èš±å®¹å€ã®ç¯å²ãããã«å¶éã§ããŸãã ã¢ã³ã«ãŒã§ã¯ãå€ã®ç¯å²ãå¶éããããšãã§ããŸãããä»»æã§ã¯ãªããæå¹ãªå€ããªã¹ãããããšã§å¶éã§ããŸãã ã¢ã³ã«ãŒã®ãã®ãããªåæåã¯ãããããšåŒã°ããŸãã ä»åŸã¯ããã®ç¹ã§ã¢ã³ã«ãŒãå°ãéçºããŸãã
ERã¢ãã«ãšã¢ã³ã«ãŒã®éã®ãããã®éããéèŠã§ãããšèããããå¯èœæ§ã¯äœãã§ãã ãããŸã§ã®ãšãããã¢ã³ã«ãŒã¯40幎åã®ãã©ã³ãå€æŽãããã¢ã€ãã¢ãé£æ³ãããŸãã
ããããæãéèŠãªéãã¯ãå±æ§ãšå±¥æŽã®ä¿åãšã®é¢ä¿ã§ãïŒå±¥æŽå±æ§ãšå±¥æŽã¿ã€ïŒã ERã¢ãã«ã«ã¯ååšããŸããããäžè¬ã«ã æ ¹æ¬çã«æ°ãããã®ã¯ãããŸããã
çåãçããå¯èœæ§ããããŸããã¢ã³ã«ãŒãéåžžã«äºæ¬¡çãªãã®ã§ããå Žåããªããããå¿ èŠãªã®ããä»ã®ã¢ãããŒãã«å¯Ÿããå©ç¹ã¯äœã§ããïŒ
çãã¯ãšãŠãç°¡åã§ãã ã¢ã³ã«ãŒã䜿çšãããšãããŒã¿ã®æ£èŠåã«ã€ããŠå°ãç°ãªãèŠæ¹ãããããšãã§ããŸãã 以åã¯ãéåžžã®åœ¢åŒã¯äž»ã«ããŒã¿ã®ç°åžžã®èŠ³ç¹ããèæ ®ãããŠããŸããã ãã®å Žåã6NFã¯ç空äžã®ããçš®ã®ç圢ã®éŠ¬ã®ããã«èŠããŸãããããã¯ããããçè«çãªèŠ³ç¹ããã¯èå³æ·±ãã§ãããå®éã«ã¯åœ¹ã«ç«ã¡ãŸããã AnchorãData Vaultã®ãããªã¢ãããŒãã®åºçŸã«ãããããŒã¿ã®æ£èŠåã¯ç°åžžã®æé€ã ãã§ãªããããŒã¿ã¹ããŒã ã®é²åã®èŠ³ç¹ãããéèŠã§ããããšãæããã«ãªããŸããã äœãå£ããã«ãã®ãããªã¹ããŒã ãå€æŽããæ¹ãç°¡åã§ãã
ãããžã§ã¯ãäœæ
ãã®ãµã€ãã«ã¯ãã¢ã³ã«ãŒã¢ãã«ã®çŽ æŽããããšãã£ã¿ãŒããããŸãã Eclipse Modeling Frameworkã«åºã¥ããŠãåæ§ã®ãšãã£ã¿ãŒãäœæããããšããŸãã
ã泚æ
ããæ£ç¢ºã«ã¯ããã®èšäºã§ã¯ãåçŽåãããïŒããªãŒã®ãããªïŒãšãã£ã¿ãŒãäœæããŸãã 次ã®èšäºã§ã¯ãæ¬æ Œçãªãã£ãŒããšãã£ã¿ãäœæããŸãã ãããŠã次ã®èšäºããããªãããããã¹ãŠè¡ã£ãŠããã®ããæããã«ãªããŸãã ãã¡ãããã¢ããªã³ã°èšèªã®äœææ¹æ³ãåŠã¶ããšã ãã§ã¯ãããŸããã
ãããã£ãŠããã¹ãŠãå®éã«è©ŠããŠã¿ããå Žåã¯ã Eclipse Modeling ToolsãããŠã³ããŒãããŠè§£åããŠãã ããã
æ°ããEcore Modeling ProjectãäœæããŸãã ãã¢ã³ã«ãŒããšããååãä»ããŸãã [ãã¥ãŒãã€ã³ãã®éžæ]ã¿ãã§ã[ãã¶ã€ã³]ãéžæããŸãã
ã¡ã¿ã¢ãã«ã¯ecoreãã¡ã€ã«ã«ä¿åãããŸãã airdãã¡ã€ã«ã«ã¯ãã¡ã¿ã¢ãã«ã®ãã£ãŒããä¿åãããŸãã åã®èšäºãèªãã å Žåãã¢ãã«ãšã¢ãã«å³ã¯ç°ãªããã®ã§ããããšãç解ããå¿ èŠããããŸãã æåŸã«ãã¡ã¿ã¢ãã«ãããœãŒã¹ã³ãŒããçæããããã®ã¢ãã«ãgenmodelãã¡ã€ã«ã«ä¿åãããŸãã ç¹ã«ãã©ã®ãã©ã«ããŒã«ã³ãŒããè¿œå ããããªã©ãã³ãŒããçæããããã®ããŸããŸãªã«ãŒã«ãèšå®ããŸãã
ã泚æ
以äžãã¡ã¿ã¢ãã«ãã¢ãã«ãšåŒã¶ããšããããŸãã ããã«ççŸã¯ãªããã¡ã¿ã¢ãã«èªäœãã¢ãã«ã§ãã åæ§ã«ãã¡ã¿ã¯ã©ã¹ã¯ã¡ã¿ã¡ã¿ã¢ãã«ã«é¢ããã¯ã©ã¹ã§ãã
ãããžã§ã¯ããäœæããã®ãé¢åãªå Žåã¯ã æºåãæŽããããšãã§ããŸãã
åºæ¬çãªã¡ã¿ã¯ã©ã¹ã®äœæ
次ã«ãã¡ã¿ã¯ã©ã¹ïŒã¢ã³ã«ãŒã¢ãã«ã«å«ãŸããå¯èœæ§ã®ãããšã³ãã£ãã£ã®çš®é¡ïŒãèšè¿°ããå¿ èŠããããŸãã ã°ã©ãã«ã¯ã©ã¹ãè¿œå ããAnchorãšããååãä»ããŸãã EStringããŒã¿åã®ååå±æ§ãè¿œå ããŸãã [äžé]ãã£ãŒã«ãã«1ãšå ¥åããŸãã
å¥ã®ã¯ã©ã¹ãè¿œå ããAttributeãšããååãä»ããŸãã nameå±æ§ãã³ããŒããŸãã
ã¢ã³ã«ãŒã¢ãã«ã§ã¯ãã¢ã³ã«ãŒãšå±æ§ããªã³ã¯ã§ããŸãã ãããã£ãŠãã¡ã¿ã¢ãã«ã§ã¯ãã¢ã³ã«ãŒãšå±æ§ã®éã«æ¥ç¶ãäœæããå¿ èŠããããŸãã æ¥ç¶ã¯ã³ã³ããžã·ã§ã³ã§ããå¿ èŠããããŸããå±æ§ã¯ããèªäœã§ã¯ååšã§ãããåžžã«ã¢ã³ã«ãŒã«å±ããããã«ã¢ã³ã«ãŒã«å±ããŠããããã§ãã
ã泚æ
åœåé¢ä¿ã«ã¯ããŸããŸãªã¢ãããŒãããããŸãã ã¢ã³ã«ãŒãšå±æ§ã®ãã®é¢ä¿ã¯ãattributeãattributesãownedAttributeãownedAttributesãšåŒã°ããŸãã 1察1ã®é¢ä¿ã¯ãåæ°åœ¢ã§äžæã«èå¥ãããå¿ èŠããããŸãã 1察å€ã®é¢ä¿ã¯ãåæ°åœ¢ã§åç §ãããããšãããã°ãè€æ°åœ¢ã§åç §ãããããšããããŸãã ãªã¬ãŒã·ã§ã³ãã³ã³ããžã·ã§ã³ã®å ŽåãææãããŠãããã¬ãã£ãã¯ã¹ãååã«è¿œå ãããããšããããŸãã ããã¯ãå±æ§ãã¢ã³ã«ãŒã«å±ããããšãæå³ããŸãã
ã¢ãã«ã1ã€ã®åœåã¹ããŒã ã䜿çšããããšãéèŠã§ãã 2çªç®ã䜿çšããŸãã
ã¢ãã«ãšãã£ã¿ãŒã®çæ
ãã®ãããã¡ã¿ã¢ãã«ã®æŠèŠã¯æ¢ã«ç°¡ç¥åãããŠããŸãã 次ã«ããã®ã¡ã¿ã¢ãã«ã«åŸã£ãŠã¢ãã«ãäœæããŸãã ãããè¡ãã«ã¯ããã©ã°ã€ã³ã®ãœãŒã¹ã³ãŒããçæããå¿ èŠããããŸãããããEclipseã§å®è¡ããã¢ãã«ãæäœã§ããããã«ããŸãã
anchor.genmodelãéããŸãã ããããã£ã«ã¯ããŸããŸãªèšå®ããããŸãã ããããå€æŽããã«æ®ãããšãã§ããŸãããéåžžãçæãããã³ãŒãã®ãã©ã«ããŒã¯srcããsrc-genã«å€æŽãããçæãããã³ãŒãããæåã§èšè¿°ãããã³ãŒããåé¢ããŸãã ãšããã§ãç§ãã¡ã®ãããžã§ã¯ãã§ã¯ãææžãã®ã³ãŒãã¯ãŸã£ãããããŸããã
ã³ã³ããã¹ãã¡ãã¥ãŒã§[ã¢ãã«ã³ãŒãã®çæ]ãéžæãããšãã¢ã³ã«ãŒã¢ãã«ãæäœããããã®Java APIãsrcïŒãŸãã¯src-genïŒãã©ã«ããŒã«è¡šç€ºãããŸãã ãã®èšäºããã³ä»¥éã®èšäºã®ç®çã®ããã«ããã®ã³ãŒãã調ã¹ããç·šéãããããå¿ èŠã¯ãããŸããã
ãç·šéã³ãŒãã®çæãããã³ããšãã£ã¿ãŒã³ãŒãã®çæããå®è¡ããŸãã ãããã£ãŠã2ã€ã®è¿œå ãããžã§ã¯ããäœæããŸãã1ïŒã¢ããªã³ã°èšèªã®ãªããžã§ã¯ãã¢ãã«ãšãšãã£ã¿ãŒã®éã®ã¬ã€ã€ãŒã2ïŒããªãŒã®ãããªã¢ãã«ãšãã£ã¿ãŒã
ããŒãã®åã«ãããã¹ãã³ãŒãã®çæãã³ãã³ãã䜿çšããŠãã¹ããããžã§ã¯ããäœæããŸãã åäœãã¹ãã¯äœæããŸãããããã®ãããžã§ã¯ãã§ã¯ãã¡ã¿ã¢ãã«çšã«çæãããAPIã®äœ¿çšäŸãèŠãããšãã§ããŸãã ãŸãããã®ãããžã§ã¯ãã§ã¯ããã¹ãã¢ãã«ãäœæããŸãã
JavaããŒã¹ãã¯ãã£ãã«åãæ¿ããŸãïŒãŠã£ã³ããŠ->ããŒã¹ãã¯ãã£ã->ããŒã¹ãã¯ãã£ããéãïŒã
[å®è¡]-> [æ§æã®å®è¡...]ãéžæããŸãã[Eclipseã¢ããªã±ãŒã·ã§ã³]ã»ã¯ã·ã§ã³ã§ãæ°ããæ§æãäœæããŠå®è¡ããŸãã
anchor.testsãããžã§ã¯ãïŒãã¡ã€ã«->ã€ã³ããŒã...->äžè¬->æ¢åã®ãããžã§ã¯ããã¯ãŒã¯ã¹ããŒã¹ã«ã€ã³ããŒãïŒãå®è¡äžã®Eclipseã€ã³ã¹ã¿ã³ã¹ã«ã€ã³ããŒãããŸãã ã¢ããªã³ã°ããŒã¹ãã¯ãã£ããéããŸãïŒãŠã£ã³ããŠ->ããŒã¹ãã¯ãã£ã->ããŒã¹ãã¯ãã£ããéã->ã¢ããªã³ã°ïŒã ãããžã§ã¯ãã«æ°ããã¢ãã«ãã©ã«ããŒãäœæããŸãïŒãã¡ã€ã«->æ°èŠ->ãã©ã«ããŒïŒã ãã©ã«ããŒã«ã¢ã³ã«ãŒã¢ãã«ãäœæããŸãïŒãã¡ã€ã«->æ°èŠ->ãã®ä»...ïŒã
æåŸã®ã¿ãã§ãã¢ãã«ãŠã£ã¶ãŒãã¯ã«ãŒããšããŠäœ¿çšãããªããžã§ã¯ããå°ããŸãïŒã¢ãã«ãªããžã§ã¯ããã£ãŒã«ãïŒã ã«ãŒããªããžã§ã¯ãã¯ãŸã äœæãããŠããªãããã[ã¢ã³ã«ãŒ]ãéžæããŸãã
[ããããã£]ã¿ãã§ãã¢ã³ã«ãŒã®ååãæå®ããå±æ§ãè¿œå ããŸãã
ã¢ãã«ã«ãŒããªããžã§ã¯ãã®äœæ
ãããŸã§ã®ãšããããšãã£ã¿ãŒã§ã¯å±æ§ãæã€ã¢ã³ã«ãŒã1ã€ã ãèšè¿°ããããšãã§ããŸãã ã¢ãã«ã«è€æ°ã®ã¢ã³ã«ãŒãèšå®ããã«ã¯ã次ãå®è¡ããŸãã
Eclipseã®2çªç®ã®ã€ã³ã¹ã¿ã³ã¹ãéããæåã®ã€ã³ã¹ã¿ã³ã¹ã§ãã¢ããªã³ã°ããŒã¹ãã¯ãã£ããéããŸãã anchor.ecoreãã¡ã€ã«ãéããŸãã ã¡ã¿ã¯ã©ã¹ã¢ãã«ãã¡ã¿ã¢ãã«ã«è¿œå ããŸãã
çæãããã¢ã³ã«ãŒãšããã¡ã¿ã¯ã©ã¹EReferenceãè¿œå ããŸãã [EType]ãã£ãŒã«ãã§ã[ã¢ã³ã«ãŒ]ãéžæããŸãã äžéã¯1ã«èšå®ãããäžéã¯-1ïŒä»»æã®éïŒã«èšå®ãããŸãã [å å«]ãã£ãŒã«ãã§ãçã®å€ãæå®ããŸãïŒããã¯ãã¢ã³ã«ãŒãã¢ãã«ã«å±ããããšãæå³ããŸãïŒã
次ã«ãã¢ã³ã«ãŒããã¢ãã«ãžã®ããã¯ãªã³ã¯ãäœæããŸãã ããã¯å¿ é ã§ã¯ãããŸãããã次ã®èšäºã§å¿ èŠã«ãªããŸãã ãããè¡ãã«ã¯ãã¢ãã«åã®ãªã³ã¯ãäœæããã¢ã³ã«ãŒã¡ã¿ã¯ã©ã¹ã§Modelãšå ¥åããŸãã [EOpposite]ãã£ãŒã«ãã§ãã¢ã³ã«ãŒããã¯ãªã³ã¯ãéžæããŸãã [äžé]ãã£ãŒã«ãã«1ãšå ¥åããŸãã
ã泚æ
ã¡ã¿ã¢ãã«ããªãŒãšãã£ã¿ãŒã¯ãçæããã°ããã®ãšãã£ã¿ãŒãšéåžžã«äŒŒãŠããããšã«æ°ã¥ããã§ãããã ã¢ã€ã³ã³ã®ãããã§å°ããããã«èŠããªãéãã ããã©ã«ãã®ã¢ã€ã³ã³ã¯ãã¢ã€ã³ã³ãã©ã«ããŒã®anchor.editãããžã§ã¯ãã«ãããŸãã ä»ã®ã¢ã€ã³ã³ã¯ããããååŸã§ããŸã ã ãããã¯svgããçæããããããå°ãæ²ãã£ãŠããŸãããã¢ã€ãã¢ã¯åŸãããŸãã
ã¡ã¿ã¢ãã«ãä¿åããŸãã anchor.airdã§ãã£ãŒããéããŸãã ã¢ãã«ã¡ã¿ã¯ã©ã¹ãå³ã«è¿œå ããŸãïŒ[æ¢åã®èŠçŽ ]ã»ã¯ã·ã§ã³ã®å³åŽã®ããŒã«ãã¬ããã§ã[è¿œå ]ãéžæããŸãïŒã ããªãŒãšãã£ã¿ã§äœæããã¢ã³ã«ãŒã¡ã¿ã¯ã©ã¹ãšã®åæ¹åã®é¢ä¿ãå³ã«è¿œå ãããŠããããšã«æ³šæããŠãã ããã
ãã©ã°ã€ã³ã®çæ
ã¡ã¿ã¢ãã«ãå€æŽããåŸããã¹ãŠã®ãããžã§ã¯ãã§ãœãŒã¹ã³ãŒããåçæããããšãå¿ããªãã§ãã ããã ããã§ãEclipseã®2çªç®ã®ã€ã³ã¹ã¿ã³ã¹ãéå§ãã代ããã«ã次ã®æé ãå®è¡ããŸãã ã¡ãã¥ãŒããã[ãã¡ã€ã«]-> [ãšã¯ã¹ããŒã...]-> [å±éå¯èœãªãã©ã°ã€ã³ãšãã©ã°ã¡ã³ã]ãéžæããŸãã
äœæããããã¹ãŠã®ãããžã§ã¯ãïŒå°ãªããšãanchor.testsãé€ããã¹ãŠïŒã確èªããŸãã [ãã¹ãã«ã€ã³ã¹ããŒã«]ãéžæããŸãã ãªããžã㪠ãã©ã°ã€ã³ããããã€ããåŸãEclipseãåèµ·åããŸãã ã¢ã³ã«ãŒã¢ãã«ãšãã£ã¿ãŒã¯ãEclipseã®2çªç®ã®ã€ã³ã¹ã¿ã³ã¹ãèµ·åããã«ããã®ã¯ãŒã¯ã¹ããŒã¹ã§äœ¿çšã§ããããã«ãªããŸãã
ãã©ã°ã€ã³ãããã€ãã®ãã©ã«ããŒã«ãšã¯ã¹ããŒãããããšãã§ããŸãã ãã®åŸãçµæã®jarãã¡ã€ã«ã$ ECLIPSE_HOME / dropinsãã©ã«ããŒã«ã³ããŒã§ããŸãã Eclipseãåèµ·åãããšããã©ã°ã€ã³ãå©çšå¯èœã«ãªããŸãã
ã¡ã¿ã¢ãã«ã®å®æ
äžè¬ã«ããããã¡ã¿ã¢ãã«ãäœæããããã«EMFã«ã€ããŠç¥ãå¿ èŠããããã¹ãŠã§ãã æ®ã£ãŠããã®ã¯ãæ¬ èœããŠããã¡ã¿ã¯ã©ã¹ãè¿œå ããããšã ãã§ãã
ä»ã®ã¡ã¿ã¯ã©ã¹ãå¿ èŠãã©ããã調ã¹ãã«ã¯ãåã«ã¢ã³ã«ãŒã¢ãã«ã®äŸãèŠãããMãBergholtzãPãJohannessonãPãWohedã®èšäºãã¢ã³ã«ãŒã¢ããªã³ã°-é²åããããŒã¿ç°å¢ã§ã®ã¢ãžã£ã€ã«æ å ±ã¢ããªã³ã°ããåç §ããŠãã ãã ã
ãã®ã¡ã¿ã¢ãã«ãå®è£ ããããšãããšãå³ã«ç€ºãããŠãããã®ãããæé©ãªæ¹æ³ã§å®è¡ã§ããããšãããããŸãã 次ã®2ã€ã®ç¹ãæ¹åããŸãã
- éè€ããããããã£ãšãªã¬ãŒã·ã§ã³ã·ããã¯å¥ã ã®ã¯ã©ã¹ã«é 眮ãããŸãã
- åã·ã¹ãã ãå°ãæ¹åããŸãã
ã泚æ
ååä»ãã€ã³ã¿ãŒãã§ã€ã¹ã¯å³ã«è¡šç€ºãããŸãããããã䜿çšãããšãå³ãå®å šã«å€èªã§ããªããªãããã§ãã
äžéšã®ããããã£ã§ã¯ãEDoubleã ãã§ãªãEDoubleObjectåã䜿çšãããŸãããããã®ããããã£ã¯ãªãã·ã§ã³ã§ããããã§ãã EDoubleããŒã¿åãèšå®ãããšãããã©ã«ãã§0ã«èšå®ãããå®éã«0ã«èšå®ãããŠããã®ããåã«æå®ãããŠããªãã®ããç解ããããšã¯ã§ããŸããã
æ¹åç¹ã詳现ã«æ€èšããŠãã ããã
æœè±¡ã¯ã©ã¹ãšã€ã³ã¿ãŒãã§ãŒã¹ã«é¢ããã¢ããªã³
äžèšã®å ã®ã¯ã©ã¹å³ã¯ãå±¥æŽãä¿æããªãããã¹ãŠã®å±æ§ãšã¹ããŒãã«ã«ã€ããŠãã¡ã¿ã¯ã©ã¹TIME TYPEãšã®é¢ä¿ãå®çŸ©ãããŠããããšã瀺ããŠããŸãã äžéšã®ã¡ã¿ã¯ã©ã¹ã«ã¯ãDATA TYPEã¡ã¿ã¯ã©ã¹ãšåæ§ã®é¢ä¿ããããŸãã ãŸããå€ãã®ã¡ã¿ã¯ã©ã¹ã«ã¯ååå±æ§ããããŸãããå³ã«ã¯ç€ºãããŠããŸããã
ããããã¹ãŠã®åãããããã£ããã³é¢ä¿ã¯ã察å¿ããã¡ã¿ã¯ã©ã¹HistorizedãTypedãNamedãªã©ã«ç§»åã§ããŸãã ã¢ã³ã«ãŒã¢ãã«ã§ã¯ããããã®ã¡ã¿ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ã¯ååšã§ããªããããæœè±¡ãšããŠæ³šæããå¿ èŠããããŸãã
Ecoreã¯å€éç¶æ¿ãèš±å¯ããŸãã ãŸããããšãã°ãHistorizedAttributeã¯ãAttributeãTypedãããã³Historizedã¡ã¿ã¯ã©ã¹ããååã«ç¶æ¿ã§ããŸãã ãã ããè€æ°ã®ç¶æ¿ã䜿çšããŠEcoreã¡ã¿ã¢ãã«çšã«çæãããJava APIãèŠããšãããŒã¹ã¡ã¿ã¯ã©ã¹ã®1ã€ã ããJavaã¯ã©ã¹ãšããŠå®è£ ãããæ®ãã¯Javaã€ã³ã¿ãŒãã§ã€ã¹ãšããŠå®è£ ãããŠããããšãããããŸãïŒJavaå€éç¶æ¿ããµããŒãããŠããŸããïŒã ãããã£ãŠãäžææ§ãä¿ã€ããã«ãäžéšã®ã¡ã¿ã¯ã©ã¹ãEcoreã¡ã¿ã¢ãã«ã®ã€ã³ã¿ãŒãã§ã€ã¹ãšããŠããã«ããŒã¯ããããšãæãŸããã§ãã
ããŒã¿åè£éº
ãµã€ãã®ã¢ã³ã«ãŒã¢ãã«ã®äŸãèŠããšãvarcharïŒ42ïŒãmoneyãªã©ã®åœ¢åŒã®ããŒã¿åããããŸãã ããŒã®ããŒã¿åãã¢ãã«ã§æ瀺çã«èšå®ãããŠããããšã確èªããŠãã ããã å人çã«ãç§ã¯ãã®ç©çåŠãžã®å·çã«éåžžã«é©ããŸããã åœåãã¢ã³ã«ãŒã¯ããªãæŠå¿µçãªã¢ããªã³ã°èšèªã®å°è±¡ãäžããŸããããã¢ãã«ã¯ç¹å®ã®DBMSã«é¢é£ä»ããããŠããããšãå€æããŸããã
ããã€ãã®æœè±¡ããŒã¿åãè¿œå ããããšã§ãã®æ¬ é¥ã解æ¶ããŸãïŒäžã®å³ã§èŠãããŸãïŒãããã¯ä»¥éã®èšäºã§ç¹å®ã®DBMSã®ããŒã¿åã«å€æãããŸãã ããŠãäžè¬ã«ãå ãèŠæ®ããŠã次ã®èšäºã§ã¢ãã«å€æã®å¯èœæ§ã瀺ãããã«ãã®ã¡ã¿ã¢ãã«ãäœæããŸããã ãããŠãã¢ã³ã«ãŒWebãµã€ãã®ã³ã¡ã³ãã§ãXSLTã䜿çšããŠSQLã¯ãšãªãçæããããšã«ã€ããŠã®å°çãŸã§èªãã§ããŸããããã¯æªãããšã§ãã
ãããã«
ãã®èšäºãèªãã åŸã¯ãEclipse Modeling Frameworkã䜿çšããŠã¢ããªã³ã°èšèªãäœæã§ããã¯ãã§ãã ãŸããããŒã¿ã¢ããªã³ã°ã®åéããäœãé¢çœãããšãåŠãã ãããããŸããã
次ã®èšäºã§ã¯ãããªãŒãšãã£ã¿ãŒã ãã§ãªãã ãã€ã¢ã°ã©ã ãšãã£ã¿ãŒã®äœææ¹æ³ã«ã€ããŠèª¬æããŸãã