Exemplo n.º 1
0
        private RegistryObjectList Build_Test01()
        {
            var list = new RegistryObjectList
            {
                ClassificationSchemes = new List<ClassificationScheme>
                {
                    new ClassificationScheme
                    {
                        LocalId = "urn:xdskit:com:classificationScheme:CustomerType",
                        Id = "urn:xdskit:com:classificationScheme:CustomerType",
                        IsInternal = true,
                        NodeType = "urn:oasis:names:tc:ebxml-regrep:NodeType:UniqueCode",
                        Name = XmlUtil.LocalString("CustomerType"),
                        Description = XmlUtil.LocalString(
                            "This is the ClassificationScheme for XdsKit customer types",
                            "UTF-16"),
                        Nodes = new List<ClassificationNode>
                        {
                            new ClassificationNode
                            {
                                LocalId="urn:xdskit:com:classificationScheme:CustomerType:NoviceCustomer",
                                Id="urn:xdskit:com:classificationScheme:CustomerType:NoviceCustomer",
                                Code="NoviceCustomer",
                                Name = XmlUtil.LocalString("NoviceCustomer", "ASCII"),
                                Description = XmlUtil.LocalString("This is customer is an XdsKit beginner.")
                            },
                            new ClassificationNode
                            {
                                LocalId="urn:xdskit:com:classificationScheme:CustomerType:CompetentCustomer",
                                Id="urn:xdskit:com:classificationScheme:CustomerType:CompetentCustomer",
                                Code="CompetentCustomer",
                                Name = XmlUtil.LocalString("CompetentCustomer"),
                                Description = XmlUtil.LocalString("This is customer is competent with XdsKit.")
                            },
                            new ClassificationNode
                            {
                                LocalId="urn:xdskit:com:classificationScheme:CustomerType:ProficientCustomer",
                                Id="urn:xdskit:com:classificationScheme:CustomerType:ProficientCustomer",
                                Code="ProficientCustomer",
                                Name = XmlUtil.LocalString("ProficientCustomer"),
                                Description = XmlUtil.LocalString("This is customer is proficient in all things XdsKit.")
                            },
                            new ClassificationNode
                            {
                                LocalId="urn:xdskit:com:classificationScheme:CustomerType:ExpertCustomer",
                                Id="urn:xdskit:com:classificationScheme:CustomerType:ExpertCustomer",
                                Code="ExpertCustomer",
                                Name = XmlUtil.LocalString("ExpertCustomer"),
                                Description = XmlUtil.LocalString("This is customer is an XdsKit expert.")
                            },
                            new ClassificationNode
                            {
                                LocalId="urn:xdskit:com:classificationScheme:CustomerType:Partner",
                                Id="urn:xdskit:com:classificationScheme:CustomerType:Partner",
                                Code="Partner",
                                Name = XmlUtil.LocalString("Partner"),
                                Description = XmlUtil.LocalString("This is customer is one of our XdsKit partners.")
                            }
                        }
                    }

                },
                Classifications = new List<Classification>
                {
                    new Classification
                    {
                        ClassificationScheme="urn:xdskit:com:classificationScheme:CustomerType",
                        ClassificationNode="urn:xdskit:com:classificationScheme:CustomerType:NoviceCustomer",
                        ClassifiedObject="urn:xdskit:com:c7ptmx37tfbcwy8ky7n"
                    },
                    new Classification
                    {
                        ClassificationScheme="urn:xdskit:com:classificationScheme:CustomerType",
                        ClassificationNode="urn:xdskit:com:classificationScheme:CustomerType:Partner",
                        ClassifiedObject="urn:xdskit:com:c7ptmx37tfbcwy8ky7o"
                    },
                    new Classification
                    {
                        ClassificationScheme="urn:xdskit:com:classificationScheme:CustomerType",
                        ClassificationNode="urn:xdskit:com:classificationScheme:CustomerType:ExpertCustomer",
                        ClassifiedObject="urn:xdskit:com:c7ptmx37tfbcwy8ky7p"
                    },
                    new Classification
                    {
                        ClassificationScheme="urn:xdskit:com:classificationScheme:PartnerRegion",
                        NodeRepresentation="Northeast",
                        ClassifiedObject="urn:xdskit:com:c7ptmx37tfbcwy8ky7o"
                    }
                },
                Organizations = new List<Organization>
                {
                    new Organization
                    {
                        Id="urn:xdskit:com:c7ptmx37tfbcwy8ky7n",
                        Home="https://services.xdskit.com/organizations",
                        PrimaryContact="urn:xdskit:com:c7ptmx37tfbcwy8ky7a"
                    },
                    new Organization
                    {
                        Id="urn:xdskit:com:c7ptmx37tfbcwy8ky7o",
                        Home="https://services.xdskit.com/organizations",
                        PrimaryContact="urn:xdskit:com:c7ptmx37tfbcwy8ky7b"
                    },
                    new Organization
                    {
                        Id="urn:xdskit:com:c7ptmx37tfbcwy8ky7p",
                        Home="https://services.xdskit.com/organizations",
                        PrimaryContact="urn:xdskit:com:c7ptmx37tfbcwy8ky7c"
                    }
                }
            };

            return list;
        }
        private RegistryObjectList Build_Test01()
        {
            var list = new RegistryObjectList
            {
                Registries = new List<Registry>
                {
                    new Registry
                    {
                        Id="urn:xdskit:com:c7ptmx37tfbcwy8ky7a",
                      Operator="urn:xdskit:com:c7ptmx37tfbcwy8ky7b",
                      SpecificationVersion="3.0",
                      ReplicationSyncLatency="PT2H".AsTimeSpan(),
                      CatalogingLatency="P2D".AsTimeSpan(),
                      ConformanceProfile="registryLite",
                    },
                    new Registry
                    {
                        Id="urn:xdskit:com:c7ptmx37tfbcwy8ky7d",
                        Operator="urn:xdskit:com:c7ptmx37tfbcwy8ky7e",
                        SpecificationVersion="3.0",
                        ConformanceProfile="registryFull",
                    }
                },
                Federations = new List<Federation>
                {
                    new Federation
                    {
                        Id = "urn:xdskit:com:c7ptmx37tfbcwy8ky7g",
                        ReplicationSyncLatency = "PT2H".AsTimeSpan()
                    },
                    new Federation
                    {
                        Id = "urn:xdskit:com:c7ptmx37tfbcwy8ky7h"
                    }
                },
                Associations = new List<Association>
                {
                    new Association
                    {
                        AssociationType = AssociationType.HasFederationMember,
                        Source="urn:xdskit:com:c7ptmx37tfbcwy8ky7g",
                        Target="urn:xdskit:com:c7ptmx37tfbcwy8ky7a"
                    },
                    new Association
                    {
                        AssociationType = AssociationType.HasFederationMember,
                        Source="urn:xdskit:com:c7ptmx37tfbcwy8ky7g",
                        Target="urn:xdskit:com:c7ptmx37tfbcwy8ky7d"
                    }
                }
            };

            return list;
        }
