Example #1
0
        public ServerObjects.Relationship ToRelationship(Service.RE soapServiceRelationship)
        {
            ServerObjects.Relationship soRelationship = new ServerObjects.Relationship();
            soRelationship.DomainUid              = soapServiceRelationship.D;
            soRelationship.RootMapUid             = soapServiceRelationship.RM;
            soRelationship.RelationshipOriginalId = soapServiceRelationship.O;
            soRelationship.RelationshipTypeUid    = soapServiceRelationship.T;
            soRelationship.RelationshipUid        = soapServiceRelationship.R;

            foreach (KeyValuePair <Guid, Guid> nodePair in soapServiceRelationship.N)
            {
                soRelationship.Nodes.Add(nodePair.Key, nodePair.Value);
            }

            foreach (KeyValuePair <Service.MetadataContext, Service.DA> metadataContextPair in soapServiceRelationship.M)
            {
                Service.MetadataContext soapServiceMetadataContext = metadataContextPair.Key;
                Service.DA soapServiceMetadata = metadataContextPair.Value;

                ServerObjects.Metadata soMetadata = ToMetadata(soapServiceMetadata);

                ServerObjects.MetadataContext soMetadataContext = new ServerObjects.MetadataContext();
                soMetadataContext.DescriptorTypeUid = soapServiceMetadataContext.DescriptorTypeUid;
                soMetadataContext.MetadataId        = soapServiceMetadataContext.MetadataId;
                soMetadataContext.MetadataName      = soapServiceMetadataContext.MetadataName;
                soMetadataContext.NodeUid           = soapServiceMetadataContext.NodeUid;
                soMetadataContext.RelationshipUid   = soapServiceMetadataContext.RelationshipUid;

                soRelationship.Metadata.Add(soMetadataContext, soMetadata);
            }

            return(soRelationship);
        }
        public ServerObjects.Relationship ToRelationship(Service.RE soapServiceRelationship)
        {
            ServerObjects.Relationship soRelationship = new ServerObjects.Relationship();
            soRelationship.DomainUid = soapServiceRelationship.D;
            soRelationship.RootMapUid = soapServiceRelationship.RM;
            soRelationship.RelationshipOriginalId = soapServiceRelationship.O;
            soRelationship.RelationshipTypeUid = soapServiceRelationship.T;
            soRelationship.RelationshipUid = soapServiceRelationship.R;

            foreach (KeyValuePair<Guid, Guid> nodePair in soapServiceRelationship.N)
            {
                soRelationship.Nodes.Add(nodePair.Key, nodePair.Value);
            }

            foreach (KeyValuePair<Service.MetadataContext, Service.DA> metadataContextPair in soapServiceRelationship.M)
            {
                Service.MetadataContext soapServiceMetadataContext = metadataContextPair.Key;
                Service.DA soapServiceMetadata = metadataContextPair.Value;

                ServerObjects.Metadata soMetadata = ToMetadata(soapServiceMetadata);

                ServerObjects.MetadataContext soMetadataContext = new ServerObjects.MetadataContext();
                soMetadataContext.DescriptorTypeUid = soapServiceMetadataContext.DescriptorTypeUid;
                soMetadataContext.MetadataId = soapServiceMetadataContext.MetadataId;
                soMetadataContext.MetadataName = soapServiceMetadataContext.MetadataName;
                soMetadataContext.NodeUid = soapServiceMetadataContext.NodeUid;
                soMetadataContext.RelationshipUid = soapServiceMetadataContext.RelationshipUid;

                soRelationship.Metadata.Add(soMetadataContext, soMetadata);
            }

            return soRelationship;
        }
Example #3
0
        public ServerObjects.Node ToNode(Service.NO soapServiceNode)
        {
            ServerObjects.Node soNode = new ServerObjects.Node();
            soNode.Depth          = soapServiceNode.DH;
            soNode.DomainUid      = soapServiceNode.D;
            soNode.RootMapUid     = soapServiceNode.RM;
            soNode.NodeOriginalId = soapServiceNode.O;
            soNode.NodeTypeUid    = soapServiceNode.T;
            soNode.NodeUid        = soapServiceNode.N;

            foreach (KeyValuePair <Service.MetadataContext, Service.DA> metadataContextPair in soapServiceNode.M)
            {
                Service.MetadataContext soapServiceMetadataContext = metadataContextPair.Key;
                Service.DA soapServiceMetadata = metadataContextPair.Value;

                ServerObjects.Metadata soMetadata = ToMetadata(soapServiceMetadata);

                ServerObjects.MetadataContext soMetadataContext = new ServerObjects.MetadataContext();
                soMetadataContext.DescriptorTypeUid = soapServiceMetadataContext.DescriptorTypeUid;
                soMetadataContext.MetadataId        = soapServiceMetadataContext.MetadataId;
                soMetadataContext.MetadataName      = soapServiceMetadataContext.MetadataName;
                soMetadataContext.NodeUid           = soapServiceMetadataContext.NodeUid;
                soMetadataContext.RelationshipUid   = soapServiceMetadataContext.RelationshipUid;

                soNode.Metadata.Add(soMetadataContext, soMetadata);
            }

            return(soNode);
        }
        public ServerObjects.Node ToNode(Service.NO soapServiceNode)
        {
            ServerObjects.Node soNode = new ServerObjects.Node();
            soNode.Depth = soapServiceNode.DH;
            soNode.DomainUid = soapServiceNode.D;
            soNode.RootMapUid = soapServiceNode.RM;
            soNode.NodeOriginalId = soapServiceNode.O;
            soNode.NodeTypeUid = soapServiceNode.T;
            soNode.NodeUid = soapServiceNode.N;

            foreach (KeyValuePair<Service.MetadataContext, Service.DA> metadataContextPair in soapServiceNode.M)
            {
                Service.MetadataContext soapServiceMetadataContext = metadataContextPair.Key;
                Service.DA soapServiceMetadata = metadataContextPair.Value;

                ServerObjects.Metadata soMetadata = ToMetadata(soapServiceMetadata);

                ServerObjects.MetadataContext soMetadataContext = new ServerObjects.MetadataContext();
                soMetadataContext.DescriptorTypeUid = soapServiceMetadataContext.DescriptorTypeUid;
                soMetadataContext.MetadataId = soapServiceMetadataContext.MetadataId;
                soMetadataContext.MetadataName = soapServiceMetadataContext.MetadataName;
                soMetadataContext.NodeUid = soapServiceMetadataContext.NodeUid;
                soMetadataContext.RelationshipUid = soapServiceMetadataContext.RelationshipUid;

                soNode.Metadata.Add(soMetadataContext, soMetadata);
            }

            return soNode;
        }
Example #5
0
        public override bool Equals(object obj)
        {
            MetadataContext comparingObject = obj as MetadataContext;

            if (comparingObject != null)
            {
                return((MetadataId == comparingObject.MetadataId) && (NodeUid == comparingObject.NodeUid) && (RelationshipUid == comparingObject.RelationshipUid) && (DescriptorTypeUid == comparingObject.DescriptorTypeUid));
            }
            else
            {
                return(false);
            }
        }