Beispiel #1
0
        private static nodetype CreateDatasetNode([NotNull] DatasetNode datasetNode,
                                                  bool useQualifiedLabel)
        {
            Dataset dataset = datasetNode.Dataset;             // shorthand

            var node = new nodetype
            {
                id = datasetNode.NodeId
            };

            string label = useQualifiedLabel
                                               ? string.Format("{0}: {1}", dataset.Model.Name, dataset.Name)
                                               : dataset.Name;
            string geometryTypeName = dataset.GeometryType == null
                                                          ? string.Empty
                                                          : dataset.GeometryType.Name;

            var data = new List <datatype>
            {
                CreateData(_keyNodeLabel, label),
                CreateData(_keyGeometryType, geometryTypeName),
                CreateData(_keyModelName, dataset.Model.Name)
            };

            node.Items = data.Cast <object>().ToArray();

            return(node);
        }
        public void AddDependency([NotNull] QualitySpecificationElement element,
                                  [NotNull] Dataset fromDataset,
                                  [NotNull] Dataset toDataset,
                                  [NotNull] string fromParameterName,
                                  [NotNull] string toParameterName,
                                  [CanBeNull] string fromFilterExpression = null,
                                  [CanBeNull] string toFilterExpression   = null,
                                  bool directed = true)
        {
            DatasetNode fromNode = _datasetNodes[fromDataset];
            DatasetNode toNode   = _datasetNodes[toDataset];

            var dependency = new DatasetDependency(element,
                                                   fromNode, toNode,
                                                   fromParameterName, toParameterName,
                                                   fromFilterExpression, toFilterExpression,
                                                   directed);

            fromNode.AddOutgoingDependency(dependency);
            toNode.AddIncomingDependency(dependency);

            _datasetDependencies.Add(dependency);
        }
        public DatasetDependency([NotNull] QualitySpecificationElement element,
                                 [NotNull] DatasetNode fromDatasetNode,
                                 [NotNull] DatasetNode toDatasetNode,
                                 [NotNull] string fromParameterName,
                                 [NotNull] string toParameterName,
                                 [CanBeNull] string fromFilterExpression = null,
                                 [CanBeNull] string toFilterExpression   = null,
                                 bool directed = true)
        {
            Assert.ArgumentNotNull(element, nameof(element));
            Assert.ArgumentNotNull(fromDatasetNode, nameof(fromDatasetNode));
            Assert.ArgumentNotNull(toDatasetNode, nameof(toDatasetNode));
            Assert.ArgumentNotNullOrEmpty(fromParameterName, nameof(fromParameterName));
            Assert.ArgumentNotNullOrEmpty(toParameterName, nameof(toParameterName));

            _element              = element;
            _fromDatasetNode      = fromDatasetNode;
            _toDatasetNode        = toDatasetNode;
            _fromParameterName    = fromParameterName;
            _toParameterName      = toParameterName;
            _fromFilterExpression = fromFilterExpression;
            _toFilterExpression   = toFilterExpression;
            _directed             = directed;
        }
Beispiel #4
0
 public void AddDatasetNode([NotNull] DatasetNode datasetNode)
 {
     _datasetNodes.Add(datasetNode);
 }