コード例 #1
0
        public EARepository2()
        {
            this.AddModel("test model",
                          m => m.AddPackage("bLibrary",
                                            bLibrary =>
            {
                bLibrary.Element.Stereotype = Stereotype.bLibrary;
                bLibrary.AddTaggedValue(TaggedValues.baseURN.ToString()).WithValue("urn:test:blib1");
                bLibrary.AddPackage("PRIMLibrary", InitPRIMLibrary);
                bLibrary.AddPackage("ENUMLibrary", InitENUMLibrary);
                bLibrary.AddPackage("CDTLibrary", InitCDTLibrary);
                bLibrary.AddPackage("BDTLibrary", InitBDTLibrary);
                bLibrary.AddPackage("CCLibrary", InitCCLibrary);
                bLibrary.AddPackage("BIELibrary", InitBIELibrary);
                bLibrary.AddPackage("DOCLibrary", InitDOCLibrary);
            }));

            bdtSimpleString.AddBasedOnDependency(cdtSimpleString);
            bdtCurrency.AddBasedOnDependency(cdtCurrency);
            bdtMeasure.AddBasedOnDependency(cdtMeasure);
            bdtCode.AddBasedOnDependency(cdtCode);
            bdtDate.AddBasedOnDependency(cdtDate);
            bdtText.AddBasedOnDependency(cdtText);
            abieAddress.AddBasedOnDependency(accAddress);

            accPerson.AddASCC(accAddress, "homeAddress");
            accPerson.AddASCC(accAddress, "workAddress", "0", "*");

            abiePerson.AddASBIE(abieAddress, "homeAddress", EaAggregationKind.Shared);
            abiePerson.AddASBIE(abieAddress, "workAddress", EaAggregationKind.Composite, "0", "*");
            abieInvoice.AddASBIE(abieInvoiceInfo, "info", EaAggregationKind.Shared);
            abieInvoiceInfo.AddASBIE(abieAddress, "deliveryAddress", EaAggregationKind.Shared);
        }
コード例 #2
0
        public EARepositoryAbieEditor()
        {
            this.AddModel("test model", InitTestModel);

            bdtMeasure.AddBasedOnDependency(cdtMeasure);
            bdtCode.AddBasedOnDependency(cdtCode);
            bdtABCCode.AddBasedOnDependency(cdtCode);
            bdtDate.AddBasedOnDependency(cdtDate);
            bdtText.AddBasedOnDependency(cdtText);
            bieMyAddress.AddBasedOnDependency(accAddress);

            accPerson.AddASCC(accAddress, "homeAddress");
            accPerson.AddASCC(accAddress, "workAddress", "0", "*");

            bieMyPerson.AddASBIE(bieMyAddress, "homeAddress", EaAggregationKind.Shared);
            bieMyPerson.AddBasedOnDependency(accPerson);
            bieMyPerson.AddASBIE(bieMyAddress, "workAddress", EaAggregationKind.Composite, "0", "*");
            bieInvoice.AddASBIE(bieInvoiceInfo, "info", EaAggregationKind.Shared);
            bieInvoiceInfo.AddASBIE(bieMyAddress, "deliveryAddress", EaAggregationKind.Shared);
        }
コード例 #3
0
        public SynchTaggedValuesTestRepository()
        {
            Element prim     = null;
            Element acc      = null;
            Element abie     = null;
            Package model    = this.AddModel("Model", m => { });
            Package bLibrary = model.AddPackage(
                "bLibrary", bLib => { bLib.Element.Stereotype = Stereotype.bLibrary; }
                );

            bLibrary.AddPackage("PRIMLibrary", primLib =>
            {
                primLib.Element.Stereotype = Stereotype.PRIMLibrary;
                prim = primLib.AddPRIM("PRIM");
            });
            bLibrary.AddPackage("ENUMLibrary", enumLib =>
            {
                enumLib.Element.Stereotype = Stereotype.ENUMLibrary;
                Element @enum = enumLib.AddENUM("ENUM", prim);
                @enum.AddAttribute("CodelistEntry", "string").With(a => a.Stereotype = Stereotype.CodelistEntry);
                enumLib.AddClass("IDSCHEME").With(c => c.Stereotype = Stereotype.IDSCHEME);
            });
            bLibrary.AddPackage("CDTLibrary", cdtLib =>
            {
                cdtLib.Element.Stereotype = Stereotype.CDTLibrary;
                Element cdt = cdtLib.AddCDT("CDT");
                cdt.AddAttribute("CON", prim).With((a => a.Stereotype = Stereotype.CON));
                cdt.AddSUP(prim, "SUP");
            });
            bLibrary.AddPackage("CCLibrary", ccLib =>
            {
                ccLib.Element.Stereotype = Stereotype.CCLibrary;
                acc = ccLib.AddACC("ACC");
                acc.AddBCC(prim, "BCC");
            });
            bLibrary.AddPackage("BDTLibrary", bdtLib =>
            {
                bdtLib.Element.Stereotype = Stereotype.BDTLibrary;
                Element bdt = bdtLib.AddBDT("BDT");
                bdt.AddAttribute("CON", prim).With((a => a.Stereotype = Stereotype.CON));
                bdt.AddSUP(prim, "SUP");
            });
            bLibrary.AddPackage("BIELibrary", bieLib =>
            {
                bieLib.Element.Stereotype = Stereotype.BIELibrary;
                abie = bieLib.AddABIE("ABIE");
                abie.AddBBIE(prim, "BBIE");
            });
            bLibrary.AddPackage("DOCLibrary", bieLib => { bieLib.Element.Stereotype = Stereotype.DOCLibrary; });
            acc.AddASCC(acc, "ASCC");
            abie.AddASBIE(abie, "ASBIE", EaAggregationKind.Shared);
        }
