Esempio n. 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);
        }
Esempio n. 2
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.Metadata ToMetadata(Service.DA soapServiceMetadata)
        {
            ServerObjects.Metadata soMetadata = new ServerObjects.Metadata();
            soMetadata.DescriptorTypeUid = soapServiceMetadata.D;
            soMetadata.MetadataId        = soapServiceMetadata.M;
            soMetadata.DomainUid         = soapServiceMetadata.DI;
            soMetadata.RootMapUid        = soapServiceMetadata.RM;
            soMetadata.MetadataName      = soapServiceMetadata.MN;
            soMetadata.MetadataTypeUid   = soapServiceMetadata.T;
            soMetadata.MetadataValue     = soapServiceMetadata.MV;
            soMetadata.NodeUid           = soapServiceMetadata.N;
            soMetadata.RelationshipUid   = soapServiceMetadata.R;

            return(soMetadata);
        }