Exemplo n.º 3
0
        private RegistryObjectList Build_Test01()
        {
            var list = new RegistryObjectList
            {
                Services = new List<Service>
                {
                    new Service
                    {
                        Id = "urn:xdskit:com:CatalogService:findResource",
                        LocalId = "urn:xdskit:com:CatalogService:findResource",
                        Name = XmlUtil.LocalString("Find Resource Service"),
                        Description = XmlUtil.LocalString("This services searches the global catalog for resources."),
                        ServiceBindings = new List<ServiceBinding>
                        {
                            new ServiceBinding
                            {
                                Id = "urn:xdskit:com:c7ptmx37tfbcwy8ky7o",
                                AccessURI = "https://services.xdskit.com/catalog/findResource",
                                Service = "urn:xdskit:com:CatalogService:findResource",
                                Name = XmlUtil.LocalString("Find Resource Service binding (prod environment)"),
                                Description =
                                    XmlUtil.LocalString(
                                        "Production environment binding for the Catalog's Find Resource service"),
                                SpecificationLinks = new List<SpecificationLink>
                                {
                                    new SpecificationLink
                                    {
                                        Id = "urn:xdskit:com:c7ptmx37tfbcwy8ky7p",
                                        ServiceBinding = "urn:xdskit:com:c7ptmx37tfbcwy8ky7o",
                                        SpecificationObject = "urn:xdskit:com:Documentation:CatalogService:findResource",
                                        UsageDescription =
                                            XmlUtil.LocalString(
                                                "The find resources service has 2 parameters: ResourceType and Id"),
                                        UsageParameters = new List<string>
                                        {
                                            "ResourceType. DataType: referenceUri. The type of resource within the Catalog",
                                            "Id. DataType: anyUri. The ID of the resource to locate."
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                ServiceBindings = new List<ServiceBinding>
                {
                    new ServiceBinding
                    {
                        Id = "urn:xdskit:com:c7ptmx37tfbcwy8ky7m",
                        AccessURI = "https://test-services.xdskit.com/catalog/findResource",
                        Service = "urn:xdskit:com:CatalogService:findResource",
                        Name = XmlUtil.LocalString("Find Resource Service binding (test environment)"),
                        Description =
                            XmlUtil.LocalString(
                                "Test environment binding for the Catalog's Find Resource service"),
                        SpecificationLinks = new List<SpecificationLink>
                        {
                            new SpecificationLink
                            {
                                Id = "urn:xdskit:com:c7ptmx37tfbcwy8ky7n",
                                ServiceBinding = "urn:xdskit:com:c7ptmx37tfbcwy8ky7m",
                                SpecificationObject = "urn:xdskit:com:Documentation:CatalogService:findResource",
                                UsageDescription =
                                    XmlUtil.LocalString(
                                        "The find resources service has 2 parameters: ResourceType and Id"),
                                UsageParameters = new List<string>
                                {
                                    "ResourceType. DataType: referenceUri. The type of resource within the Catalog",
                                    "Id. DataType: anyUri. The ID of the resource to locate."
                                }
                            }
                        }
                    }
                }
            };

            return list;
        }
Exemplo n.º 4
0
        private RegistryObjectList Build_Test01()
        {
            var list = new RegistryObjectList
            {
                RegistryPackages = new List<RegistryPackage>
                {
                    new RegistryPackage
                    {
                        Id = "urn:xdskit:com:c7ptmx37tfbcwy8ky7m",
                        ObjectType = "urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:RegistryPackage"
                    }
                },
                ExtrinsicObjects = new List<ExtrinsicObject>
                {
                    new ExtrinsicObject
                    {
                        Id = "urn:xdskit:com:c7ptmx37tfbcwy8ky7n",
                        MimeType = "text/plain",
                        ObjectType = "urn:xdskit:com:c7ptmx37tfbcwy8ky7o",
                        IsOpaque = true,
                        VersionInfo = new VersionInfo
                        {
                            VersionName = "1.0+revision.5",
                            Comment = "This is the latest version"
                        }
                    },
                    new ExtrinsicObject
                    {
                        Id = "urn:xdskit:com:c7ptmx37tfbcwy8ky7p",
                        MimeType = "application/pdf",
                        ObjectType = "urn:xdskit:com:c7ptmx37tfbcwy8ky7o",
                        IsOpaque = false,
                        VersionInfo = new VersionInfo {VersionName = "775"}
                    }
                },
                Associations = new List<Association>
                {
                    new Association
                    {
                        AssociationType = AssociationType.HasMember,
                        Source = "urn:xdskit:com:c7ptmx37tfbcwy8ky7m",
                        Target = "urn:xdskit:com:c7ptmx37tfbcwy8ky7n"
                    },
                    new Association
                    {
                        AssociationType = AssociationType.HasMember,
                        Source = "urn:xdskit:com:c7ptmx37tfbcwy8ky7m",
                        Target = "urn:xdskit:com:c7ptmx37tfbcwy8ky7p"
                    }
                }
            };

            return list;
        }
Exemplo n.º 5
0
        private RegistryObjectList Build_Test03()
        {
            var list = new RegistryObjectList
            {
                AuditableEvents = new List<AuditableEvent>
                {
                    new AuditableEvent
                    {
                        Id="urn:xdskit:com:c7ptmx37tfbcwy8ky7a",
                        EventType="urn:oasis:names:tc:ebxml-regrep:EventType:Created",
                        Timestamp=DateTime.Parse("2015-08-31T06:49:22"),
                        User="******",
                        RequestId="urn:xdskit:com:c7ptmx37tfbcwy8ky7c",
                        AffectedObjects = new List<ObjectRef>
                        {
                            new ObjectRef { Id="urn:xdskit:com:c7ptmx37tfbcwy8ky7n" },
                            new ObjectRef { Id="urn:xdskit:com:c7ptmx37tfbcwy8ky7p" }
                        }
                    },
                    new AuditableEvent
                    {
                        Id="urn:xdskit:com:c7ptmx37tfbcwy8ky7d",
                        EventType="urn:oasis:names:tc:ebxml-regrep:EventType:Deleted",
                        Timestamp=DateTime.Parse("2015-08-31T06:52:07"),
                        User="******",
                        RequestId="urn:xdskit:com:c7ptmx37tfbcwy8ky7f",
                        AffectedObjects = new List<ObjectRef>
                        {
                            new ObjectRef { Id="urn:xdskit:com:c7ptmx37tfbcwy8ky7m" }
                        }
                    }
                }
            };

            return list;
        }
Exemplo n.º 6
0
        private RegistryObjectList Build_Test02()
        {
            var list = new RegistryObjectList
            {
                Notifications = new List<Notification>
                {
                    new Notification
                    {
                        Id="urn:xdskit:com:c7ptmx37tfbcwy8ky7a",
                        Subscription="urn:xdskit:com:c7ptmx37tfbcwy8ky7m",
                        RegistryObjects = new RegistryObjectList
                        {
                            ObjectReferences = new List<ObjectRef>
                            {
                                new ObjectRef
                                {
                                    Id="urn:xdskit:com:c7ptmx37tfbcwy8ky7n"
                                },
                                new ObjectRef
                                {
                                    Id="urn:xdskit:com:c7ptmx37tfbcwy8ky7p"
                                }
                            }
                        }
                    }
                }
            };

            return list;
        }
Exemplo n.º 7
0
        private RegistryObjectList Build_Test01()
        {
            var list = new RegistryObjectList
            {
                Subscriptions = new List<Subscription>
                {
                    new Subscription
                    {
                        Id="urn:xdskit:com:c7ptmx37tfbcwy8ky7m",
                        ObjectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:Subscription",
                        Selector="urn:xdskit:com:query:c7ptmx37tfbcwy8ky7o",
                        StartTime=DateTime.Parse("2015-01-01T09:00:00"),
                        NotificationInterval="PT1H".AsTimeSpan(),
                        NotifyActions = new List<NotifyAction>
                        {
                            new NotifyAction
                            {
                                Endpoint="mailto:[email protected]",
                                NotificationOption="urn:oasis:names:tc:ebxml-regrep:NotificationOptionType:Objects"
                            },
                            new NotifyAction
                            {
                                Endpoint="urn:xdskit:com:c7ptmx37tfbcwy8ky7n"
                            }
                        }
                    }
                },
                AdhocQueries = new List<AdhocQuery>
                {
                    new AdhocQuery
                    {
                        Id="urn:xdskit:com:query:c7ptmx37tfbcwy8ky7o",
                        QueryExpression = new QueryExpression
                        {
                             QueryLanguage="urn:oasis:names:tc:ebxml-regrep:QueryLanguage:SQL-92",
                             Query="select * from RegistryObjects where id='urn:it:is:1992'"
                        }
                    }
                }
            };

            return list;
        }
Exemplo n.º 8
0
        private RegistryObjectList Build_Test01()
        {
            var list = new RegistryObjectList
            {
                Persons = new List<Person>
                {
                    new Person
                    {
                        Id = "urn:xdskit:com:c7ptmx37tfbcwy8ky7m",
                        Home = "https://services.xdskit.com/person",
                        Name = XmlUtil.LocalString("Michael Haboustak", "UTF-8", "en-AU"),
                        Description = XmlUtil.LocalString("This object represents an ebRIM person", "UTF-8", "en-GB"),
                        Addresses = new List<PostalAddress>
                        {
                            new PostalAddress
                            {
                                StreetNumber = "123",
                                Street = "Sesame St",
                                PostalCode = "10212",
                                City = "New York",
                                StateOrProvince = "NY",
                                Country = "US"
                            },
                            new PostalAddress
                            {
                                StreetNumber = "400",
                                Street = "Principal Way",
                                PostalCode = "19101",
                                City = "Philadelphia",
                                StateOrProvince = "PA",
                                Country = "US"
                            }
                        },
                        PersonName = new PersonName
                        {
                            MiddleName = "M",
                            LastName = "Haboustak",
                            FirstName = "Michael"
                        },
                        TelephoneNumbers = new List<TelephoneNumber>
                        {
                            new TelephoneNumber
                            {
                                CountryCode = "1",
                                AreaCode = "513",
                                Number = "555-1212",
                                Extension = "1040",
                                PhoneType = "Home"
                            },
                            new TelephoneNumber
                            {
                                CountryCode = "44",
                                AreaCode = "212",
                                Number = "555-3000",
                                Extension = "2010",
                                PhoneType = "Work"
                            },
                            new TelephoneNumber
                            {
                                CountryCode = "2",
                                AreaCode = "212",
                                Number = "555-8080",
                                Extension = "30",
                                PhoneType = "Fax"
                            }
                        },
                        EmailAddresses = new List<EmailAddress>
                        {
                            new EmailAddress
                            {
                                Address = "*****@*****.**",
                                Type = "Employee"
                            }
                        }
                    }
                },
                Users = new List<User>
                {
                    new User
                    {
                        Id = "urn:xdskit:com:c7ptmx37tfbcwy8ky7p",
                        Home = "https://services.xdskit.com/user",
                        Name = XmlUtil.LocalString("Mike Haboustak"),
                        Description = XmlUtil.LocalString("This object represents an ebRIM user"),
                        Addresses = new List<PostalAddress>
                        {
                            new PostalAddress
                            {
                                StreetNumber = "123",
                                Street = "Sesame St",
                                PostalCode = "10212",
                                City = "New York",
                                StateOrProvince = "NY",
                                Country = "US"
                            },
                            new PostalAddress
                            {
                                StreetNumber = "400",
                                Street = "Principal Way",
                                PostalCode = "19101",
                                City = "Philadelphia",
                                StateOrProvince = "PA",
                                Country = "US"
                            }
                        },
                        PersonName = new PersonName
                        {
                            MiddleName = "M",
                            LastName = "Haboustak",
                            FirstName = "Mike"
                        },
                        TelephoneNumbers = new List<TelephoneNumber>
                        {
                            new TelephoneNumber
                            {
                                CountryCode = "1",
                                AreaCode = "513",
                                Number = "555-1212",
                                Extension = "1040",
                                PhoneType = "Home"
                            },
                            new TelephoneNumber
                            {
                                CountryCode = "44",
                                AreaCode = "212",
                                Number = "555-3000",
                                Extension = "2010",
                                PhoneType = "Work"
                            },
                            new TelephoneNumber
                            {
                                CountryCode = "2",
                                AreaCode = "212",
                                Number = "555-8080",
                                Extension = "30",
                                PhoneType = "Fax"
                            }
                        },
                        EmailAddresses = new List<EmailAddress>
                        {
                            new EmailAddress
                            {
                                Address = "*****@*****.**",
                                Type = "Employee"
                            }
                        }
                    }
                },
                Organizations = new List<Organization>
                {
                    new Organization
                    {
                        Id = "urn:xdskit:com:c7ptmx37tfbcwy8ky7n",
                        Home = "https://services.xdskit.com/organizations",
                        PrimaryContact = "urn:xdskit:com:c7ptmx37tfbcwy8ky7m",
                        Name = XmlUtil.LocalString("XdsKit, Inc."),
                        Description = XmlUtil.LocalString("Main XdsKit organization record"),
                        Addresses = new List<PostalAddress>
                        {
                            new PostalAddress
                            {
                                StreetNumber = "123",
                                Street = "Sesame St",
                                PostalCode = "10212",
                                City = "New York",
                                StateOrProvince = "NY",
                                Country = "US"
                            },
                            new PostalAddress
                            {
                                StreetNumber = "400",
                                Street = "Principal Way",
                                PostalCode = "19101",
                                City = "Philadelphia",
                                StateOrProvince = "PA",
                                Country = "US"
                            }
                        },
                        TelephoneNumbers = new List<TelephoneNumber>
                        {
                            new TelephoneNumber
                            {
                                CountryCode = "1",
                                AreaCode = "513",
                                Number = "555-1212",
                                PhoneType = "Home"
                            },
                            new TelephoneNumber
                            {
                                CountryCode = "44",
                                AreaCode = "212",
                                Number = "555-3000",
                                Extension = "2010",
                                PhoneType = "Work"
                            },
                            new TelephoneNumber
                            {
                                CountryCode = "2",
                                AreaCode = "212",
                                Number = "555-8080",
                                Extension = "30",
                                PhoneType = "Fax"
                            }
                        },
                        EmailAddresses = new List<EmailAddress>
                        {
                            new EmailAddress
                            {
                                Address = "*****@*****.**",
                                Type = "Company"
                            }
                        }
                    }
                },
                Associations = new List<Association>
                {
                    new Association
                    {
                        Id = "urn:xdskit:com:c7ptmx37tfbcwy8ky7o",
                        AssociationType = AssociationType.AffiliatedWith,
                        Source = "urn:xdskit:com:c7ptmx37tfbcwy8ky7m",
                        Target = "urn:xdskit:com:c7ptmx37tfbcwy8ky7n"
                    },
                    new Association
                    {
                        Id = "urn:xdskit:com:c7ptmx37tfbcwy8ky7q",
                        AssociationType = AssociationType.AffiliatedWith,
                        Source = "urn:xdskit:com:c7ptmx37tfbcwy8ky7p",
                        Target = "urn:xdskit:com:c7ptmx37tfbcwy8ky7n"
                    }
                }
            };

            return list;
        }