コード例 #4
0
        public MappingTestRepository()
        {
            Element cdtText     = null;
            Element cdtCode     = null;
            Element cdtDateTime = null;
            Element primString  = null;

            this.AddModel(
                "test", m => m.AddPackage("bLibrary", bLibrary =>
            {
                bLibrary.Element.Stereotype = Stereotype.bLibrary;
                bLibrary.AddDiagram("bLibrary", "Class");
                bLibrary.AddPackage("PRIMLibrary", package =>
                {
                    package.Element.Stereotype = Stereotype.PRIMLibrary;
                    primString = package.AddPRIM("String");
                });
                bLibrary.AddPackage("CDTLibrary", package =>
                {
                    package.Element.Stereotype = Stereotype.CDTLibrary;
                    cdtText = package.AddCDT("Text").With(e =>
                    {
                        e.Stereotype = Stereotype.CDT;
                        e.AddCON(primString);
                        e.AddSUPs(primString, "Language", "UnusedSup", "LanguageLocale");
                    });
                    cdtCode = package.AddCDT("Code").With(e =>
                    {
                        e.Stereotype = Stereotype.CDT;
                        e.AddCON(primString);
                        e.AddSUPs(primString, "Language", "Name");
                    });

                    cdtDateTime = package.AddCDT("DateTime").With(e =>
                    {
                        e.Stereotype = Stereotype.CDT;
                        e.AddCON(primString);
                    });
                });
                bLibrary.AddPackage("CCLibrary", package =>
                {
                    package.Element.Stereotype = Stereotype.CCLibrary;
                    package.AddClass("Foo").With(e => e.Stereotype = Stereotype.ACC);
                    Element accAddress = package.AddClass("Address")
                                         .With(e => e.Stereotype = Stereotype.ACC)
                                         .With(e => e.AddBCCs(cdtText, "CountryName", "StreetName", "CityName", "BuildingNumber"))
                                         .With(e => e.AddBCCs(cdtCode, "Country"));
                    package.AddClass("AccountingVoucher")
                    .With(e => e.Stereotype = Stereotype.ACC);
                    package.AddClass("Person")
                    .With(e => e.Stereotype = Stereotype.ACC)
                    .With(e => e.AddBCCs(cdtText, "Name"));
                    Element accParty = package.AddClass("Party")
                                       .With(e => e.Stereotype = Stereotype.ACC)
                                       .With(e => e.AddBCCs(cdtText, "Name"))
                                       .With(e => e.AddASCC(accAddress, "Residence"));
                    accParty.AddASCC(accParty, "Children");
                    package.AddClass("TradeLineItem")
                    .With(e => e.Stereotype = Stereotype.ACC)
                    .With(e => e.AddBCCs(cdtText, "Identifer", "SequenceNumeric", "GrossWeightMeasure", "NetWeightMeasure", "GrossVolumeMeasure", "ChargeAmount"));
                    Element accNote = package.AddClass("Note")
                                      .With(e => e.Stereotype = Stereotype.ACC)
                                      .With(e => e.AddBCCs(cdtText, "Content"));
                    package.AddClass("Document")
                    .With(e => e.Stereotype = Stereotype.ACC)
                    .With(e => e.AddBCCs(cdtDateTime, "Issue"))
                    .With(e => e.AddASCC(accNote, "Included"));
                });
            }));
        }