private static void HandleStreamSelection( ConfigurationCompiler compiler, XmlElement element) { var nodeEnumerator = DOMElementEnumerator.Create(element.ChildNodes); while (nodeEnumerator.MoveNext()) { XmlElement subElement = nodeEnumerator.Current; if (subElement.Name == "stream-selector") { var valueText = DOMExtensions.GetRequiredAttribute(subElement, "value"); if (valueText == null) { throw new ConfigurationException("No value attribute supplied for stream-selector element"); } StreamSelector defaultSelector; if (valueText.ToUpperInvariant().Trim() == "ISTREAM") { defaultSelector = StreamSelector.ISTREAM_ONLY; } else if (valueText.ToUpperInvariant().Trim() == "RSTREAM") { defaultSelector = StreamSelector.RSTREAM_ONLY; } else if (valueText.ToUpperInvariant().Trim() == "IRSTREAM") { defaultSelector = StreamSelector.RSTREAM_ISTREAM_BOTH; } else { throw new ConfigurationException( "Value attribute for stream-selector element invalid, " + "expected one of the following keywords: istream, irstream, rstream"); } compiler.StreamSelection.DefaultStreamSelector = defaultSelector; } } }
private static void HandlePlugInMultiFunctionAggregation( ConfigurationCompiler configuration, XmlElement element) { var functionNames = DOMExtensions.GetRequiredAttribute(element, "function-names"); var forgeClassName = DOMExtensions.GetOptionalAttribute(element, "forge-class"); var nodeEnumerator = DOMElementEnumerator.Create(element.ChildNodes); IDictionary<string, object> additionalProps = null; while (nodeEnumerator.MoveNext()) { XmlElement subElement = nodeEnumerator.Current; if (subElement.Name == "init-arg") { var name = DOMExtensions.GetRequiredAttribute(subElement, "name"); var value = DOMExtensions.GetRequiredAttribute(subElement, "value"); if (additionalProps == null) { additionalProps = new Dictionary<string, object>(); } additionalProps.Put(name, value); } } var config = new ConfigurationCompilerPlugInAggregationMultiFunction( functionNames.SplitCsv(), forgeClassName); config.AdditionalConfiguredProperties = additionalProps; configuration.AddPlugInAggregationMultiFunction(config); }
private static void HandleSerdeSettings( ConfigurationCompiler configuration, XmlElement parentElement) { String text = DOMExtensions.GetOptionalAttribute(parentElement, "enable-serializable"); if (text != null) { configuration.Serde.IsEnableSerializable = bool.Parse(text); } text = DOMExtensions.GetOptionalAttribute(parentElement, "enable-externalizable"); if (text != null) { configuration.Serde.IsEnableExternalizable = bool.Parse(text); } text = DOMExtensions.GetOptionalAttribute(parentElement, "enable-extended-builtin"); if (text != null) { configuration.Serde.IsEnableExtendedBuiltin = bool.Parse(text); } text = DOMExtensions.GetOptionalAttribute(parentElement, "enable-serialization-fallback"); if (text != null) { configuration.Serde.IsEnableSerializationFallback = bool.Parse(text); } var nodeEnumerator = DOMElementEnumerator.Create(parentElement.ChildNodes); while (nodeEnumerator.MoveNext()) { var subElement = nodeEnumerator.Current; if (subElement.Name == "serde-provider-factory") { text = DOMExtensions.GetRequiredAttribute(subElement, "class"); configuration.Serde.AddSerdeProviderFactory(text); } } }
private static void HandlePlugInAggregation( ConfigurationCompiler configuration, XmlElement element) { var name = DOMExtensions.GetRequiredAttribute(element, "name"); var forgeClassName = DOMExtensions.GetRequiredAttribute(element, "forge-class"); configuration.AddPlugInAggregationFunctionForge(name, forgeClassName); }
private static void HandlePlugInEnumMethod( ConfigurationCompiler configuration, XmlElement element) { String methodName = DOMExtensions.GetRequiredAttribute(element, "method-name"); String forgeClassName = DOMExtensions.GetRequiredAttribute(element, "forge-class"); configuration.AddPlugInEnumMethod(methodName, forgeClassName); }
private static void HandlePlugInPatternObserver( ConfigurationCompiler configuration, XmlElement element) { var @namespace = DOMExtensions.GetRequiredAttribute(element, "namespace"); var name = DOMExtensions.GetRequiredAttribute(element, "name"); var forgeClassName = DOMExtensions.GetRequiredAttribute(element, "forge-class"); configuration.AddPlugInPatternObserver(@namespace, name, forgeClassName); }
private static void HandlePlugInVirtualDW( ConfigurationCompiler configuration, XmlElement element) { var @namespace = DOMExtensions.GetRequiredAttribute(element, "namespace"); var name = DOMExtensions.GetRequiredAttribute(element, "name"); var forgeClassName = DOMExtensions.GetRequiredAttribute(element, "forge-class"); var config = DOMExtensions.GetOptionalAttribute(element, "config"); configuration.AddPlugInVirtualDataWindow(@namespace, name, forgeClassName, config); }
private static void HandleLogging( ConfigurationCompiler compiler, XmlElement element) { var nodeEnumerator = DOMElementEnumerator.Create(element.ChildNodes); while (nodeEnumerator.MoveNext()) { XmlElement subElement = nodeEnumerator.Current; if (subElement.Name == "code") { ParseRequiredBoolean(subElement, "enabled", b => compiler.Logging.EnableCode = b); } else if (subElement.Name == "audit-directory") { compiler.Logging.AuditDirectory = DOMExtensions.GetRequiredAttribute(subElement, "value"); } } }
private static void HandleViewResources( ConfigurationCompiler compiler, XmlElement element) { var nodeEnumerator = DOMElementEnumerator.Create(element.ChildNodes); while (nodeEnumerator.MoveNext()) { XmlElement subElement = nodeEnumerator.Current; if (subElement.Name == "iterable-unbound") { var valueText = DOMExtensions.GetRequiredAttribute(subElement, "enabled"); var value = bool.Parse(valueText); compiler.ViewResources.IterableUnbound = value; } if (subElement.Name == "outputlimitopt") { ParseRequiredBoolean(subElement, "enabled", b => compiler.ViewResources.OutputLimitOpt = b); } } }
private static void HandleLogging( ConfigurationCompiler compiler, XmlElement element) { var nodeEnumerator = DOMElementEnumerator.Create(element.ChildNodes); while (nodeEnumerator.MoveNext()) { XmlElement subElement = nodeEnumerator.Current; switch (subElement.Name) { case "code": ParseRequiredBoolean(subElement, "enabled", b => compiler.Logging.EnableCode = b); break; case "audit-directory": compiler.Logging.AuditDirectory = DOMExtensions.GetRequiredAttribute(subElement, "value"); break; case "filter-plan": ParseRequiredBoolean(subElement, "enabled", b => compiler.Logging.IsEnableFilterPlan = b); break; } } }