Exemplo n.º 1
0
        private void adjustDisplayPathForQuantity(PathElements pathElements, IQuantity quantity)
        {
            if (quantity.HasAncestorNamed(CoreConstants.Organ.GALLBLADDER))
            {
                adjustDisplayPathForGallBladder(pathElements, quantity);
            }

            else if (quantity.HasAncestorNamed(CoreConstants.Organ.LUMEN))
            {
                adjustDisplayPathForLumen(pathElements, quantity);
            }

            else if (quantity.IsNamed(CoreConstants.Observer.PLASMA_UNBOUND))
            {
                adjustDisplayPathForContainerObserver(pathElements, quantity);
            }

            else if (quantity.Name.StartsWith(CoreConstants.Observer.TOTAL_FRACTION_OF_DOSE))
            {
                adjustDisplayPathForTotalFractionOfDose(pathElements, quantity);
            }

            //Container observers directly in a container located under organism
            else if (!pathElements.Contains(PathElementId.BottomCompartment))
            {
                adjustDisplayPathForContainerObserver(pathElements, quantity);
            }

            else if (quantity.IsAnImplementationOf <IObserver>())
            {
                adjustDisplayNameForMoleculeObserver(pathElements, quantity.DowncastTo <IObserver>());
            }
        }
Exemplo n.º 2
0
        private void adjustDisplayPathForQuantity(PathElements pathElements, IQuantity quantity)
        {
            if (quantity.HasAncestorNamed(CoreConstants.Organ.Gallbladder))
            {
                adjustDisplayPathForGallBladder(pathElements, quantity);
            }

            else if (quantity.HasAncestorNamed(CoreConstants.Organ.Lumen))
            {
                adjustDisplayPathForLumen(pathElements, quantity);
            }

            else if (quantity.IsNamed(PLASMA_UNBOUND))
            {
                adjustDisplayPathForContainerObserver(pathElements, quantity);
            }

            else if (!pathElements.Contains(PathElement.BottomCompartment))
            {
                adjustDisplayPathForContainerObserver(pathElements, quantity);
            }

            else if (quantity.IsAnImplementationOf <IObserver>())
            {
                adjustDisplayNameForMoleculeObserver(pathElements, quantity.DowncastTo <IObserver>());
            }
        }
Exemplo n.º 3
0
        public ICommand SetQuantityDimension(IQuantity quantity, IDimension dimension, IBuildingBlock buildingBlock)
        {
            if (quantity.IsAnImplementationOf <IDistributedParameter>())
            {
                return(SetDistributedParameterDimension(quantity.DowncastTo <IDistributedParameter>(), dimension, buildingBlock));
            }

            return(new SetQuantityDimensionCommand(quantity, dimension, buildingBlock).Run(_context));
        }