From f7085ebbcc7947e1d690671e477aa4da17a3e347 Mon Sep 17 00:00:00 2001 From: lj1412 Date: Tue, 14 Feb 2017 15:11:15 +0000 Subject: Init ncomp.core Change-Id: I9be77772eae659d9ef18b23ea634b5d656366090 Signed-off-by: lj1412 --- .gitignore | 1 + .gitreview | 4 + LICENSE.txt | 22 + README.md | 8 + deptree.text | 1 + ncomp-core-model/.classpath | 19 + ncomp-core-model/.gitignore | 2 + ncomp-core-model/.project | 34 + .../.settings/org.eclipse.jdt.core.prefs | 8 + .../.settings/org.eclipse.m2e.core.prefs | 4 + ncomp-core-model/LICENSE.txt | 22 + ncomp-core-model/META-INF/MANIFEST.MF | 36 + ncomp-core-model/build.properties | 13 + ncomp-core-model/plugin.properties | 4 + ncomp-core-model/plugin.xml | 57 + ncomp-core-model/pom.xml | 88 + .../openecomp/ncomp/core/EManagementServer.java | 31 + .../java/org/openecomp/ncomp/core/ISubject.java | 26 + .../org/openecomp/ncomp/component/Api.java | 190 +++ .../org/openecomp/ncomp/component/ApiRequest.java | 236 +++ .../ncomp/component/ApiRequestStatus.java | 278 +++ .../org/openecomp/ncomp/component/Component.java | 79 + .../openecomp/ncomp/component/ComponentClass.java | 173 ++ .../ncomp/component/ComponentFactory.java | 108 ++ .../ncomp/component/ComponentPackage.java | 1253 ++++++++++++++ .../ncomp/component/DroolsObjectChange.java | 254 +++ .../org/openecomp/ncomp/component/DroolsRule.java | 73 + .../openecomp/ncomp/component/DroolsRuntime.java | 62 + .../org/openecomp/ncomp/component/Resource.java | 63 + .../openecomp/ncomp/component/impl/ApiImpl.java | 420 +++++ .../ncomp/component/impl/ApiRequestImpl.java | 510 ++++++ .../ncomp/component/impl/ComponentClassImpl.java | 400 +++++ .../ncomp/component/impl/ComponentFactoryImpl.java | 246 +++ .../ncomp/component/impl/ComponentImpl.java | 202 +++ .../ncomp/component/impl/ComponentPackageImpl.java | 601 +++++++ .../ncomp/component/impl/DroolsRuleImpl.java | 187 +++ .../ncomp/component/impl/DroolsRuntimeImpl.java | 167 ++ .../component/util/ComponentAdapterFactory.java | 270 +++ .../ncomp/component/util/ComponentSwitch.java | 275 +++ .../xcore-gen/org/openecomp/ncomp/core/.gitignore | 1 + .../org/openecomp/ncomp/core/CoreFactory.java | 63 + .../org/openecomp/ncomp/core/CorePackage.java | 816 +++++++++ .../org/openecomp/ncomp/core/DeploymentStatus.java | 280 ++++ .../xcore-gen/org/openecomp/ncomp/core/Event.java | 39 + .../openecomp/ncomp/core/HasOperationalState.java | 74 + .../org/openecomp/ncomp/core/LogLevel.java | 358 ++++ .../org/openecomp/ncomp/core/LogSeverity.java | 306 ++++ .../org/openecomp/ncomp/core/NamedEntity.java | 155 ++ .../org/openecomp/ncomp/core/OperationalState.java | 228 +++ .../xcore-gen/org/openecomp/ncomp/core/User.java | 100 ++ .../org/openecomp/ncomp/core/alerts/Alert.java | 160 ++ .../ncomp/core/alerts/AlertContainer.java | 90 + .../ncomp/core/alerts/AlertingTemplate.java | 63 + .../openecomp/ncomp/core/alerts/AlertsFactory.java | 81 + .../openecomp/ncomp/core/alerts/AlertsPackage.java | 951 +++++++++++ .../openecomp/ncomp/core/alerts/DampingRule.java | 39 + .../ncomp/core/alerts/MaxAlertPerInterval.java | 98 ++ .../ncomp/core/alerts/ThresholdAlert.java | 178 ++ .../ncomp/core/alerts/impl/AlertContainerImpl.java | 236 +++ .../ncomp/core/alerts/impl/AlertImpl.java | 468 ++++++ .../core/alerts/impl/AlertingTemplateImpl.java | 173 ++ .../ncomp/core/alerts/impl/AlertsFactoryImpl.java | 138 ++ .../ncomp/core/alerts/impl/AlertsPackageImpl.java | 465 ++++++ .../ncomp/core/alerts/impl/DampingRuleImpl.java | 62 + .../core/alerts/impl/MaxAlertPerIntervalImpl.java | 237 +++ .../ncomp/core/alerts/impl/ThresholdAlertImpl.java | 399 +++++ .../core/alerts/util/AlertsAdapterFactory.java | 270 +++ .../ncomp/core/alerts/util/AlertsSwitch.java | 276 +++ .../org/openecomp/ncomp/core/function/.gitignore | 1 + .../openecomp/ncomp/core/function/Function.java | 39 + .../ncomp/core/function/FunctionAction.java | 71 + .../ncomp/core/function/FunctionFactory.java | 153 ++ .../ncomp/core/function/FunctionMatch.java | 39 + .../core/function/FunctionMatchAttribute.java | 124 ++ .../core/function/FunctionMatchInstanceOf.java | 97 ++ .../ncomp/core/function/FunctionMatchMetric.java | 179 ++ .../ncomp/core/function/FunctionPackage.java | 1739 +++++++++++++++++++ .../ncomp/core/function/FunctionRule.java | 90 + .../ncomp/core/function/FunctionUpdate.java | 39 + .../core/function/FunctionUpdateAttribute.java | 97 ++ .../ncomp/core/function/FunctionUpdateRule.java | 80 + .../openecomp/ncomp/core/function/Iterator.java | 39 + .../ncomp/core/function/IteratorUsingFunction.java | 115 ++ .../ncomp/core/function/RuleFunction.java | 61 + .../ncomp/core/function/RuleUpdateFunction.java | 61 + .../ncomp/core/function/StringValuePair.java | 70 + .../openecomp/ncomp/core/function/ValuePair.java | 71 + .../openecomp/ncomp/core/function/impl/.gitignore | 1 + .../core/function/impl/FunctionActionImpl.java | 184 ++ .../core/function/impl/FunctionFactoryImpl.java | 226 +++ .../ncomp/core/function/impl/FunctionImpl.java | 62 + .../function/impl/FunctionMatchAttributeImpl.java | 291 ++++ .../core/function/impl/FunctionMatchImpl.java | 62 + .../function/impl/FunctionMatchInstanceOfImpl.java | 237 +++ .../function/impl/FunctionMatchMetricImpl.java | 408 +++++ .../core/function/impl/FunctionPackageImpl.java | 789 +++++++++ .../ncomp/core/function/impl/FunctionRuleImpl.java | 242 +++ .../function/impl/FunctionUpdateAttributeImpl.java | 237 +++ .../core/function/impl/FunctionUpdateImpl.java | 62 + .../core/function/impl/FunctionUpdateRuleImpl.java | 210 +++ .../ncomp/core/function/impl/IteratorImpl.java | 62 + .../function/impl/IteratorUsingFunctionImpl.java | 307 ++++ .../ncomp/core/function/impl/RuleFunctionImpl.java | 171 ++ .../core/function/impl/RuleUpdateFunctionImpl.java | 171 ++ .../core/function/impl/StringValuePairImpl.java | 183 ++ .../ncomp/core/function/impl/ValuePairImpl.java | 184 ++ .../openecomp/ncomp/core/function/util/.gitignore | 1 + .../core/function/util/FunctionAdapterFactory.java | 431 +++++ .../ncomp/core/function/util/FunctionSwitch.java | 476 ++++++ .../org/openecomp/ncomp/core/impl/.gitignore | 1 + .../openecomp/ncomp/core/impl/CoreFactoryImpl.java | 509 ++++++ .../openecomp/ncomp/core/impl/CorePackageImpl.java | 561 +++++++ .../org/openecomp/ncomp/core/impl/EventImpl.java | 62 + .../ncomp/core/impl/HasOperationalStateImpl.java | 185 ++ .../openecomp/ncomp/core/impl/NamedEntityImpl.java | 348 ++++ .../org/openecomp/ncomp/core/impl/UserImpl.java | 238 +++ .../ncomp/core/logs/LogConfiguration.java | 63 + .../org/openecomp/ncomp/core/logs/LogFile.java | 90 + .../org/openecomp/ncomp/core/logs/LogLevel.java | 358 ++++ .../org/openecomp/ncomp/core/logs/LogMessage.java | 267 +++ .../ncomp/core/logs/LogMessageCategory.java | 63 + .../ncomp/core/logs/LogMessageContainer.java | 107 ++ .../logs/LogMessageContainerConfiguration.java | 39 + .../openecomp/ncomp/core/logs/LogMessageRule.java | 329 ++++ .../openecomp/ncomp/core/logs/LogMessageState.java | 125 ++ .../openecomp/ncomp/core/logs/LogMessageStats.java | 132 ++ .../org/openecomp/ncomp/core/logs/LogPattern.java | 179 ++ .../org/openecomp/ncomp/core/logs/LogSeverity.java | 306 ++++ .../org/openecomp/ncomp/core/logs/LogsFactory.java | 135 ++ .../org/openecomp/ncomp/core/logs/LogsPackage.java | 1766 ++++++++++++++++++++ .../ncomp/core/logs/impl/LogConfigurationImpl.java | 173 ++ .../ncomp/core/logs/impl/LogFileImpl.java | 243 +++ .../core/logs/impl/LogMessageCategoryImpl.java | 173 ++ .../impl/LogMessageContainerConfigurationImpl.java | 62 + .../core/logs/impl/LogMessageContainerImpl.java | 279 ++++ .../ncomp/core/logs/impl/LogMessageImpl.java | 564 +++++++ .../ncomp/core/logs/impl/LogMessageRuleImpl.java | 682 ++++++++ .../ncomp/core/logs/impl/LogMessageStateImpl.java | 307 ++++ .../ncomp/core/logs/impl/LogMessageStatsImpl.java | 292 ++++ .../ncomp/core/logs/impl/LogPatternImpl.java | 400 +++++ .../ncomp/core/logs/impl/LogsFactoryImpl.java | 279 ++++ .../ncomp/core/logs/impl/LogsPackageImpl.java | 845 ++++++++++ .../ncomp/core/logs/util/LogsAdapterFactory.java | 323 ++++ .../openecomp/ncomp/core/logs/util/LogsSwitch.java | 340 ++++ .../core/metrics/AggregationMetricValueOption.java | 100 ++ .../metrics/AggregationMetricValueOptionType.java | 306 ++++ .../ncomp/core/metrics/BasicDoubleMetric.java | 71 + .../core/metrics/BasicIncreasingULongMetric.java | 71 + .../ncomp/core/metrics/BasicLongMetric.java | 71 + .../openecomp/ncomp/core/metrics/BasicMetric.java | 39 + .../ncomp/core/metrics/BasicMetricValueOption.java | 38 + .../openecomp/ncomp/core/metrics/BasicMetrics.java | 61 + .../openecomp/ncomp/core/metrics/DoubleMetric.java | 70 + .../openecomp/ncomp/core/metrics/LongMetric.java | 126 ++ .../org/openecomp/ncomp/core/metrics/Metric.java | 125 ++ .../ncomp/core/metrics/MetricValueOption.java | 39 + .../ncomp/core/metrics/MetricsContainer.java | 39 + .../ncomp/core/metrics/MetricsFactory.java | 144 ++ .../ncomp/core/metrics/MetricsPackage.java | 1601 ++++++++++++++++++ .../core/metrics/SequenceMetricValueOption.java | 61 + .../openecomp/ncomp/core/metrics/StringMetric.java | 70 + .../impl/AggregationMetricValueOptionImpl.java | 238 +++ .../core/metrics/impl/BasicDoubleMetricImpl.java | 185 ++ .../impl/BasicIncreasingULongMetricImpl.java | 185 ++ .../core/metrics/impl/BasicLongMetricImpl.java | 185 ++ .../ncomp/core/metrics/impl/BasicMetricImpl.java | 62 + .../metrics/impl/BasicMetricValueOptionImpl.java | 60 + .../ncomp/core/metrics/impl/BasicMetricsImpl.java | 171 ++ .../ncomp/core/metrics/impl/DoubleMetricImpl.java | 183 ++ .../ncomp/core/metrics/impl/LongMetricImpl.java | 291 ++++ .../ncomp/core/metrics/impl/MetricImpl.java | 292 ++++ .../core/metrics/impl/MetricValueOptionImpl.java | 62 + .../core/metrics/impl/MetricsContainerImpl.java | 62 + .../core/metrics/impl/MetricsFactoryImpl.java | 266 +++ .../core/metrics/impl/MetricsPackageImpl.java | 677 ++++++++ .../impl/SequenceMetricValueOptionImpl.java | 171 ++ .../ncomp/core/metrics/impl/StringMetricImpl.java | 183 ++ .../core/metrics/util/MetricsAdapterFactory.java | 395 +++++ .../ncomp/core/metrics/util/MetricsSwitch.java | 439 +++++ .../org/openecomp/ncomp/core/util/.gitignore | 1 + .../ncomp/core/util/CoreAdapterFactory.java | 195 +++ .../org/openecomp/ncomp/core/util/CoreSwitch.java | 195 +++ ncomp-core-model/src/main/xcore/alerts.xcore | 66 + ncomp-core-model/src/main/xcore/component.xcore | 78 + ncomp-core-model/src/main/xcore/core.xcore | 98 ++ ncomp-core-model/src/main/xcore/function.xcore | 112 ++ ncomp-core-model/src/main/xcore/logs.xcore | 103 ++ ncomp-core-model/src/main/xcore/metrics.xcore | 92 + ncomp-core-tools/.classpath | 26 + ncomp-core-tools/.gitignore | 1 + ncomp-core-tools/.project | 23 + .../.settings/org.eclipse.core.resources.prefs | 4 + .../.settings/org.eclipse.jdt.core.prefs | 8 + .../.settings/org.eclipse.m2e.core.prefs | 4 + ncomp-core-tools/LICENSE.txt | 22 + ncomp-core-tools/pom.xml | 127 ++ ncomp-core-tools/src/assembly/assemble_zip.xml | 50 + ncomp-core-tools/src/main/server/bin/dcae-tool | 117 ++ ncomp-core-tools/src/main/server/bin/ncomp-tool | 385 +++++ ncomp-core-types/.classpath | 27 + ncomp-core-types/.gitignore | 1 + ncomp-core-types/.project | 34 + .../.settings/org.eclipse.core.resources.prefs | 4 + .../.settings/org.eclipse.jdt.core.prefs | 8 + .../.settings/org.eclipse.m2e.core.prefs | 4 + ncomp-core-types/LICENSE.txt | 22 + ncomp-core-types/META-INF/MANIFEST.MF | 9 + ncomp-core-types/build.properties | 3 + ncomp-core-types/pom.xml | 133 ++ .../core/types/metrics/DateMetricAttribute.java | 71 + .../core/types/metrics/DoubleMetricAttribute.java | 101 ++ .../types/metrics/DoubleMetricMeasurement.java | 38 + .../ncomp/core/types/metrics/IMetricManager.java | 26 + .../ncomp/core/types/metrics/IMetricStore.java | 42 + .../metrics/IncreasingULongMetricAttribute.java | 133 ++ .../core/types/metrics/LongMetricAttribute.java | 99 ++ .../core/types/metrics/LongMetricMeasurement.java | 40 + .../ncomp/core/types/metrics/MetricAttribute.java | 31 + .../core/types/metrics/MetricDailyMeasurement.java | 95 ++ .../core/types/metrics/MetricMeasurement.java | 31 + .../core/types/metrics/StringMetricAttribute.java | 68 + .../types/metrics/StringMetricMeasurement.java | 40 + pom.xml | 81 + 223 files changed, 42205 insertions(+) create mode 100644 .gitignore create mode 100644 .gitreview create mode 100644 LICENSE.txt create mode 100644 README.md create mode 100644 deptree.text create mode 100644 ncomp-core-model/.classpath create mode 100644 ncomp-core-model/.gitignore create mode 100644 ncomp-core-model/.project create mode 100644 ncomp-core-model/.settings/org.eclipse.jdt.core.prefs create mode 100644 ncomp-core-model/.settings/org.eclipse.m2e.core.prefs create mode 100644 ncomp-core-model/LICENSE.txt create mode 100644 ncomp-core-model/META-INF/MANIFEST.MF create mode 100644 ncomp-core-model/build.properties create mode 100644 ncomp-core-model/plugin.properties create mode 100644 ncomp-core-model/plugin.xml create mode 100644 ncomp-core-model/pom.xml create mode 100644 ncomp-core-model/src/main/java/org/openecomp/ncomp/core/EManagementServer.java create mode 100644 ncomp-core-model/src/main/java/org/openecomp/ncomp/core/ISubject.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/Api.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/ApiRequest.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/ApiRequestStatus.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/Component.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/ComponentClass.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/ComponentFactory.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/ComponentPackage.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/DroolsObjectChange.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/DroolsRule.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/DroolsRuntime.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/Resource.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ApiImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ApiRequestImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ComponentClassImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ComponentFactoryImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ComponentImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ComponentPackageImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/DroolsRuleImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/DroolsRuntimeImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/util/ComponentAdapterFactory.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/util/ComponentSwitch.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/.gitignore create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/CoreFactory.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/CorePackage.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/DeploymentStatus.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/Event.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/HasOperationalState.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/LogLevel.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/LogSeverity.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/NamedEntity.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/OperationalState.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/User.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/Alert.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/AlertContainer.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/AlertingTemplate.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/AlertsFactory.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/AlertsPackage.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/DampingRule.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/MaxAlertPerInterval.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/ThresholdAlert.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/AlertContainerImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/AlertImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/AlertingTemplateImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/AlertsFactoryImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/AlertsPackageImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/DampingRuleImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/MaxAlertPerIntervalImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/ThresholdAlertImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/util/AlertsAdapterFactory.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/util/AlertsSwitch.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/.gitignore create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/Function.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionAction.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionFactory.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionMatch.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionMatchAttribute.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionMatchInstanceOf.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionMatchMetric.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionPackage.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionRule.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionUpdate.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionUpdateAttribute.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionUpdateRule.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/Iterator.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/IteratorUsingFunction.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/RuleFunction.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/RuleUpdateFunction.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/StringValuePair.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/ValuePair.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/.gitignore create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionActionImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionFactoryImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionMatchAttributeImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionMatchImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionMatchInstanceOfImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionMatchMetricImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionPackageImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionRuleImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionUpdateAttributeImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionUpdateImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionUpdateRuleImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/IteratorImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/IteratorUsingFunctionImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/RuleFunctionImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/RuleUpdateFunctionImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/StringValuePairImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/ValuePairImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/util/.gitignore create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/util/FunctionAdapterFactory.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/util/FunctionSwitch.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/.gitignore create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/CoreFactoryImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/CorePackageImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/EventImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/HasOperationalStateImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/NamedEntityImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/UserImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogConfiguration.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogFile.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogLevel.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessage.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageCategory.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageContainer.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageContainerConfiguration.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageRule.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageState.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageStats.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogPattern.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogSeverity.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogsFactory.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogsPackage.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogConfigurationImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogFileImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageCategoryImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageContainerConfigurationImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageContainerImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageRuleImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageStateImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageStatsImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogPatternImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogsFactoryImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogsPackageImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/util/LogsAdapterFactory.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/util/LogsSwitch.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/AggregationMetricValueOption.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/AggregationMetricValueOptionType.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicDoubleMetric.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicIncreasingULongMetric.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicLongMetric.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicMetric.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicMetricValueOption.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicMetrics.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/DoubleMetric.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/LongMetric.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/Metric.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/MetricValueOption.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/MetricsContainer.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/MetricsFactory.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/MetricsPackage.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/SequenceMetricValueOption.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/StringMetric.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/AggregationMetricValueOptionImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicDoubleMetricImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicIncreasingULongMetricImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicLongMetricImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicMetricImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicMetricValueOptionImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicMetricsImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/DoubleMetricImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/LongMetricImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/MetricImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/MetricValueOptionImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/MetricsContainerImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/MetricsFactoryImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/MetricsPackageImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/SequenceMetricValueOptionImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/StringMetricImpl.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/util/MetricsAdapterFactory.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/util/MetricsSwitch.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/util/.gitignore create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/util/CoreAdapterFactory.java create mode 100644 ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/util/CoreSwitch.java create mode 100644 ncomp-core-model/src/main/xcore/alerts.xcore create mode 100644 ncomp-core-model/src/main/xcore/component.xcore create mode 100644 ncomp-core-model/src/main/xcore/core.xcore create mode 100644 ncomp-core-model/src/main/xcore/function.xcore create mode 100644 ncomp-core-model/src/main/xcore/logs.xcore create mode 100644 ncomp-core-model/src/main/xcore/metrics.xcore create mode 100644 ncomp-core-tools/.classpath create mode 100644 ncomp-core-tools/.gitignore create mode 100644 ncomp-core-tools/.project create mode 100644 ncomp-core-tools/.settings/org.eclipse.core.resources.prefs create mode 100644 ncomp-core-tools/.settings/org.eclipse.jdt.core.prefs create mode 100644 ncomp-core-tools/.settings/org.eclipse.m2e.core.prefs create mode 100644 ncomp-core-tools/LICENSE.txt create mode 100644 ncomp-core-tools/pom.xml create mode 100644 ncomp-core-tools/src/assembly/assemble_zip.xml create mode 100644 ncomp-core-tools/src/main/server/bin/dcae-tool create mode 100644 ncomp-core-tools/src/main/server/bin/ncomp-tool create mode 100644 ncomp-core-types/.classpath create mode 100644 ncomp-core-types/.gitignore create mode 100644 ncomp-core-types/.project create mode 100644 ncomp-core-types/.settings/org.eclipse.core.resources.prefs create mode 100644 ncomp-core-types/.settings/org.eclipse.jdt.core.prefs create mode 100644 ncomp-core-types/.settings/org.eclipse.m2e.core.prefs create mode 100644 ncomp-core-types/LICENSE.txt create mode 100644 ncomp-core-types/META-INF/MANIFEST.MF create mode 100644 ncomp-core-types/build.properties create mode 100644 ncomp-core-types/pom.xml create mode 100644 ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/DateMetricAttribute.java create mode 100644 ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/DoubleMetricAttribute.java create mode 100644 ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/DoubleMetricMeasurement.java create mode 100644 ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/IMetricManager.java create mode 100644 ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/IMetricStore.java create mode 100644 ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/IncreasingULongMetricAttribute.java create mode 100644 ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/LongMetricAttribute.java create mode 100644 ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/LongMetricMeasurement.java create mode 100644 ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/MetricAttribute.java create mode 100644 ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/MetricDailyMeasurement.java create mode 100644 ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/MetricMeasurement.java create mode 100644 ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/StringMetricAttribute.java create mode 100644 ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/StringMetricMeasurement.java create mode 100644 pom.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..f4aec9e --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=gerrit.openecomp.org +port=29418 +project=ncomp/core.git diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/README.md b/README.md new file mode 100644 index 0000000..17bd9ab --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ + +Core models for Sirius Management Framework + +# Build instructions + +1. Clone the repository +2. Build using Maven: mvn clean install + diff --git a/deptree.text b/deptree.text new file mode 100644 index 0000000..59f66d9 --- /dev/null +++ b/deptree.text @@ -0,0 +1 @@ +org.openecomp.ncomp.core:ncomp-core:pom:0.1.0-SNAPSHOT diff --git a/ncomp-core-model/.classpath b/ncomp-core-model/.classpath new file mode 100644 index 0000000..9269794 --- /dev/null +++ b/ncomp-core-model/.classpath @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/ncomp-core-model/.gitignore b/ncomp-core-model/.gitignore new file mode 100644 index 0000000..09e3bc9 --- /dev/null +++ b/ncomp-core-model/.gitignore @@ -0,0 +1,2 @@ +/bin/ +/target/ diff --git a/ncomp-core-model/.project b/ncomp-core-model/.project new file mode 100644 index 0000000..46b6fc7 --- /dev/null +++ b/ncomp-core-model/.project @@ -0,0 +1,34 @@ + + + ncomp-core-model + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/ncomp-core-model/.settings/org.eclipse.jdt.core.prefs b/ncomp-core-model/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..443e085 --- /dev/null +++ b/ncomp-core-model/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/ncomp-core-model/.settings/org.eclipse.m2e.core.prefs b/ncomp-core-model/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-core-model/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-core-model/LICENSE.txt b/ncomp-core-model/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/ncomp-core-model/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/ncomp-core-model/META-INF/MANIFEST.MF b/ncomp-core-model/META-INF/MANIFEST.MF new file mode 100644 index 0000000..4e01660 --- /dev/null +++ b/ncomp-core-model/META-INF/MANIFEST.MF @@ -0,0 +1,36 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: ncomp-core-model;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Export-Package: org.openecomp.ncomp.core, + org.openecomp.ncomp.core.impl, + org.openecomp.ncomp.core.util, + org.openecomp.ncomp.core.function, + org.openecomp.ncomp.core.function.impl, + org.openecomp.ncomp.core.function.util, + org.openecomp.ncomp.core.metrics, + org.openecomp.ncomp.core.metrics.impl, + org.openecomp.ncomp.core.metrics.util, + org.openecomp.ncomp.core.logs, + org.openecomp.ncomp.core.logs.impl, + org.openecomp.ncomp.core.logs.util, + org.openecomp.ncomp.core.alerts, + org.openecomp.ncomp.core.alerts.impl, + org.openecomp.ncomp.core.alerts.util, + org.openecomp.ncomp.component, + org.openecomp.ncomp.component.impl, + org.openecomp.ncomp.component.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport, + org.eclipse.xtext.xbase.lib, + org.eclipse.emf.ecore.xcore.lib, + ncomp-core-model;visibility:=reexport, + org.apache.log4j, + ncomp-core-types;bundle-version="0.1.0", + ncomp-utils-java;bundle-version="0.1.0" +Bundle-ActivationPolicy: lazy diff --git a/ncomp-core-model/build.properties b/ncomp-core-model/build.properties new file mode 100644 index 0000000..3f6052f --- /dev/null +++ b/ncomp-core-model/build.properties @@ -0,0 +1,13 @@ +# + +bin.includes = .,\ + src/main/xcore/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src/main/xcore-gen/,\ + src/main/java/,\ + src/main/xcore/ +output.. = target/classes/,\ + bin/ diff --git a/ncomp-core-model/plugin.properties b/ncomp-core-model/plugin.properties new file mode 100644 index 0000000..aa22ce5 --- /dev/null +++ b/ncomp-core-model/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Core Model +providerName = www.example.org diff --git a/ncomp-core-model/plugin.xml b/ncomp-core-model/plugin.xml new file mode 100644 index 0000000..b053c1b --- /dev/null +++ b/ncomp-core-model/plugin.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ncomp-core-model/pom.xml b/ncomp-core-model/pom.xml new file mode 100644 index 0000000..fe50f1e --- /dev/null +++ b/ncomp-core-model/pom.xml @@ -0,0 +1,88 @@ + + 4.0.0 + org.openecomp.ncomp.core + ncomp-core-model + + org.openecomp.ncomp.maven + ncomp-maven-xcore + 0.1.0-SNAPSHOT + ../../dcae-org.openecomp.ncomp.maven/ncomp-maven-xcore + + + + UTF-8 + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + src/main/xcore-gen + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-compiler-plugin + 3.1 + + + + + + + + + + + + org.openecomp.ncomp.core + ncomp-core-types + ${project.version} + + + diff --git a/ncomp-core-model/src/main/java/org/openecomp/ncomp/core/EManagementServer.java b/ncomp-core-model/src/main/java/org/openecomp/ncomp/core/EManagementServer.java new file mode 100644 index 0000000..93dbab8 --- /dev/null +++ b/ncomp-core-model/src/main/java/org/openecomp/ncomp/core/EManagementServer.java @@ -0,0 +1,31 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.core; + +import org.eclipse.emf.ecore.EObject; + + +public abstract class EManagementServer { + + abstract public ISubject find(EObject o1, String path); + +} diff --git a/ncomp-core-model/src/main/java/org/openecomp/ncomp/core/ISubject.java b/ncomp-core-model/src/main/java/org/openecomp/ncomp/core/ISubject.java new file mode 100644 index 0000000..2860d03 --- /dev/null +++ b/ncomp-core-model/src/main/java/org/openecomp/ncomp/core/ISubject.java @@ -0,0 +1,26 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.core; + +public class ISubject { + +} diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/Api.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/Api.java new file mode 100644 index 0000000..68d378e --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/Api.java @@ -0,0 +1,190 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.component; + +import org.openecomp.ncomp.core.NamedEntity; +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.LongMetricAttribute; +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Api'. + * + * + *

+ * The following features are supported: + *

+ *

+ * + * @see org.openecomp.ncomp.component.ComponentPackage#getApi() + * @model + * @generated + */ +public interface Api extends NamedEntity { + + /** + * Returns the value of the 'Number Of Requests' attribute. + * + *

+ * If the meaning of the 'Number Of Requests' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Of Requests' attribute. + * @see #setNumberOfRequests(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.component.ComponentPackage#getApi_NumberOfRequests() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * @generated + */ + IncreasingULongMetricAttribute getNumberOfRequests(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.component.Api#getNumberOfRequests Number Of Requests}' attribute. + * + * + * @param value the new value of the 'Number Of Requests' attribute. + * @see #getNumberOfRequests() + * @generated + */ + void setNumberOfRequests(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Number Of Error Requests' attribute. + * + *

+ * If the meaning of the 'Number Of Error Requests' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Of Error Requests' attribute. + * @see #setNumberOfErrorRequests(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.component.ComponentPackage#getApi_NumberOfErrorRequests() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * @generated + */ + IncreasingULongMetricAttribute getNumberOfErrorRequests(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.component.Api#getNumberOfErrorRequests Number Of Error Requests}' attribute. + * + * + * @param value the new value of the 'Number Of Error Requests' attribute. + * @see #getNumberOfErrorRequests() + * @generated + */ + void setNumberOfErrorRequests(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Number Of Completed Requests' attribute. + * + *

+ * If the meaning of the 'Number Of Completed Requests' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Of Completed Requests' attribute. + * @see #setNumberOfCompletedRequests(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.component.ComponentPackage#getApi_NumberOfCompletedRequests() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * @generated + */ + IncreasingULongMetricAttribute getNumberOfCompletedRequests(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.component.Api#getNumberOfCompletedRequests Number Of Completed Requests}' attribute. + * + * + * @param value the new value of the 'Number Of Completed Requests' attribute. + * @see #getNumberOfCompletedRequests() + * @generated + */ + void setNumberOfCompletedRequests(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Outstanding Requests' attribute. + * + *

+ * If the meaning of the 'Outstanding Requests' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Outstanding Requests' attribute. + * @see #setOutstandingRequests(LongMetricAttribute) + * @see org.openecomp.ncomp.component.ComponentPackage#getApi_OutstandingRequests() + * @model unique="false" dataType="org.openecomp.ncomp.core.LongMetricAttribute" + * @generated + */ + LongMetricAttribute getOutstandingRequests(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.component.Api#getOutstandingRequests Outstanding Requests}' attribute. + * + * + * @param value the new value of the 'Outstanding Requests' attribute. + * @see #getOutstandingRequests() + * @generated + */ + void setOutstandingRequests(LongMetricAttribute value); + + /** + * Returns the value of the 'Last Request Duration' attribute. + * + *

+ * If the meaning of the 'Last Request Duration' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Last Request Duration' attribute. + * @see #setLastRequestDuration(LongMetricAttribute) + * @see org.openecomp.ncomp.component.ComponentPackage#getApi_LastRequestDuration() + * @model unique="false" dataType="org.openecomp.ncomp.core.LongMetricAttribute" + * @generated + */ + LongMetricAttribute getLastRequestDuration(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.component.Api#getLastRequestDuration Last Request Duration}' attribute. + * + * + * @param value the new value of the 'Last Request Duration' attribute. + * @see #getLastRequestDuration() + * @generated + */ + void setLastRequestDuration(LongMetricAttribute value); + + /** + * + * + * @model unique="false" + * @generated + */ + EList currentRequests(); +} // Api diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/ApiRequest.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/ApiRequest.java new file mode 100644 index 0000000..31bdf09 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/ApiRequest.java @@ -0,0 +1,236 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.component; + +import org.openecomp.ncomp.core.Event; + +/** + * + * A representation of the model object 'Api Request'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.component.ApiRequest#getComponentName Component Name}
  • + *
  • {@link org.openecomp.ncomp.component.ApiRequest#getResourcePath Resource Path}
  • + *
  • {@link org.openecomp.ncomp.component.ApiRequest#getTransactionId Transaction Id}
  • + *
  • {@link org.openecomp.ncomp.component.ApiRequest#getParentTransactionId Parent Transaction Id}
  • + *
  • {@link org.openecomp.ncomp.component.ApiRequest#getAction Action}
  • + *
  • {@link org.openecomp.ncomp.component.ApiRequest#getDuration Duration}
  • + *
  • {@link org.openecomp.ncomp.component.ApiRequest#getStatus Status}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.component.ComponentPackage#getApiRequest() + * @model + * @generated + */ +public interface ApiRequest extends Event { + /** + * Returns the value of the 'Component Name' attribute. + * + *

+ * If the meaning of the 'Component Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Component Name' attribute. + * @see #setComponentName(String) + * @see org.openecomp.ncomp.component.ComponentPackage#getApiRequest_ComponentName() + * @model unique="false" + * @generated + */ + String getComponentName(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.component.ApiRequest#getComponentName Component Name}' attribute. + * + * + * @param value the new value of the 'Component Name' attribute. + * @see #getComponentName() + * @generated + */ + void setComponentName(String value); + + /** + * Returns the value of the 'Resource Path' attribute. + * + *

+ * If the meaning of the 'Resource Path' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Resource Path' attribute. + * @see #setResourcePath(String) + * @see org.openecomp.ncomp.component.ComponentPackage#getApiRequest_ResourcePath() + * @model unique="false" + * @generated + */ + String getResourcePath(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.component.ApiRequest#getResourcePath Resource Path}' attribute. + * + * + * @param value the new value of the 'Resource Path' attribute. + * @see #getResourcePath() + * @generated + */ + void setResourcePath(String value); + + /** + * Returns the value of the 'Transaction Id' attribute. + * + *

+ * If the meaning of the 'Transaction Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Transaction Id' attribute. + * @see #setTransactionId(String) + * @see org.openecomp.ncomp.component.ComponentPackage#getApiRequest_TransactionId() + * @model unique="false" + * @generated + */ + String getTransactionId(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.component.ApiRequest#getTransactionId Transaction Id}' attribute. + * + * + * @param value the new value of the 'Transaction Id' attribute. + * @see #getTransactionId() + * @generated + */ + void setTransactionId(String value); + + /** + * Returns the value of the 'Parent Transaction Id' attribute. + * + *

+ * If the meaning of the 'Parent Transaction Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Parent Transaction Id' attribute. + * @see #setParentTransactionId(String) + * @see org.openecomp.ncomp.component.ComponentPackage#getApiRequest_ParentTransactionId() + * @model unique="false" + * @generated + */ + String getParentTransactionId(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.component.ApiRequest#getParentTransactionId Parent Transaction Id}' attribute. + * + * + * @param value the new value of the 'Parent Transaction Id' attribute. + * @see #getParentTransactionId() + * @generated + */ + void setParentTransactionId(String value); + + /** + * Returns the value of the 'Action' attribute. + * + *

+ * If the meaning of the 'Action' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Action' attribute. + * @see #setAction(String) + * @see org.openecomp.ncomp.component.ComponentPackage#getApiRequest_Action() + * @model unique="false" + * @generated + */ + String getAction(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.component.ApiRequest#getAction Action}' attribute. + * + * + * @param value the new value of the 'Action' attribute. + * @see #getAction() + * @generated + */ + void setAction(String value); + + /** + * Returns the value of the 'Duration' attribute. + * + *

+ * If the meaning of the 'Duration' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Duration' attribute. + * @see #setDuration(Long) + * @see org.openecomp.ncomp.component.ComponentPackage#getApiRequest_Duration() + * @model unique="false" + * @generated + */ + Long getDuration(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.component.ApiRequest#getDuration Duration}' attribute. + * + * + * @param value the new value of the 'Duration' attribute. + * @see #getDuration() + * @generated + */ + void setDuration(Long value); + + /** + * Returns the value of the 'Status' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.component.ApiRequestStatus}. + * + *

+ * If the meaning of the 'Status' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Status' attribute. + * @see org.openecomp.ncomp.component.ApiRequestStatus + * @see #setStatus(ApiRequestStatus) + * @see org.openecomp.ncomp.component.ComponentPackage#getApiRequest_Status() + * @model unique="false" + * @generated + */ + ApiRequestStatus getStatus(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.component.ApiRequest#getStatus Status}' attribute. + * + * + * @param value the new value of the 'Status' attribute. + * @see org.openecomp.ncomp.component.ApiRequestStatus + * @see #getStatus() + * @generated + */ + void setStatus(ApiRequestStatus value); + +} // ApiRequest diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/ApiRequestStatus.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/ApiRequestStatus.java new file mode 100644 index 0000000..59df9b1 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/ApiRequestStatus.java @@ -0,0 +1,278 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.component; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Api Request Status', + * and utility methods for working with them. + * + * @see org.openecomp.ncomp.component.ComponentPackage#getApiRequestStatus() + * @model + * @generated + */ +public enum ApiRequestStatus implements Enumerator { + /** + * The 'OKAY' literal object. + * + * + * @see #OKAY_VALUE + * @generated + * @ordered + */ + OKAY(0, "OKAY", "OKAY"), + + /** + * The 'ERROR' literal object. + * + * + * @see #ERROR_VALUE + * @generated + * @ordered + */ + ERROR(0, "ERROR", "ERROR"), + + /** + * The 'INPROGRESS' literal object. + * + * + * @see #INPROGRESS_VALUE + * @generated + * @ordered + */ + INPROGRESS(0, "INPROGRESS", "INPROGRESS"), /** + * The 'START' literal object. + * + * + * @see #START_VALUE + * @generated + * @ordered + */ + START(0, "START", "START"); + + /** + * The 'OKAY' literal value. + * + *

+ * If the meaning of 'OKAY' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #OKAY + * @model + * @generated + * @ordered + */ + public static final int OKAY_VALUE = 0; + + /** + * The 'ERROR' literal value. + * + *

+ * If the meaning of 'ERROR' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #ERROR + * @model + * @generated + * @ordered + */ + public static final int ERROR_VALUE = 0; + + /** + * The 'INPROGRESS' literal value. + * + *

+ * If the meaning of 'INPROGRESS' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #INPROGRESS + * @model + * @generated + * @ordered + */ + public static final int INPROGRESS_VALUE = 0; + + /** + * The 'START' literal value. + * + *

+ * If the meaning of 'START' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #START + * @model + * @generated + * @ordered + */ + public static final int START_VALUE = 0; + + /** + * An array of all the 'Api Request Status' enumerators. + * + * + * @generated + */ + private static final ApiRequestStatus[] VALUES_ARRAY = + new ApiRequestStatus[] { + OKAY, + ERROR, + INPROGRESS, + START, + }; + + /** + * A public read-only list of all the 'Api Request Status' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Api Request Status' literal with the specified literal value. + * + * + * @generated + */ + public static ApiRequestStatus get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + ApiRequestStatus result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Api Request Status' literal with the specified name. + * + * + * @generated + */ + public static ApiRequestStatus getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + ApiRequestStatus result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Api Request Status' literal with the specified integer value. + * + * + * @generated + */ + public static ApiRequestStatus get(int value) { + switch (value) { + case OKAY_VALUE: return OKAY; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private ApiRequestStatus(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //ApiRequestStatus diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/Component.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/Component.java new file mode 100644 index 0000000..f627231 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/Component.java @@ -0,0 +1,79 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.component; + +import org.openecomp.ncomp.core.NamedEntity; +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Component'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.component.Component#getClasses Classes}
  • + *
  • {@link org.openecomp.ncomp.component.Component#getDroolsRuntimes Drools Runtimes}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.component.ComponentPackage#getComponent() + * @model + * @generated + */ +public interface Component extends NamedEntity { + /** + * Returns the value of the 'Classes' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.component.ComponentClass}. + * + *

+ * If the meaning of the 'Classes' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Classes' containment reference list. + * @see org.openecomp.ncomp.component.ComponentPackage#getComponent_Classes() + * @model containment="true" + * @generated + */ + EList getClasses(); + + /** + * Returns the value of the 'Drools Runtimes' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.component.DroolsRuntime}. + * + *

+ * If the meaning of the 'Drools Runtimes' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Drools Runtimes' containment reference list. + * @see org.openecomp.ncomp.component.ComponentPackage#getComponent_DroolsRuntimes() + * @model containment="true" + * @generated + */ + EList getDroolsRuntimes(); + +} // Component diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/ComponentClass.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/ComponentClass.java new file mode 100644 index 0000000..08fb5c0 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/ComponentClass.java @@ -0,0 +1,173 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.component; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.LongMetricAttribute; +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Class'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.component.ComponentClass#getApis Apis}
  • + *
  • {@link org.openecomp.ncomp.component.ComponentClass#getNumberOfResources Number Of Resources}
  • + *
  • {@link org.openecomp.ncomp.component.ComponentClass#getNumberOfUpdateRequests Number Of Update Requests}
  • + *
  • {@link org.openecomp.ncomp.component.ComponentClass#getNumberOfCreateRequests Number Of Create Requests}
  • + *
  • {@link org.openecomp.ncomp.component.ComponentClass#getNumberOfDeleteRequests Number Of Delete Requests}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.component.ComponentPackage#getComponentClass() + * @model + * @generated + */ +public interface ComponentClass extends NamedEntity { + /** + * Returns the value of the 'Apis' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.component.Api}. + * + *

+ * If the meaning of the 'Apis' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Apis' containment reference list. + * @see org.openecomp.ncomp.component.ComponentPackage#getComponentClass_Apis() + * @model containment="true" + * @generated + */ + EList getApis(); + + /** + * Returns the value of the 'Number Of Resources' attribute. + * + *

+ * If the meaning of the 'Number Of Resources' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Of Resources' attribute. + * @see #setNumberOfResources(LongMetricAttribute) + * @see org.openecomp.ncomp.component.ComponentPackage#getComponentClass_NumberOfResources() + * @model unique="false" dataType="org.openecomp.ncomp.core.LongMetricAttribute" + * @generated + */ + LongMetricAttribute getNumberOfResources(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.component.ComponentClass#getNumberOfResources Number Of Resources}' attribute. + * + * + * @param value the new value of the 'Number Of Resources' attribute. + * @see #getNumberOfResources() + * @generated + */ + void setNumberOfResources(LongMetricAttribute value); + + /** + * Returns the value of the 'Number Of Update Requests' attribute. + * + *

+ * If the meaning of the 'Number Of Update Requests' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Of Update Requests' attribute. + * @see #setNumberOfUpdateRequests(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.component.ComponentPackage#getComponentClass_NumberOfUpdateRequests() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * @generated + */ + IncreasingULongMetricAttribute getNumberOfUpdateRequests(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.component.ComponentClass#getNumberOfUpdateRequests Number Of Update Requests}' attribute. + * + * + * @param value the new value of the 'Number Of Update Requests' attribute. + * @see #getNumberOfUpdateRequests() + * @generated + */ + void setNumberOfUpdateRequests(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Number Of Create Requests' attribute. + * + *

+ * If the meaning of the 'Number Of Create Requests' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Of Create Requests' attribute. + * @see #setNumberOfCreateRequests(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.component.ComponentPackage#getComponentClass_NumberOfCreateRequests() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * @generated + */ + IncreasingULongMetricAttribute getNumberOfCreateRequests(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.component.ComponentClass#getNumberOfCreateRequests Number Of Create Requests}' attribute. + * + * + * @param value the new value of the 'Number Of Create Requests' attribute. + * @see #getNumberOfCreateRequests() + * @generated + */ + void setNumberOfCreateRequests(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Number Of Delete Requests' attribute. + * + *

+ * If the meaning of the 'Number Of Delete Requests' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Of Delete Requests' attribute. + * @see #setNumberOfDeleteRequests(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.component.ComponentPackage#getComponentClass_NumberOfDeleteRequests() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * @generated + */ + IncreasingULongMetricAttribute getNumberOfDeleteRequests(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.component.ComponentClass#getNumberOfDeleteRequests Number Of Delete Requests}' attribute. + * + * + * @param value the new value of the 'Number Of Delete Requests' attribute. + * @see #getNumberOfDeleteRequests() + * @generated + */ + void setNumberOfDeleteRequests(IncreasingULongMetricAttribute value); + +} // ComponentClass diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/ComponentFactory.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/ComponentFactory.java new file mode 100644 index 0000000..6781364 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/ComponentFactory.java @@ -0,0 +1,108 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.component; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.ncomp.component.ComponentPackage + * @generated + */ +public interface ComponentFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ComponentFactory eINSTANCE = org.openecomp.ncomp.component.impl.ComponentFactoryImpl.init(); + + /** + * Returns a new object of class 'Component'. + * + * + * @return a new object of class 'Component'. + * @generated + */ + Component createComponent(); + + /** + * Returns a new object of class 'Class'. + * + * + * @return a new object of class 'Class'. + * @generated + */ + ComponentClass createComponentClass(); + + /** + * Returns a new object of class 'Api'. + * + * + * @return a new object of class 'Api'. + * @generated + */ + Api createApi(); + + /** + * Returns a new object of class 'Api Request'. + * + * + * @return a new object of class 'Api Request'. + * @generated + */ + ApiRequest createApiRequest(); + + /** + * Returns a new object of class 'Drools Runtime'. + * + * + * @return a new object of class 'Drools Runtime'. + * @generated + */ + DroolsRuntime createDroolsRuntime(); + + /** + * Returns a new object of class 'Drools Rule'. + * + * + * @return a new object of class 'Drools Rule'. + * @generated + */ + DroolsRule createDroolsRule(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ComponentPackage getComponentPackage(); + +} //ComponentFactory diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/ComponentPackage.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/ComponentPackage.java new file mode 100644 index 0000000..5202b63 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/ComponentPackage.java @@ -0,0 +1,1253 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.component; + +import org.openecomp.ncomp.core.CorePackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.ncomp.component.ComponentFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/ncomp-core-model/src/main/xcore-gen' basePackage='org.openecomp.ncomp'" + * @generated + */ +public interface ComponentPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "component"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.component"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "component"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ComponentPackage eINSTANCE = org.openecomp.ncomp.component.impl.ComponentPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.ncomp.component.impl.ComponentImpl Component}' class. + * + * + * @see org.openecomp.ncomp.component.impl.ComponentImpl + * @see org.openecomp.ncomp.component.impl.ComponentPackageImpl#getComponent() + * @generated + */ + int COMPONENT = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int COMPONENT__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int COMPONENT__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int COMPONENT__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int COMPONENT__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Classes' containment reference list. + * + * + * @generated + * @ordered + */ + int COMPONENT__CLASSES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Drools Runtimes' containment reference list. + * + * + * @generated + * @ordered + */ + int COMPONENT__DROOLS_RUNTIMES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Component' class. + * + * + * @generated + * @ordered + */ + int COMPONENT_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Component' class. + * + * + * @generated + * @ordered + */ + int COMPONENT_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.component.impl.ComponentClassImpl Class}' class. + * + * + * @see org.openecomp.ncomp.component.impl.ComponentClassImpl + * @see org.openecomp.ncomp.component.impl.ComponentPackageImpl#getComponentClass() + * @generated + */ + int COMPONENT_CLASS = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int COMPONENT_CLASS__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int COMPONENT_CLASS__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int COMPONENT_CLASS__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int COMPONENT_CLASS__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Apis' containment reference list. + * + * + * @generated + * @ordered + */ + int COMPONENT_CLASS__APIS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Number Of Resources' attribute. + * + * + * @generated + * @ordered + */ + int COMPONENT_CLASS__NUMBER_OF_RESOURCES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Number Of Update Requests' attribute. + * + * + * @generated + * @ordered + */ + int COMPONENT_CLASS__NUMBER_OF_UPDATE_REQUESTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Number Of Create Requests' attribute. + * + * + * @generated + * @ordered + */ + int COMPONENT_CLASS__NUMBER_OF_CREATE_REQUESTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Number Of Delete Requests' attribute. + * + * + * @generated + * @ordered + */ + int COMPONENT_CLASS__NUMBER_OF_DELETE_REQUESTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The number of structural features of the 'Class' class. + * + * + * @generated + * @ordered + */ + int COMPONENT_CLASS_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The number of operations of the 'Class' class. + * + * + * @generated + * @ordered + */ + int COMPONENT_CLASS_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.component.impl.ApiImpl Api}' class. + * + * + * @see org.openecomp.ncomp.component.impl.ApiImpl + * @see org.openecomp.ncomp.component.impl.ComponentPackageImpl#getApi() + * @generated + */ + int API = 2; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int API__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int API__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int API__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int API__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Number Of Requests' attribute. + * + * + * @generated + * @ordered + */ + int API__NUMBER_OF_REQUESTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Number Of Error Requests' attribute. + * + * + * @generated + * @ordered + */ + int API__NUMBER_OF_ERROR_REQUESTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Number Of Completed Requests' attribute. + * + * + * @generated + * @ordered + */ + int API__NUMBER_OF_COMPLETED_REQUESTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Outstanding Requests' attribute. + * + * + * @generated + * @ordered + */ + int API__OUTSTANDING_REQUESTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Last Request Duration' attribute. + * + * + * @generated + * @ordered + */ + int API__LAST_REQUEST_DURATION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The number of structural features of the 'Api' class. + * + * + * @generated + * @ordered + */ + int API_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The operation id for the 'Current Requests' operation. + * + * + * @generated + * @ordered + */ + int API___CURRENT_REQUESTS = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The number of operations of the 'Api' class. + * + * + * @generated + * @ordered + */ + int API_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 1; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.component.impl.ApiRequestImpl Api Request}' class. + * + * + * @see org.openecomp.ncomp.component.impl.ApiRequestImpl + * @see org.openecomp.ncomp.component.impl.ComponentPackageImpl#getApiRequest() + * @generated + */ + int API_REQUEST = 3; + + /** + * The feature id for the 'Component Name' attribute. + * + * + * @generated + * @ordered + */ + int API_REQUEST__COMPONENT_NAME = CorePackage.EVENT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Resource Path' attribute. + * + * + * @generated + * @ordered + */ + int API_REQUEST__RESOURCE_PATH = CorePackage.EVENT_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Transaction Id' attribute. + * + * + * @generated + * @ordered + */ + int API_REQUEST__TRANSACTION_ID = CorePackage.EVENT_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Parent Transaction Id' attribute. + * + * + * @generated + * @ordered + */ + int API_REQUEST__PARENT_TRANSACTION_ID = CorePackage.EVENT_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Action' attribute. + * + * + * @generated + * @ordered + */ + int API_REQUEST__ACTION = CorePackage.EVENT_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Duration' attribute. + * + * + * @generated + * @ordered + */ + int API_REQUEST__DURATION = CorePackage.EVENT_FEATURE_COUNT + 5; + + /** + * The feature id for the 'Status' attribute. + * + * + * @generated + * @ordered + */ + int API_REQUEST__STATUS = CorePackage.EVENT_FEATURE_COUNT + 6; + + /** + * The number of structural features of the 'Api Request' class. + * + * + * @generated + * @ordered + */ + int API_REQUEST_FEATURE_COUNT = CorePackage.EVENT_FEATURE_COUNT + 7; + + /** + * The number of operations of the 'Api Request' class. + * + * + * @generated + * @ordered + */ + int API_REQUEST_OPERATION_COUNT = CorePackage.EVENT_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.component.impl.DroolsRuntimeImpl Drools Runtime}' class. + * + * + * @see org.openecomp.ncomp.component.impl.DroolsRuntimeImpl + * @see org.openecomp.ncomp.component.impl.ComponentPackageImpl#getDroolsRuntime() + * @generated + */ + int DROOLS_RUNTIME = 4; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DROOLS_RUNTIME__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DROOLS_RUNTIME__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DROOLS_RUNTIME__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DROOLS_RUNTIME__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Rules' containment reference list. + * + * + * @generated + * @ordered + */ + int DROOLS_RUNTIME__RULES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Drools Runtime' class. + * + * + * @generated + * @ordered + */ + int DROOLS_RUNTIME_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Drools Runtime' class. + * + * + * @generated + * @ordered + */ + int DROOLS_RUNTIME_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.component.impl.DroolsRuleImpl Drools Rule}' class. + * + * + * @see org.openecomp.ncomp.component.impl.DroolsRuleImpl + * @see org.openecomp.ncomp.component.impl.ComponentPackageImpl#getDroolsRule() + * @generated + */ + int DROOLS_RULE = 5; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DROOLS_RULE__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int DROOLS_RULE__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int DROOLS_RULE__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int DROOLS_RULE__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Number Of Fires' attribute. + * + * + * @generated + * @ordered + */ + int DROOLS_RULE__NUMBER_OF_FIRES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Drools Rule' class. + * + * + * @generated + * @ordered + */ + int DROOLS_RULE_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Drools Rule' class. + * + * + * @generated + * @ordered + */ + int DROOLS_RULE_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.component.ApiRequestStatus Api Request Status}' enum. + * + * + * @see org.openecomp.ncomp.component.ApiRequestStatus + * @see org.openecomp.ncomp.component.impl.ComponentPackageImpl#getApiRequestStatus() + * @generated + */ + int API_REQUEST_STATUS = 6; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.component.DroolsObjectChange Drools Object Change}' enum. + * + * + * @see org.openecomp.ncomp.component.DroolsObjectChange + * @see org.openecomp.ncomp.component.impl.ComponentPackageImpl#getDroolsObjectChange() + * @generated + */ + int DROOLS_OBJECT_CHANGE = 7; + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.component.Component Component}'. + * + * + * @return the meta object for class 'Component'. + * @see org.openecomp.ncomp.component.Component + * @generated + */ + EClass getComponent(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.component.Component#getClasses Classes}'. + * + * + * @return the meta object for the containment reference list 'Classes'. + * @see org.openecomp.ncomp.component.Component#getClasses() + * @see #getComponent() + * @generated + */ + EReference getComponent_Classes(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.component.Component#getDroolsRuntimes Drools Runtimes}'. + * + * + * @return the meta object for the containment reference list 'Drools Runtimes'. + * @see org.openecomp.ncomp.component.Component#getDroolsRuntimes() + * @see #getComponent() + * @generated + */ + EReference getComponent_DroolsRuntimes(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.component.ComponentClass Class}'. + * + * + * @return the meta object for class 'Class'. + * @see org.openecomp.ncomp.component.ComponentClass + * @generated + */ + EClass getComponentClass(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.component.ComponentClass#getApis Apis}'. + * + * + * @return the meta object for the containment reference list 'Apis'. + * @see org.openecomp.ncomp.component.ComponentClass#getApis() + * @see #getComponentClass() + * @generated + */ + EReference getComponentClass_Apis(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.component.ComponentClass#getNumberOfResources Number Of Resources}'. + * + * + * @return the meta object for the attribute 'Number Of Resources'. + * @see org.openecomp.ncomp.component.ComponentClass#getNumberOfResources() + * @see #getComponentClass() + * @generated + */ + EAttribute getComponentClass_NumberOfResources(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.component.ComponentClass#getNumberOfUpdateRequests Number Of Update Requests}'. + * + * + * @return the meta object for the attribute 'Number Of Update Requests'. + * @see org.openecomp.ncomp.component.ComponentClass#getNumberOfUpdateRequests() + * @see #getComponentClass() + * @generated + */ + EAttribute getComponentClass_NumberOfUpdateRequests(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.component.ComponentClass#getNumberOfCreateRequests Number Of Create Requests}'. + * + * + * @return the meta object for the attribute 'Number Of Create Requests'. + * @see org.openecomp.ncomp.component.ComponentClass#getNumberOfCreateRequests() + * @see #getComponentClass() + * @generated + */ + EAttribute getComponentClass_NumberOfCreateRequests(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.component.ComponentClass#getNumberOfDeleteRequests Number Of Delete Requests}'. + * + * + * @return the meta object for the attribute 'Number Of Delete Requests'. + * @see org.openecomp.ncomp.component.ComponentClass#getNumberOfDeleteRequests() + * @see #getComponentClass() + * @generated + */ + EAttribute getComponentClass_NumberOfDeleteRequests(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.component.Api Api}'. + * + * + * @return the meta object for class 'Api'. + * @see org.openecomp.ncomp.component.Api + * @generated + */ + EClass getApi(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.component.Api#getNumberOfRequests Number Of Requests}'. + * + * + * @return the meta object for the attribute 'Number Of Requests'. + * @see org.openecomp.ncomp.component.Api#getNumberOfRequests() + * @see #getApi() + * @generated + */ + EAttribute getApi_NumberOfRequests(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.component.Api#getNumberOfErrorRequests Number Of Error Requests}'. + * + * + * @return the meta object for the attribute 'Number Of Error Requests'. + * @see org.openecomp.ncomp.component.Api#getNumberOfErrorRequests() + * @see #getApi() + * @generated + */ + EAttribute getApi_NumberOfErrorRequests(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.component.Api#getNumberOfCompletedRequests Number Of Completed Requests}'. + * + * + * @return the meta object for the attribute 'Number Of Completed Requests'. + * @see org.openecomp.ncomp.component.Api#getNumberOfCompletedRequests() + * @see #getApi() + * @generated + */ + EAttribute getApi_NumberOfCompletedRequests(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.component.Api#getOutstandingRequests Outstanding Requests}'. + * + * + * @return the meta object for the attribute 'Outstanding Requests'. + * @see org.openecomp.ncomp.component.Api#getOutstandingRequests() + * @see #getApi() + * @generated + */ + EAttribute getApi_OutstandingRequests(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.component.Api#getLastRequestDuration Last Request Duration}'. + * + * + * @return the meta object for the attribute 'Last Request Duration'. + * @see org.openecomp.ncomp.component.Api#getLastRequestDuration() + * @see #getApi() + * @generated + */ + EAttribute getApi_LastRequestDuration(); + + /** + * Returns the meta object for the '{@link org.openecomp.ncomp.component.Api#currentRequests() Current Requests}' operation. + * + * + * @return the meta object for the 'Current Requests' operation. + * @see org.openecomp.ncomp.component.Api#currentRequests() + * @generated + */ + EOperation getApi__CurrentRequests(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.component.ApiRequest Api Request}'. + * + * + * @return the meta object for class 'Api Request'. + * @see org.openecomp.ncomp.component.ApiRequest + * @generated + */ + EClass getApiRequest(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.component.ApiRequest#getComponentName Component Name}'. + * + * + * @return the meta object for the attribute 'Component Name'. + * @see org.openecomp.ncomp.component.ApiRequest#getComponentName() + * @see #getApiRequest() + * @generated + */ + EAttribute getApiRequest_ComponentName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.component.ApiRequest#getResourcePath Resource Path}'. + * + * + * @return the meta object for the attribute 'Resource Path'. + * @see org.openecomp.ncomp.component.ApiRequest#getResourcePath() + * @see #getApiRequest() + * @generated + */ + EAttribute getApiRequest_ResourcePath(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.component.ApiRequest#getTransactionId Transaction Id}'. + * + * + * @return the meta object for the attribute 'Transaction Id'. + * @see org.openecomp.ncomp.component.ApiRequest#getTransactionId() + * @see #getApiRequest() + * @generated + */ + EAttribute getApiRequest_TransactionId(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.component.ApiRequest#getParentTransactionId Parent Transaction Id}'. + * + * + * @return the meta object for the attribute 'Parent Transaction Id'. + * @see org.openecomp.ncomp.component.ApiRequest#getParentTransactionId() + * @see #getApiRequest() + * @generated + */ + EAttribute getApiRequest_ParentTransactionId(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.component.ApiRequest#getAction Action}'. + * + * + * @return the meta object for the attribute 'Action'. + * @see org.openecomp.ncomp.component.ApiRequest#getAction() + * @see #getApiRequest() + * @generated + */ + EAttribute getApiRequest_Action(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.component.ApiRequest#getDuration Duration}'. + * + * + * @return the meta object for the attribute 'Duration'. + * @see org.openecomp.ncomp.component.ApiRequest#getDuration() + * @see #getApiRequest() + * @generated + */ + EAttribute getApiRequest_Duration(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.component.ApiRequest#getStatus Status}'. + * + * + * @return the meta object for the attribute 'Status'. + * @see org.openecomp.ncomp.component.ApiRequest#getStatus() + * @see #getApiRequest() + * @generated + */ + EAttribute getApiRequest_Status(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.component.DroolsRuntime Drools Runtime}'. + * + * + * @return the meta object for class 'Drools Runtime'. + * @see org.openecomp.ncomp.component.DroolsRuntime + * @generated + */ + EClass getDroolsRuntime(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.component.DroolsRuntime#getRules Rules}'. + * + * + * @return the meta object for the containment reference list 'Rules'. + * @see org.openecomp.ncomp.component.DroolsRuntime#getRules() + * @see #getDroolsRuntime() + * @generated + */ + EReference getDroolsRuntime_Rules(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.component.DroolsRule Drools Rule}'. + * + * + * @return the meta object for class 'Drools Rule'. + * @see org.openecomp.ncomp.component.DroolsRule + * @generated + */ + EClass getDroolsRule(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.component.DroolsRule#getNumberOfFires Number Of Fires}'. + * + * + * @return the meta object for the attribute 'Number Of Fires'. + * @see org.openecomp.ncomp.component.DroolsRule#getNumberOfFires() + * @see #getDroolsRule() + * @generated + */ + EAttribute getDroolsRule_NumberOfFires(); + + /** + * Returns the meta object for enum '{@link org.openecomp.ncomp.component.ApiRequestStatus Api Request Status}'. + * + * + * @return the meta object for enum 'Api Request Status'. + * @see org.openecomp.ncomp.component.ApiRequestStatus + * @generated + */ + EEnum getApiRequestStatus(); + + /** + * Returns the meta object for enum '{@link org.openecomp.ncomp.component.DroolsObjectChange Drools Object Change}'. + * + * + * @return the meta object for enum 'Drools Object Change'. + * @see org.openecomp.ncomp.component.DroolsObjectChange + * @generated + */ + EEnum getDroolsObjectChange(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ComponentFactory getComponentFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.component.impl.ComponentImpl Component}' class. + * + * + * @see org.openecomp.ncomp.component.impl.ComponentImpl + * @see org.openecomp.ncomp.component.impl.ComponentPackageImpl#getComponent() + * @generated + */ + EClass COMPONENT = eINSTANCE.getComponent(); + + /** + * The meta object literal for the 'Classes' containment reference list feature. + * + * + * @generated + */ + EReference COMPONENT__CLASSES = eINSTANCE.getComponent_Classes(); + + /** + * The meta object literal for the 'Drools Runtimes' containment reference list feature. + * + * + * @generated + */ + EReference COMPONENT__DROOLS_RUNTIMES = eINSTANCE.getComponent_DroolsRuntimes(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.component.impl.ComponentClassImpl Class}' class. + * + * + * @see org.openecomp.ncomp.component.impl.ComponentClassImpl + * @see org.openecomp.ncomp.component.impl.ComponentPackageImpl#getComponentClass() + * @generated + */ + EClass COMPONENT_CLASS = eINSTANCE.getComponentClass(); + + /** + * The meta object literal for the 'Apis' containment reference list feature. + * + * + * @generated + */ + EReference COMPONENT_CLASS__APIS = eINSTANCE.getComponentClass_Apis(); + + /** + * The meta object literal for the 'Number Of Resources' attribute feature. + * + * + * @generated + */ + EAttribute COMPONENT_CLASS__NUMBER_OF_RESOURCES = eINSTANCE.getComponentClass_NumberOfResources(); + + /** + * The meta object literal for the 'Number Of Update Requests' attribute feature. + * + * + * @generated + */ + EAttribute COMPONENT_CLASS__NUMBER_OF_UPDATE_REQUESTS = eINSTANCE.getComponentClass_NumberOfUpdateRequests(); + + /** + * The meta object literal for the 'Number Of Create Requests' attribute feature. + * + * + * @generated + */ + EAttribute COMPONENT_CLASS__NUMBER_OF_CREATE_REQUESTS = eINSTANCE.getComponentClass_NumberOfCreateRequests(); + + /** + * The meta object literal for the 'Number Of Delete Requests' attribute feature. + * + * + * @generated + */ + EAttribute COMPONENT_CLASS__NUMBER_OF_DELETE_REQUESTS = eINSTANCE.getComponentClass_NumberOfDeleteRequests(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.component.impl.ApiImpl Api}' class. + * + * + * @see org.openecomp.ncomp.component.impl.ApiImpl + * @see org.openecomp.ncomp.component.impl.ComponentPackageImpl#getApi() + * @generated + */ + EClass API = eINSTANCE.getApi(); + + /** + * The meta object literal for the 'Number Of Requests' attribute feature. + * + * + * @generated + */ + EAttribute API__NUMBER_OF_REQUESTS = eINSTANCE.getApi_NumberOfRequests(); + + /** + * The meta object literal for the 'Number Of Error Requests' attribute feature. + * + * + * @generated + */ + EAttribute API__NUMBER_OF_ERROR_REQUESTS = eINSTANCE.getApi_NumberOfErrorRequests(); + + /** + * The meta object literal for the 'Number Of Completed Requests' attribute feature. + * + * + * @generated + */ + EAttribute API__NUMBER_OF_COMPLETED_REQUESTS = eINSTANCE.getApi_NumberOfCompletedRequests(); + + /** + * The meta object literal for the 'Outstanding Requests' attribute feature. + * + * + * @generated + */ + EAttribute API__OUTSTANDING_REQUESTS = eINSTANCE.getApi_OutstandingRequests(); + + /** + * The meta object literal for the 'Last Request Duration' attribute feature. + * + * + * @generated + */ + EAttribute API__LAST_REQUEST_DURATION = eINSTANCE.getApi_LastRequestDuration(); + + /** + * The meta object literal for the 'Current Requests' operation. + * + * + * @generated + */ + EOperation API___CURRENT_REQUESTS = eINSTANCE.getApi__CurrentRequests(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.component.impl.ApiRequestImpl Api Request}' class. + * + * + * @see org.openecomp.ncomp.component.impl.ApiRequestImpl + * @see org.openecomp.ncomp.component.impl.ComponentPackageImpl#getApiRequest() + * @generated + */ + EClass API_REQUEST = eINSTANCE.getApiRequest(); + + /** + * The meta object literal for the 'Component Name' attribute feature. + * + * + * @generated + */ + EAttribute API_REQUEST__COMPONENT_NAME = eINSTANCE.getApiRequest_ComponentName(); + + /** + * The meta object literal for the 'Resource Path' attribute feature. + * + * + * @generated + */ + EAttribute API_REQUEST__RESOURCE_PATH = eINSTANCE.getApiRequest_ResourcePath(); + + /** + * The meta object literal for the 'Transaction Id' attribute feature. + * + * + * @generated + */ + EAttribute API_REQUEST__TRANSACTION_ID = eINSTANCE.getApiRequest_TransactionId(); + + /** + * The meta object literal for the 'Parent Transaction Id' attribute feature. + * + * + * @generated + */ + EAttribute API_REQUEST__PARENT_TRANSACTION_ID = eINSTANCE.getApiRequest_ParentTransactionId(); + + /** + * The meta object literal for the 'Action' attribute feature. + * + * + * @generated + */ + EAttribute API_REQUEST__ACTION = eINSTANCE.getApiRequest_Action(); + + /** + * The meta object literal for the 'Duration' attribute feature. + * + * + * @generated + */ + EAttribute API_REQUEST__DURATION = eINSTANCE.getApiRequest_Duration(); + + /** + * The meta object literal for the 'Status' attribute feature. + * + * + * @generated + */ + EAttribute API_REQUEST__STATUS = eINSTANCE.getApiRequest_Status(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.component.impl.DroolsRuntimeImpl Drools Runtime}' class. + * + * + * @see org.openecomp.ncomp.component.impl.DroolsRuntimeImpl + * @see org.openecomp.ncomp.component.impl.ComponentPackageImpl#getDroolsRuntime() + * @generated + */ + EClass DROOLS_RUNTIME = eINSTANCE.getDroolsRuntime(); + + /** + * The meta object literal for the 'Rules' containment reference list feature. + * + * + * @generated + */ + EReference DROOLS_RUNTIME__RULES = eINSTANCE.getDroolsRuntime_Rules(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.component.impl.DroolsRuleImpl Drools Rule}' class. + * + * + * @see org.openecomp.ncomp.component.impl.DroolsRuleImpl + * @see org.openecomp.ncomp.component.impl.ComponentPackageImpl#getDroolsRule() + * @generated + */ + EClass DROOLS_RULE = eINSTANCE.getDroolsRule(); + + /** + * The meta object literal for the 'Number Of Fires' attribute feature. + * + * + * @generated + */ + EAttribute DROOLS_RULE__NUMBER_OF_FIRES = eINSTANCE.getDroolsRule_NumberOfFires(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.component.ApiRequestStatus Api Request Status}' enum. + * + * + * @see org.openecomp.ncomp.component.ApiRequestStatus + * @see org.openecomp.ncomp.component.impl.ComponentPackageImpl#getApiRequestStatus() + * @generated + */ + EEnum API_REQUEST_STATUS = eINSTANCE.getApiRequestStatus(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.component.DroolsObjectChange Drools Object Change}' enum. + * + * + * @see org.openecomp.ncomp.component.DroolsObjectChange + * @see org.openecomp.ncomp.component.impl.ComponentPackageImpl#getDroolsObjectChange() + * @generated + */ + EEnum DROOLS_OBJECT_CHANGE = eINSTANCE.getDroolsObjectChange(); + + } + +} //ComponentPackage diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/DroolsObjectChange.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/DroolsObjectChange.java new file mode 100644 index 0000000..ef9e1ea --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/DroolsObjectChange.java @@ -0,0 +1,254 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.component; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Drools Object Change', + * and utility methods for working with them. + * + * @see org.openecomp.ncomp.component.ComponentPackage#getDroolsObjectChange() + * @model + * @generated + */ +public enum DroolsObjectChange implements Enumerator { + /** + * The 'INSERTED' literal object. + * + * + * @see #INSERTED_VALUE + * @generated + * @ordered + */ + INSERTED(0, "INSERTED", "INSERTED"), + + /** + * The 'DELETED' literal object. + * + * + * @see #DELETED_VALUE + * @generated + * @ordered + */ + DELETED(0, "DELETED", "DELETED"), + + /** + * The 'UPDATED' literal object. + * + * + * @see #UPDATED_VALUE + * @generated + * @ordered + */ + UPDATED(0, "UPDATED", "UPDATED"); + + /** + * The 'INSERTED' literal value. + * + *

+ * If the meaning of 'INSERTED' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #INSERTED + * @model + * @generated + * @ordered + */ + public static final int INSERTED_VALUE = 0; + + /** + * The 'DELETED' literal value. + * + *

+ * If the meaning of 'DELETED' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #DELETED + * @model + * @generated + * @ordered + */ + public static final int DELETED_VALUE = 0; + + /** + * The 'UPDATED' literal value. + * + *

+ * If the meaning of 'UPDATED' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #UPDATED + * @model + * @generated + * @ordered + */ + public static final int UPDATED_VALUE = 0; + + /** + * An array of all the 'Drools Object Change' enumerators. + * + * + * @generated + */ + private static final DroolsObjectChange[] VALUES_ARRAY = + new DroolsObjectChange[] { + INSERTED, + DELETED, + UPDATED, + }; + + /** + * A public read-only list of all the 'Drools Object Change' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Drools Object Change' literal with the specified literal value. + * + * + * @generated + */ + public static DroolsObjectChange get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + DroolsObjectChange result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Drools Object Change' literal with the specified name. + * + * + * @generated + */ + public static DroolsObjectChange getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + DroolsObjectChange result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Drools Object Change' literal with the specified integer value. + * + * + * @generated + */ + public static DroolsObjectChange get(int value) { + switch (value) { + case INSERTED_VALUE: return INSERTED; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private DroolsObjectChange(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //DroolsObjectChange diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/DroolsRule.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/DroolsRule.java new file mode 100644 index 0000000..66e192c --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/DroolsRule.java @@ -0,0 +1,73 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.component; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +/** + * + * A representation of the model object 'Drools Rule'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.component.DroolsRule#getNumberOfFires Number Of Fires}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.component.ComponentPackage#getDroolsRule() + * @model + * @generated + */ +public interface DroolsRule extends NamedEntity { + /** + * Returns the value of the 'Number Of Fires' attribute. + * + *

+ * If the meaning of the 'Number Of Fires' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Of Fires' attribute. + * @see #setNumberOfFires(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.component.ComponentPackage#getDroolsRule_NumberOfFires() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * @generated + */ + IncreasingULongMetricAttribute getNumberOfFires(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.component.DroolsRule#getNumberOfFires Number Of Fires}' attribute. + * + * + * @param value the new value of the 'Number Of Fires' attribute. + * @see #getNumberOfFires() + * @generated + */ + void setNumberOfFires(IncreasingULongMetricAttribute value); + +} // DroolsRule diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/DroolsRuntime.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/DroolsRuntime.java new file mode 100644 index 0000000..4fa94a8 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/DroolsRuntime.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.component; + +import org.openecomp.ncomp.core.NamedEntity; +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Drools Runtime'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.component.DroolsRuntime#getRules Rules}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.component.ComponentPackage#getDroolsRuntime() + * @model + * @generated + */ +public interface DroolsRuntime extends NamedEntity { + + /** + * Returns the value of the 'Rules' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.component.DroolsRule}. + * + *

+ * If the meaning of the 'Rules' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Rules' containment reference list. + * @see org.openecomp.ncomp.component.ComponentPackage#getDroolsRuntime_Rules() + * @model containment="true" + * @generated + */ + EList getRules(); +} // DroolsRuntime diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/Resource.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/Resource.java new file mode 100644 index 0000000..df02903 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/Resource.java @@ -0,0 +1,63 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.component; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Resource'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.component.Resource#getSubResources Sub Resources}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.component.ComponentPackage#getResource() + * @model + * @generated + */ +public interface Resource extends NamedEntity { + /** + * Returns the value of the 'Sub Resources' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.component.Resource}. + * + *

+ * If the meaning of the 'Sub Resources' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Sub Resources' containment reference list. + * @see org.openecomp.ncomp.component.ComponentPackage#getResource_SubResources() + * @model containment="true" + * @generated + */ + EList getSubResources(); + +} // Resource diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ApiImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ApiImpl.java new file mode 100644 index 0000000..97a3b60 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ApiImpl.java @@ -0,0 +1,420 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.component.impl; + +import org.openecomp.ncomp.component.Api; +import org.openecomp.ncomp.component.ApiRequest; +import org.openecomp.ncomp.component.ComponentPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.LongMetricAttribute; +import java.lang.reflect.InvocationTargetException; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Api'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.component.impl.ApiImpl#getNumberOfRequests Number Of Requests}
  • + *
  • {@link org.openecomp.ncomp.component.impl.ApiImpl#getNumberOfErrorRequests Number Of Error Requests}
  • + *
  • {@link org.openecomp.ncomp.component.impl.ApiImpl#getNumberOfCompletedRequests Number Of Completed Requests}
  • + *
  • {@link org.openecomp.ncomp.component.impl.ApiImpl#getOutstandingRequests Outstanding Requests}
  • + *
  • {@link org.openecomp.ncomp.component.impl.ApiImpl#getLastRequestDuration Last Request Duration}
  • + *
+ *

+ * + * @generated + */ +public class ApiImpl extends NamedEntityImpl implements Api { + /** + * The default value of the '{@link #getNumberOfRequests() Number Of Requests}' attribute. + * + * + * @see #getNumberOfRequests() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_OF_REQUESTS_EDEFAULT = null; + /** + * The cached value of the '{@link #getNumberOfRequests() Number Of Requests}' attribute. + * + * + * @see #getNumberOfRequests() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberOfRequests = NUMBER_OF_REQUESTS_EDEFAULT; + /** + * The default value of the '{@link #getNumberOfErrorRequests() Number Of Error Requests}' attribute. + * + * + * @see #getNumberOfErrorRequests() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_OF_ERROR_REQUESTS_EDEFAULT = null; + /** + * The cached value of the '{@link #getNumberOfErrorRequests() Number Of Error Requests}' attribute. + * + * + * @see #getNumberOfErrorRequests() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberOfErrorRequests = NUMBER_OF_ERROR_REQUESTS_EDEFAULT; + /** + * The default value of the '{@link #getNumberOfCompletedRequests() Number Of Completed Requests}' attribute. + * + * + * @see #getNumberOfCompletedRequests() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_OF_COMPLETED_REQUESTS_EDEFAULT = null; + /** + * The cached value of the '{@link #getNumberOfCompletedRequests() Number Of Completed Requests}' attribute. + * + * + * @see #getNumberOfCompletedRequests() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberOfCompletedRequests = NUMBER_OF_COMPLETED_REQUESTS_EDEFAULT; + /** + * The default value of the '{@link #getOutstandingRequests() Outstanding Requests}' attribute. + * + * + * @see #getOutstandingRequests() + * @generated + * @ordered + */ + protected static final LongMetricAttribute OUTSTANDING_REQUESTS_EDEFAULT = null; + /** + * The cached value of the '{@link #getOutstandingRequests() Outstanding Requests}' attribute. + * + * + * @see #getOutstandingRequests() + * @generated + * @ordered + */ + protected LongMetricAttribute outstandingRequests = OUTSTANDING_REQUESTS_EDEFAULT; + /** + * The default value of the '{@link #getLastRequestDuration() Last Request Duration}' attribute. + * + * + * @see #getLastRequestDuration() + * @generated + * @ordered + */ + protected static final LongMetricAttribute LAST_REQUEST_DURATION_EDEFAULT = null; + /** + * The cached value of the '{@link #getLastRequestDuration() Last Request Duration}' attribute. + * + * + * @see #getLastRequestDuration() + * @generated + * @ordered + */ + protected LongMetricAttribute lastRequestDuration = LAST_REQUEST_DURATION_EDEFAULT; + + /** + * + * + * @generated + */ + protected ApiImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ComponentPackage.Literals.API; + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getNumberOfRequests() { + return numberOfRequests; + } + + /** + * + * + * @generated + */ + public void setNumberOfRequests(IncreasingULongMetricAttribute newNumberOfRequests) { + IncreasingULongMetricAttribute oldNumberOfRequests = numberOfRequests; + numberOfRequests = newNumberOfRequests; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.API__NUMBER_OF_REQUESTS, oldNumberOfRequests, numberOfRequests)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getNumberOfErrorRequests() { + return numberOfErrorRequests; + } + + /** + * + * + * @generated + */ + public void setNumberOfErrorRequests(IncreasingULongMetricAttribute newNumberOfErrorRequests) { + IncreasingULongMetricAttribute oldNumberOfErrorRequests = numberOfErrorRequests; + numberOfErrorRequests = newNumberOfErrorRequests; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.API__NUMBER_OF_ERROR_REQUESTS, oldNumberOfErrorRequests, numberOfErrorRequests)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getNumberOfCompletedRequests() { + return numberOfCompletedRequests; + } + + /** + * + * + * @generated + */ + public void setNumberOfCompletedRequests(IncreasingULongMetricAttribute newNumberOfCompletedRequests) { + IncreasingULongMetricAttribute oldNumberOfCompletedRequests = numberOfCompletedRequests; + numberOfCompletedRequests = newNumberOfCompletedRequests; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.API__NUMBER_OF_COMPLETED_REQUESTS, oldNumberOfCompletedRequests, numberOfCompletedRequests)); + } + + /** + * + * + * @generated + */ + public LongMetricAttribute getOutstandingRequests() { + return outstandingRequests; + } + + /** + * + * + * @generated + */ + public void setOutstandingRequests(LongMetricAttribute newOutstandingRequests) { + LongMetricAttribute oldOutstandingRequests = outstandingRequests; + outstandingRequests = newOutstandingRequests; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.API__OUTSTANDING_REQUESTS, oldOutstandingRequests, outstandingRequests)); + } + + /** + * + * + * @generated + */ + public LongMetricAttribute getLastRequestDuration() { + return lastRequestDuration; + } + + /** + * + * + * @generated + */ + public void setLastRequestDuration(LongMetricAttribute newLastRequestDuration) { + LongMetricAttribute oldLastRequestDuration = lastRequestDuration; + lastRequestDuration = newLastRequestDuration; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.API__LAST_REQUEST_DURATION, oldLastRequestDuration, lastRequestDuration)); + } + + /** + * + * + * @generated + */ + public EList currentRequests() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ComponentPackage.API__NUMBER_OF_REQUESTS: + return getNumberOfRequests(); + case ComponentPackage.API__NUMBER_OF_ERROR_REQUESTS: + return getNumberOfErrorRequests(); + case ComponentPackage.API__NUMBER_OF_COMPLETED_REQUESTS: + return getNumberOfCompletedRequests(); + case ComponentPackage.API__OUTSTANDING_REQUESTS: + return getOutstandingRequests(); + case ComponentPackage.API__LAST_REQUEST_DURATION: + return getLastRequestDuration(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ComponentPackage.API__NUMBER_OF_REQUESTS: + setNumberOfRequests((IncreasingULongMetricAttribute)newValue); + return; + case ComponentPackage.API__NUMBER_OF_ERROR_REQUESTS: + setNumberOfErrorRequests((IncreasingULongMetricAttribute)newValue); + return; + case ComponentPackage.API__NUMBER_OF_COMPLETED_REQUESTS: + setNumberOfCompletedRequests((IncreasingULongMetricAttribute)newValue); + return; + case ComponentPackage.API__OUTSTANDING_REQUESTS: + setOutstandingRequests((LongMetricAttribute)newValue); + return; + case ComponentPackage.API__LAST_REQUEST_DURATION: + setLastRequestDuration((LongMetricAttribute)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ComponentPackage.API__NUMBER_OF_REQUESTS: + setNumberOfRequests(NUMBER_OF_REQUESTS_EDEFAULT); + return; + case ComponentPackage.API__NUMBER_OF_ERROR_REQUESTS: + setNumberOfErrorRequests(NUMBER_OF_ERROR_REQUESTS_EDEFAULT); + return; + case ComponentPackage.API__NUMBER_OF_COMPLETED_REQUESTS: + setNumberOfCompletedRequests(NUMBER_OF_COMPLETED_REQUESTS_EDEFAULT); + return; + case ComponentPackage.API__OUTSTANDING_REQUESTS: + setOutstandingRequests(OUTSTANDING_REQUESTS_EDEFAULT); + return; + case ComponentPackage.API__LAST_REQUEST_DURATION: + setLastRequestDuration(LAST_REQUEST_DURATION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ComponentPackage.API__NUMBER_OF_REQUESTS: + return NUMBER_OF_REQUESTS_EDEFAULT == null ? numberOfRequests != null : !NUMBER_OF_REQUESTS_EDEFAULT.equals(numberOfRequests); + case ComponentPackage.API__NUMBER_OF_ERROR_REQUESTS: + return NUMBER_OF_ERROR_REQUESTS_EDEFAULT == null ? numberOfErrorRequests != null : !NUMBER_OF_ERROR_REQUESTS_EDEFAULT.equals(numberOfErrorRequests); + case ComponentPackage.API__NUMBER_OF_COMPLETED_REQUESTS: + return NUMBER_OF_COMPLETED_REQUESTS_EDEFAULT == null ? numberOfCompletedRequests != null : !NUMBER_OF_COMPLETED_REQUESTS_EDEFAULT.equals(numberOfCompletedRequests); + case ComponentPackage.API__OUTSTANDING_REQUESTS: + return OUTSTANDING_REQUESTS_EDEFAULT == null ? outstandingRequests != null : !OUTSTANDING_REQUESTS_EDEFAULT.equals(outstandingRequests); + case ComponentPackage.API__LAST_REQUEST_DURATION: + return LAST_REQUEST_DURATION_EDEFAULT == null ? lastRequestDuration != null : !LAST_REQUEST_DURATION_EDEFAULT.equals(lastRequestDuration); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public Object eInvoke(int operationID, EList arguments) throws InvocationTargetException { + switch (operationID) { + case ComponentPackage.API___CURRENT_REQUESTS: + return currentRequests(); + } + return super.eInvoke(operationID, arguments); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (numberOfRequests: "); + result.append(numberOfRequests); + result.append(", numberOfErrorRequests: "); + result.append(numberOfErrorRequests); + result.append(", numberOfCompletedRequests: "); + result.append(numberOfCompletedRequests); + result.append(", outstandingRequests: "); + result.append(outstandingRequests); + result.append(", lastRequestDuration: "); + result.append(lastRequestDuration); + result.append(')'); + return result.toString(); + } + +} //ApiImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ApiRequestImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ApiRequestImpl.java new file mode 100644 index 0000000..fc8b7ef --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ApiRequestImpl.java @@ -0,0 +1,510 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.component.impl; + +import org.openecomp.ncomp.component.ApiRequest; +import org.openecomp.ncomp.component.ApiRequestStatus; +import org.openecomp.ncomp.component.ComponentPackage; + +import org.openecomp.ncomp.core.impl.EventImpl; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Api Request'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.component.impl.ApiRequestImpl#getComponentName Component Name}
  • + *
  • {@link org.openecomp.ncomp.component.impl.ApiRequestImpl#getResourcePath Resource Path}
  • + *
  • {@link org.openecomp.ncomp.component.impl.ApiRequestImpl#getTransactionId Transaction Id}
  • + *
  • {@link org.openecomp.ncomp.component.impl.ApiRequestImpl#getParentTransactionId Parent Transaction Id}
  • + *
  • {@link org.openecomp.ncomp.component.impl.ApiRequestImpl#getAction Action}
  • + *
  • {@link org.openecomp.ncomp.component.impl.ApiRequestImpl#getDuration Duration}
  • + *
  • {@link org.openecomp.ncomp.component.impl.ApiRequestImpl#getStatus Status}
  • + *
+ *

+ * + * @generated + */ +public class ApiRequestImpl extends EventImpl implements ApiRequest { + /** + * The default value of the '{@link #getComponentName() Component Name}' attribute. + * + * + * @see #getComponentName() + * @generated + * @ordered + */ + protected static final String COMPONENT_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getComponentName() Component Name}' attribute. + * + * + * @see #getComponentName() + * @generated + * @ordered + */ + protected String componentName = COMPONENT_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getResourcePath() Resource Path}' attribute. + * + * + * @see #getResourcePath() + * @generated + * @ordered + */ + protected static final String RESOURCE_PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getResourcePath() Resource Path}' attribute. + * + * + * @see #getResourcePath() + * @generated + * @ordered + */ + protected String resourcePath = RESOURCE_PATH_EDEFAULT; + + /** + * The default value of the '{@link #getTransactionId() Transaction Id}' attribute. + * + * + * @see #getTransactionId() + * @generated + * @ordered + */ + protected static final String TRANSACTION_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTransactionId() Transaction Id}' attribute. + * + * + * @see #getTransactionId() + * @generated + * @ordered + */ + protected String transactionId = TRANSACTION_ID_EDEFAULT; + + /** + * The default value of the '{@link #getParentTransactionId() Parent Transaction Id}' attribute. + * + * + * @see #getParentTransactionId() + * @generated + * @ordered + */ + protected static final String PARENT_TRANSACTION_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getParentTransactionId() Parent Transaction Id}' attribute. + * + * + * @see #getParentTransactionId() + * @generated + * @ordered + */ + protected String parentTransactionId = PARENT_TRANSACTION_ID_EDEFAULT; + + /** + * The default value of the '{@link #getAction() Action}' attribute. + * + * + * @see #getAction() + * @generated + * @ordered + */ + protected static final String ACTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAction() Action}' attribute. + * + * + * @see #getAction() + * @generated + * @ordered + */ + protected String action = ACTION_EDEFAULT; + + /** + * The default value of the '{@link #getDuration() Duration}' attribute. + * + * + * @see #getDuration() + * @generated + * @ordered + */ + protected static final Long DURATION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDuration() Duration}' attribute. + * + * + * @see #getDuration() + * @generated + * @ordered + */ + protected Long duration = DURATION_EDEFAULT; + + /** + * The default value of the '{@link #getStatus() Status}' attribute. + * + * + * @see #getStatus() + * @generated + * @ordered + */ + protected static final ApiRequestStatus STATUS_EDEFAULT = ApiRequestStatus.OKAY; + + /** + * The cached value of the '{@link #getStatus() Status}' attribute. + * + * + * @see #getStatus() + * @generated + * @ordered + */ + protected ApiRequestStatus status = STATUS_EDEFAULT; + + /** + * + * + * @generated + */ + protected ApiRequestImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ComponentPackage.Literals.API_REQUEST; + } + + /** + * + * + * @generated + */ + public String getComponentName() { + return componentName; + } + + /** + * + * + * @generated + */ + public void setComponentName(String newComponentName) { + String oldComponentName = componentName; + componentName = newComponentName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.API_REQUEST__COMPONENT_NAME, oldComponentName, componentName)); + } + + /** + * + * + * @generated + */ + public String getResourcePath() { + return resourcePath; + } + + /** + * + * + * @generated + */ + public void setResourcePath(String newResourcePath) { + String oldResourcePath = resourcePath; + resourcePath = newResourcePath; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.API_REQUEST__RESOURCE_PATH, oldResourcePath, resourcePath)); + } + + /** + * + * + * @generated + */ + public String getTransactionId() { + return transactionId; + } + + /** + * + * + * @generated + */ + public void setTransactionId(String newTransactionId) { + String oldTransactionId = transactionId; + transactionId = newTransactionId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.API_REQUEST__TRANSACTION_ID, oldTransactionId, transactionId)); + } + + /** + * + * + * @generated + */ + public String getParentTransactionId() { + return parentTransactionId; + } + + /** + * + * + * @generated + */ + public void setParentTransactionId(String newParentTransactionId) { + String oldParentTransactionId = parentTransactionId; + parentTransactionId = newParentTransactionId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.API_REQUEST__PARENT_TRANSACTION_ID, oldParentTransactionId, parentTransactionId)); + } + + /** + * + * + * @generated + */ + public String getAction() { + return action; + } + + /** + * + * + * @generated + */ + public void setAction(String newAction) { + String oldAction = action; + action = newAction; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.API_REQUEST__ACTION, oldAction, action)); + } + + /** + * + * + * @generated + */ + public Long getDuration() { + return duration; + } + + /** + * + * + * @generated + */ + public void setDuration(Long newDuration) { + Long oldDuration = duration; + duration = newDuration; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.API_REQUEST__DURATION, oldDuration, duration)); + } + + /** + * + * + * @generated + */ + public ApiRequestStatus getStatus() { + return status; + } + + /** + * + * + * @generated + */ + public void setStatus(ApiRequestStatus newStatus) { + ApiRequestStatus oldStatus = status; + status = newStatus == null ? STATUS_EDEFAULT : newStatus; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.API_REQUEST__STATUS, oldStatus, status)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ComponentPackage.API_REQUEST__COMPONENT_NAME: + return getComponentName(); + case ComponentPackage.API_REQUEST__RESOURCE_PATH: + return getResourcePath(); + case ComponentPackage.API_REQUEST__TRANSACTION_ID: + return getTransactionId(); + case ComponentPackage.API_REQUEST__PARENT_TRANSACTION_ID: + return getParentTransactionId(); + case ComponentPackage.API_REQUEST__ACTION: + return getAction(); + case ComponentPackage.API_REQUEST__DURATION: + return getDuration(); + case ComponentPackage.API_REQUEST__STATUS: + return getStatus(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ComponentPackage.API_REQUEST__COMPONENT_NAME: + setComponentName((String)newValue); + return; + case ComponentPackage.API_REQUEST__RESOURCE_PATH: + setResourcePath((String)newValue); + return; + case ComponentPackage.API_REQUEST__TRANSACTION_ID: + setTransactionId((String)newValue); + return; + case ComponentPackage.API_REQUEST__PARENT_TRANSACTION_ID: + setParentTransactionId((String)newValue); + return; + case ComponentPackage.API_REQUEST__ACTION: + setAction((String)newValue); + return; + case ComponentPackage.API_REQUEST__DURATION: + setDuration((Long)newValue); + return; + case ComponentPackage.API_REQUEST__STATUS: + setStatus((ApiRequestStatus)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ComponentPackage.API_REQUEST__COMPONENT_NAME: + setComponentName(COMPONENT_NAME_EDEFAULT); + return; + case ComponentPackage.API_REQUEST__RESOURCE_PATH: + setResourcePath(RESOURCE_PATH_EDEFAULT); + return; + case ComponentPackage.API_REQUEST__TRANSACTION_ID: + setTransactionId(TRANSACTION_ID_EDEFAULT); + return; + case ComponentPackage.API_REQUEST__PARENT_TRANSACTION_ID: + setParentTransactionId(PARENT_TRANSACTION_ID_EDEFAULT); + return; + case ComponentPackage.API_REQUEST__ACTION: + setAction(ACTION_EDEFAULT); + return; + case ComponentPackage.API_REQUEST__DURATION: + setDuration(DURATION_EDEFAULT); + return; + case ComponentPackage.API_REQUEST__STATUS: + setStatus(STATUS_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ComponentPackage.API_REQUEST__COMPONENT_NAME: + return COMPONENT_NAME_EDEFAULT == null ? componentName != null : !COMPONENT_NAME_EDEFAULT.equals(componentName); + case ComponentPackage.API_REQUEST__RESOURCE_PATH: + return RESOURCE_PATH_EDEFAULT == null ? resourcePath != null : !RESOURCE_PATH_EDEFAULT.equals(resourcePath); + case ComponentPackage.API_REQUEST__TRANSACTION_ID: + return TRANSACTION_ID_EDEFAULT == null ? transactionId != null : !TRANSACTION_ID_EDEFAULT.equals(transactionId); + case ComponentPackage.API_REQUEST__PARENT_TRANSACTION_ID: + return PARENT_TRANSACTION_ID_EDEFAULT == null ? parentTransactionId != null : !PARENT_TRANSACTION_ID_EDEFAULT.equals(parentTransactionId); + case ComponentPackage.API_REQUEST__ACTION: + return ACTION_EDEFAULT == null ? action != null : !ACTION_EDEFAULT.equals(action); + case ComponentPackage.API_REQUEST__DURATION: + return DURATION_EDEFAULT == null ? duration != null : !DURATION_EDEFAULT.equals(duration); + case ComponentPackage.API_REQUEST__STATUS: + return status != STATUS_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (componentName: "); + result.append(componentName); + result.append(", resourcePath: "); + result.append(resourcePath); + result.append(", transactionId: "); + result.append(transactionId); + result.append(", parentTransactionId: "); + result.append(parentTransactionId); + result.append(", action: "); + result.append(action); + result.append(", duration: "); + result.append(duration); + result.append(", status: "); + result.append(status); + result.append(')'); + return result.toString(); + } + +} //ApiRequestImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ComponentClassImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ComponentClassImpl.java new file mode 100644 index 0000000..76924e9 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ComponentClassImpl.java @@ -0,0 +1,400 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.component.impl; + +import org.openecomp.ncomp.component.Api; +import org.openecomp.ncomp.component.ComponentClass; +import org.openecomp.ncomp.component.ComponentPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.LongMetricAttribute; +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Class'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.component.impl.ComponentClassImpl#getApis Apis}
  • + *
  • {@link org.openecomp.ncomp.component.impl.ComponentClassImpl#getNumberOfResources Number Of Resources}
  • + *
  • {@link org.openecomp.ncomp.component.impl.ComponentClassImpl#getNumberOfUpdateRequests Number Of Update Requests}
  • + *
  • {@link org.openecomp.ncomp.component.impl.ComponentClassImpl#getNumberOfCreateRequests Number Of Create Requests}
  • + *
  • {@link org.openecomp.ncomp.component.impl.ComponentClassImpl#getNumberOfDeleteRequests Number Of Delete Requests}
  • + *
+ *

+ * + * @generated + */ +public class ComponentClassImpl extends NamedEntityImpl implements ComponentClass { + /** + * The cached value of the '{@link #getApis() Apis}' containment reference list. + * + * + * @see #getApis() + * @generated + * @ordered + */ + protected EList apis; + + /** + * The default value of the '{@link #getNumberOfResources() Number Of Resources}' attribute. + * + * + * @see #getNumberOfResources() + * @generated + * @ordered + */ + protected static final LongMetricAttribute NUMBER_OF_RESOURCES_EDEFAULT = null; + /** + * The cached value of the '{@link #getNumberOfResources() Number Of Resources}' attribute. + * + * + * @see #getNumberOfResources() + * @generated + * @ordered + */ + protected LongMetricAttribute numberOfResources = NUMBER_OF_RESOURCES_EDEFAULT; + /** + * The default value of the '{@link #getNumberOfUpdateRequests() Number Of Update Requests}' attribute. + * + * + * @see #getNumberOfUpdateRequests() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_OF_UPDATE_REQUESTS_EDEFAULT = null; + /** + * The cached value of the '{@link #getNumberOfUpdateRequests() Number Of Update Requests}' attribute. + * + * + * @see #getNumberOfUpdateRequests() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberOfUpdateRequests = NUMBER_OF_UPDATE_REQUESTS_EDEFAULT; + /** + * The default value of the '{@link #getNumberOfCreateRequests() Number Of Create Requests}' attribute. + * + * + * @see #getNumberOfCreateRequests() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_OF_CREATE_REQUESTS_EDEFAULT = null; + /** + * The cached value of the '{@link #getNumberOfCreateRequests() Number Of Create Requests}' attribute. + * + * + * @see #getNumberOfCreateRequests() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberOfCreateRequests = NUMBER_OF_CREATE_REQUESTS_EDEFAULT; + /** + * The default value of the '{@link #getNumberOfDeleteRequests() Number Of Delete Requests}' attribute. + * + * + * @see #getNumberOfDeleteRequests() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_OF_DELETE_REQUESTS_EDEFAULT = null; + /** + * The cached value of the '{@link #getNumberOfDeleteRequests() Number Of Delete Requests}' attribute. + * + * + * @see #getNumberOfDeleteRequests() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberOfDeleteRequests = NUMBER_OF_DELETE_REQUESTS_EDEFAULT; + + /** + * + * + * @generated + */ + protected ComponentClassImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ComponentPackage.Literals.COMPONENT_CLASS; + } + + /** + * + * + * @generated + */ + public EList getApis() { + if (apis == null) { + apis = new EObjectContainmentEList(Api.class, this, ComponentPackage.COMPONENT_CLASS__APIS); + } + return apis; + } + + /** + * + * + * @generated + */ + public LongMetricAttribute getNumberOfResources() { + return numberOfResources; + } + + /** + * + * + * @generated + */ + public void setNumberOfResources(LongMetricAttribute newNumberOfResources) { + LongMetricAttribute oldNumberOfResources = numberOfResources; + numberOfResources = newNumberOfResources; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.COMPONENT_CLASS__NUMBER_OF_RESOURCES, oldNumberOfResources, numberOfResources)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getNumberOfUpdateRequests() { + return numberOfUpdateRequests; + } + + /** + * + * + * @generated + */ + public void setNumberOfUpdateRequests(IncreasingULongMetricAttribute newNumberOfUpdateRequests) { + IncreasingULongMetricAttribute oldNumberOfUpdateRequests = numberOfUpdateRequests; + numberOfUpdateRequests = newNumberOfUpdateRequests; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.COMPONENT_CLASS__NUMBER_OF_UPDATE_REQUESTS, oldNumberOfUpdateRequests, numberOfUpdateRequests)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getNumberOfCreateRequests() { + return numberOfCreateRequests; + } + + /** + * + * + * @generated + */ + public void setNumberOfCreateRequests(IncreasingULongMetricAttribute newNumberOfCreateRequests) { + IncreasingULongMetricAttribute oldNumberOfCreateRequests = numberOfCreateRequests; + numberOfCreateRequests = newNumberOfCreateRequests; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.COMPONENT_CLASS__NUMBER_OF_CREATE_REQUESTS, oldNumberOfCreateRequests, numberOfCreateRequests)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getNumberOfDeleteRequests() { + return numberOfDeleteRequests; + } + + /** + * + * + * @generated + */ + public void setNumberOfDeleteRequests(IncreasingULongMetricAttribute newNumberOfDeleteRequests) { + IncreasingULongMetricAttribute oldNumberOfDeleteRequests = numberOfDeleteRequests; + numberOfDeleteRequests = newNumberOfDeleteRequests; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.COMPONENT_CLASS__NUMBER_OF_DELETE_REQUESTS, oldNumberOfDeleteRequests, numberOfDeleteRequests)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ComponentPackage.COMPONENT_CLASS__APIS: + return ((InternalEList)getApis()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ComponentPackage.COMPONENT_CLASS__APIS: + return getApis(); + case ComponentPackage.COMPONENT_CLASS__NUMBER_OF_RESOURCES: + return getNumberOfResources(); + case ComponentPackage.COMPONENT_CLASS__NUMBER_OF_UPDATE_REQUESTS: + return getNumberOfUpdateRequests(); + case ComponentPackage.COMPONENT_CLASS__NUMBER_OF_CREATE_REQUESTS: + return getNumberOfCreateRequests(); + case ComponentPackage.COMPONENT_CLASS__NUMBER_OF_DELETE_REQUESTS: + return getNumberOfDeleteRequests(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ComponentPackage.COMPONENT_CLASS__APIS: + getApis().clear(); + getApis().addAll((Collection)newValue); + return; + case ComponentPackage.COMPONENT_CLASS__NUMBER_OF_RESOURCES: + setNumberOfResources((LongMetricAttribute)newValue); + return; + case ComponentPackage.COMPONENT_CLASS__NUMBER_OF_UPDATE_REQUESTS: + setNumberOfUpdateRequests((IncreasingULongMetricAttribute)newValue); + return; + case ComponentPackage.COMPONENT_CLASS__NUMBER_OF_CREATE_REQUESTS: + setNumberOfCreateRequests((IncreasingULongMetricAttribute)newValue); + return; + case ComponentPackage.COMPONENT_CLASS__NUMBER_OF_DELETE_REQUESTS: + setNumberOfDeleteRequests((IncreasingULongMetricAttribute)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ComponentPackage.COMPONENT_CLASS__APIS: + getApis().clear(); + return; + case ComponentPackage.COMPONENT_CLASS__NUMBER_OF_RESOURCES: + setNumberOfResources(NUMBER_OF_RESOURCES_EDEFAULT); + return; + case ComponentPackage.COMPONENT_CLASS__NUMBER_OF_UPDATE_REQUESTS: + setNumberOfUpdateRequests(NUMBER_OF_UPDATE_REQUESTS_EDEFAULT); + return; + case ComponentPackage.COMPONENT_CLASS__NUMBER_OF_CREATE_REQUESTS: + setNumberOfCreateRequests(NUMBER_OF_CREATE_REQUESTS_EDEFAULT); + return; + case ComponentPackage.COMPONENT_CLASS__NUMBER_OF_DELETE_REQUESTS: + setNumberOfDeleteRequests(NUMBER_OF_DELETE_REQUESTS_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ComponentPackage.COMPONENT_CLASS__APIS: + return apis != null && !apis.isEmpty(); + case ComponentPackage.COMPONENT_CLASS__NUMBER_OF_RESOURCES: + return NUMBER_OF_RESOURCES_EDEFAULT == null ? numberOfResources != null : !NUMBER_OF_RESOURCES_EDEFAULT.equals(numberOfResources); + case ComponentPackage.COMPONENT_CLASS__NUMBER_OF_UPDATE_REQUESTS: + return NUMBER_OF_UPDATE_REQUESTS_EDEFAULT == null ? numberOfUpdateRequests != null : !NUMBER_OF_UPDATE_REQUESTS_EDEFAULT.equals(numberOfUpdateRequests); + case ComponentPackage.COMPONENT_CLASS__NUMBER_OF_CREATE_REQUESTS: + return NUMBER_OF_CREATE_REQUESTS_EDEFAULT == null ? numberOfCreateRequests != null : !NUMBER_OF_CREATE_REQUESTS_EDEFAULT.equals(numberOfCreateRequests); + case ComponentPackage.COMPONENT_CLASS__NUMBER_OF_DELETE_REQUESTS: + return NUMBER_OF_DELETE_REQUESTS_EDEFAULT == null ? numberOfDeleteRequests != null : !NUMBER_OF_DELETE_REQUESTS_EDEFAULT.equals(numberOfDeleteRequests); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (numberOfResources: "); + result.append(numberOfResources); + result.append(", numberOfUpdateRequests: "); + result.append(numberOfUpdateRequests); + result.append(", numberOfCreateRequests: "); + result.append(numberOfCreateRequests); + result.append(", numberOfDeleteRequests: "); + result.append(numberOfDeleteRequests); + result.append(')'); + return result.toString(); + } + +} //ComponentClassImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ComponentFactoryImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ComponentFactoryImpl.java new file mode 100644 index 0000000..741e1f2 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ComponentFactoryImpl.java @@ -0,0 +1,246 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.component.impl; + +import org.openecomp.ncomp.component.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class ComponentFactoryImpl extends EFactoryImpl implements ComponentFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static ComponentFactory init() { + try { + ComponentFactory theComponentFactory = (ComponentFactory)EPackage.Registry.INSTANCE.getEFactory(ComponentPackage.eNS_URI); + if (theComponentFactory != null) { + return theComponentFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new ComponentFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public ComponentFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case ComponentPackage.COMPONENT: return createComponent(); + case ComponentPackage.COMPONENT_CLASS: return createComponentClass(); + case ComponentPackage.API: return createApi(); + case ComponentPackage.API_REQUEST: return createApiRequest(); + case ComponentPackage.DROOLS_RUNTIME: return createDroolsRuntime(); + case ComponentPackage.DROOLS_RULE: return createDroolsRule(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case ComponentPackage.API_REQUEST_STATUS: + return createApiRequestStatusFromString(eDataType, initialValue); + case ComponentPackage.DROOLS_OBJECT_CHANGE: + return createDroolsObjectChangeFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case ComponentPackage.API_REQUEST_STATUS: + return convertApiRequestStatusToString(eDataType, instanceValue); + case ComponentPackage.DROOLS_OBJECT_CHANGE: + return convertDroolsObjectChangeToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public Component createComponent() { + ComponentImpl component = new ComponentImpl(); + return component; + } + + /** + * + * + * @generated + */ + public ComponentClass createComponentClass() { + ComponentClassImpl componentClass = new ComponentClassImpl(); + return componentClass; + } + + /** + * + * + * @generated + */ + public Api createApi() { + ApiImpl api = new ApiImpl(); + return api; + } + + /** + * + * + * @generated + */ + public ApiRequest createApiRequest() { + ApiRequestImpl apiRequest = new ApiRequestImpl(); + return apiRequest; + } + + /** + * + * + * @generated + */ + public DroolsRuntime createDroolsRuntime() { + DroolsRuntimeImpl droolsRuntime = new DroolsRuntimeImpl(); + return droolsRuntime; + } + + /** + * + * + * @generated + */ + public DroolsRule createDroolsRule() { + DroolsRuleImpl droolsRule = new DroolsRuleImpl(); + return droolsRule; + } + + /** + * + * + * @generated + */ + public ApiRequestStatus createApiRequestStatusFromString(EDataType eDataType, String initialValue) { + ApiRequestStatus result = ApiRequestStatus.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertApiRequestStatusToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public DroolsObjectChange createDroolsObjectChangeFromString(EDataType eDataType, String initialValue) { + DroolsObjectChange result = DroolsObjectChange.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertDroolsObjectChangeToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public ComponentPackage getComponentPackage() { + return (ComponentPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static ComponentPackage getPackage() { + return ComponentPackage.eINSTANCE; + } + +} //ComponentFactoryImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ComponentImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ComponentImpl.java new file mode 100644 index 0000000..99013c7 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ComponentImpl.java @@ -0,0 +1,202 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.component.impl; + +import org.openecomp.ncomp.component.Component; +import org.openecomp.ncomp.component.ComponentClass; +import org.openecomp.ncomp.component.ComponentPackage; +import org.openecomp.ncomp.component.DroolsRuntime; +import org.openecomp.ncomp.core.impl.NamedEntityImpl; +import java.util.Collection; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Component'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.component.impl.ComponentImpl#getClasses Classes}
  • + *
  • {@link org.openecomp.ncomp.component.impl.ComponentImpl#getDroolsRuntimes Drools Runtimes}
  • + *
+ *

+ * + * @generated + */ +public class ComponentImpl extends NamedEntityImpl implements Component { + /** + * The cached value of the '{@link #getClasses() Classes}' containment reference list. + * + * + * @see #getClasses() + * @generated + * @ordered + */ + protected EList classes; + /** + * The cached value of the '{@link #getDroolsRuntimes() Drools Runtimes}' containment reference list. + * + * + * @see #getDroolsRuntimes() + * @generated + * @ordered + */ + protected EList droolsRuntimes; + /** + * + * + * @generated + */ + protected ComponentImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ComponentPackage.Literals.COMPONENT; + } + + /** + * + * + * @generated + */ + public EList getClasses() { + if (classes == null) { + classes = new EObjectContainmentEList(ComponentClass.class, this, ComponentPackage.COMPONENT__CLASSES); + } + return classes; + } + + /** + * + * + * @generated + */ + public EList getDroolsRuntimes() { + if (droolsRuntimes == null) { + droolsRuntimes = new EObjectContainmentEList(DroolsRuntime.class, this, ComponentPackage.COMPONENT__DROOLS_RUNTIMES); + } + return droolsRuntimes; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ComponentPackage.COMPONENT__CLASSES: + return ((InternalEList)getClasses()).basicRemove(otherEnd, msgs); + case ComponentPackage.COMPONENT__DROOLS_RUNTIMES: + return ((InternalEList)getDroolsRuntimes()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ComponentPackage.COMPONENT__CLASSES: + return getClasses(); + case ComponentPackage.COMPONENT__DROOLS_RUNTIMES: + return getDroolsRuntimes(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ComponentPackage.COMPONENT__CLASSES: + getClasses().clear(); + getClasses().addAll((Collection)newValue); + return; + case ComponentPackage.COMPONENT__DROOLS_RUNTIMES: + getDroolsRuntimes().clear(); + getDroolsRuntimes().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ComponentPackage.COMPONENT__CLASSES: + getClasses().clear(); + return; + case ComponentPackage.COMPONENT__DROOLS_RUNTIMES: + getDroolsRuntimes().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ComponentPackage.COMPONENT__CLASSES: + return classes != null && !classes.isEmpty(); + case ComponentPackage.COMPONENT__DROOLS_RUNTIMES: + return droolsRuntimes != null && !droolsRuntimes.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ComponentImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ComponentPackageImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ComponentPackageImpl.java new file mode 100644 index 0000000..d745bf4 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/ComponentPackageImpl.java @@ -0,0 +1,601 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.component.impl; + +import org.openecomp.ncomp.component.Api; +import org.openecomp.ncomp.component.ApiRequest; +import org.openecomp.ncomp.component.ApiRequestStatus; +import org.openecomp.ncomp.component.Component; +import org.openecomp.ncomp.component.ComponentClass; +import org.openecomp.ncomp.component.ComponentFactory; +import org.openecomp.ncomp.component.ComponentPackage; +import org.openecomp.ncomp.component.DroolsObjectChange; +import org.openecomp.ncomp.component.DroolsRule; +import org.openecomp.ncomp.component.DroolsRuntime; +import org.openecomp.ncomp.core.CorePackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class ComponentPackageImpl extends EPackageImpl implements ComponentPackage { + /** + * + * + * @generated + */ + private EClass componentEClass = null; + + /** + * + * + * @generated + */ + private EClass componentClassEClass = null; + + /** + * + * + * @generated + */ + private EClass apiEClass = null; + + /** + * + * + * @generated + */ + private EClass apiRequestEClass = null; + + /** + * + * + * @generated + */ + private EClass droolsRuntimeEClass = null; + + /** + * + * + * @generated + */ + private EClass droolsRuleEClass = null; + + /** + * + * + * @generated + */ + private EEnum apiRequestStatusEEnum = null; + + /** + * + * + * @generated + */ + private EEnum droolsObjectChangeEEnum = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.ncomp.component.ComponentPackage#eNS_URI + * @see #init() + * @generated + */ + private ComponentPackageImpl() { + super(eNS_URI, ComponentFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link ComponentPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static ComponentPackage init() { + if (isInited) return (ComponentPackage)EPackage.Registry.INSTANCE.getEPackage(ComponentPackage.eNS_URI); + + // Obtain or create and register package + ComponentPackageImpl theComponentPackage = (ComponentPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ComponentPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ComponentPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + CorePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theComponentPackage.createPackageContents(); + + // Initialize created meta-data + theComponentPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theComponentPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(ComponentPackage.eNS_URI, theComponentPackage); + return theComponentPackage; + } + + /** + * + * + * @generated + */ + public EClass getComponent() { + return componentEClass; + } + + /** + * + * + * @generated + */ + public EReference getComponent_Classes() { + return (EReference)componentEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getComponent_DroolsRuntimes() { + return (EReference)componentEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getComponentClass() { + return componentClassEClass; + } + + /** + * + * + * @generated + */ + public EReference getComponentClass_Apis() { + return (EReference)componentClassEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getComponentClass_NumberOfResources() { + return (EAttribute)componentClassEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getComponentClass_NumberOfUpdateRequests() { + return (EAttribute)componentClassEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getComponentClass_NumberOfCreateRequests() { + return (EAttribute)componentClassEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getComponentClass_NumberOfDeleteRequests() { + return (EAttribute)componentClassEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EClass getApi() { + return apiEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getApi_NumberOfRequests() { + return (EAttribute)apiEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getApi_NumberOfErrorRequests() { + return (EAttribute)apiEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getApi_NumberOfCompletedRequests() { + return (EAttribute)apiEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getApi_OutstandingRequests() { + return (EAttribute)apiEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getApi_LastRequestDuration() { + return (EAttribute)apiEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EOperation getApi__CurrentRequests() { + return apiEClass.getEOperations().get(0); + } + + /** + * + * + * @generated + */ + public EClass getApiRequest() { + return apiRequestEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getApiRequest_ComponentName() { + return (EAttribute)apiRequestEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getApiRequest_ResourcePath() { + return (EAttribute)apiRequestEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getApiRequest_TransactionId() { + return (EAttribute)apiRequestEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getApiRequest_ParentTransactionId() { + return (EAttribute)apiRequestEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getApiRequest_Action() { + return (EAttribute)apiRequestEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getApiRequest_Duration() { + return (EAttribute)apiRequestEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getApiRequest_Status() { + return (EAttribute)apiRequestEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EClass getDroolsRuntime() { + return droolsRuntimeEClass; + } + + /** + * + * + * @generated + */ + public EReference getDroolsRuntime_Rules() { + return (EReference)droolsRuntimeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getDroolsRule() { + return droolsRuleEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDroolsRule_NumberOfFires() { + return (EAttribute)droolsRuleEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EEnum getApiRequestStatus() { + return apiRequestStatusEEnum; + } + + /** + * + * + * @generated + */ + public EEnum getDroolsObjectChange() { + return droolsObjectChangeEEnum; + } + + /** + * + * + * @generated + */ + public ComponentFactory getComponentFactory() { + return (ComponentFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + componentEClass = createEClass(COMPONENT); + createEReference(componentEClass, COMPONENT__CLASSES); + createEReference(componentEClass, COMPONENT__DROOLS_RUNTIMES); + + componentClassEClass = createEClass(COMPONENT_CLASS); + createEReference(componentClassEClass, COMPONENT_CLASS__APIS); + createEAttribute(componentClassEClass, COMPONENT_CLASS__NUMBER_OF_RESOURCES); + createEAttribute(componentClassEClass, COMPONENT_CLASS__NUMBER_OF_UPDATE_REQUESTS); + createEAttribute(componentClassEClass, COMPONENT_CLASS__NUMBER_OF_CREATE_REQUESTS); + createEAttribute(componentClassEClass, COMPONENT_CLASS__NUMBER_OF_DELETE_REQUESTS); + + apiEClass = createEClass(API); + createEAttribute(apiEClass, API__NUMBER_OF_REQUESTS); + createEAttribute(apiEClass, API__NUMBER_OF_ERROR_REQUESTS); + createEAttribute(apiEClass, API__NUMBER_OF_COMPLETED_REQUESTS); + createEAttribute(apiEClass, API__OUTSTANDING_REQUESTS); + createEAttribute(apiEClass, API__LAST_REQUEST_DURATION); + createEOperation(apiEClass, API___CURRENT_REQUESTS); + + apiRequestEClass = createEClass(API_REQUEST); + createEAttribute(apiRequestEClass, API_REQUEST__COMPONENT_NAME); + createEAttribute(apiRequestEClass, API_REQUEST__RESOURCE_PATH); + createEAttribute(apiRequestEClass, API_REQUEST__TRANSACTION_ID); + createEAttribute(apiRequestEClass, API_REQUEST__PARENT_TRANSACTION_ID); + createEAttribute(apiRequestEClass, API_REQUEST__ACTION); + createEAttribute(apiRequestEClass, API_REQUEST__DURATION); + createEAttribute(apiRequestEClass, API_REQUEST__STATUS); + + droolsRuntimeEClass = createEClass(DROOLS_RUNTIME); + createEReference(droolsRuntimeEClass, DROOLS_RUNTIME__RULES); + + droolsRuleEClass = createEClass(DROOLS_RULE); + createEAttribute(droolsRuleEClass, DROOLS_RULE__NUMBER_OF_FIRES); + + // Create enums + apiRequestStatusEEnum = createEEnum(API_REQUEST_STATUS); + droolsObjectChangeEEnum = createEEnum(DROOLS_OBJECT_CHANGE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + componentEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + componentClassEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + apiEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + apiRequestEClass.getESuperTypes().add(theCorePackage.getEvent()); + droolsRuntimeEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + droolsRuleEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + + // Initialize classes, features, and operations; add parameters + initEClass(componentEClass, Component.class, "Component", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getComponent_Classes(), this.getComponentClass(), null, "classes", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getComponent_DroolsRuntimes(), this.getDroolsRuntime(), null, "droolsRuntimes", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(componentClassEClass, ComponentClass.class, "ComponentClass", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getComponentClass_Apis(), this.getApi(), null, "apis", null, 0, -1, ComponentClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getComponentClass_NumberOfResources(), theCorePackage.getLongMetricAttribute(), "numberOfResources", null, 0, 1, ComponentClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getComponentClass_NumberOfUpdateRequests(), theCorePackage.getIncreasingULongMetricAttribute(), "numberOfUpdateRequests", null, 0, 1, ComponentClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getComponentClass_NumberOfCreateRequests(), theCorePackage.getIncreasingULongMetricAttribute(), "numberOfCreateRequests", null, 0, 1, ComponentClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getComponentClass_NumberOfDeleteRequests(), theCorePackage.getIncreasingULongMetricAttribute(), "numberOfDeleteRequests", null, 0, 1, ComponentClass.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(apiEClass, Api.class, "Api", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getApi_NumberOfRequests(), theCorePackage.getIncreasingULongMetricAttribute(), "numberOfRequests", null, 0, 1, Api.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getApi_NumberOfErrorRequests(), theCorePackage.getIncreasingULongMetricAttribute(), "numberOfErrorRequests", null, 0, 1, Api.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getApi_NumberOfCompletedRequests(), theCorePackage.getIncreasingULongMetricAttribute(), "numberOfCompletedRequests", null, 0, 1, Api.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getApi_OutstandingRequests(), theCorePackage.getLongMetricAttribute(), "outstandingRequests", null, 0, 1, Api.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getApi_LastRequestDuration(), theCorePackage.getLongMetricAttribute(), "lastRequestDuration", null, 0, 1, Api.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEOperation(getApi__CurrentRequests(), this.getApiRequest(), "currentRequests", 0, -1, !IS_UNIQUE, IS_ORDERED); + + initEClass(apiRequestEClass, ApiRequest.class, "ApiRequest", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getApiRequest_ComponentName(), theEcorePackage.getEString(), "componentName", null, 0, 1, ApiRequest.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getApiRequest_ResourcePath(), theEcorePackage.getEString(), "resourcePath", null, 0, 1, ApiRequest.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getApiRequest_TransactionId(), theEcorePackage.getEString(), "transactionId", null, 0, 1, ApiRequest.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getApiRequest_ParentTransactionId(), theEcorePackage.getEString(), "parentTransactionId", null, 0, 1, ApiRequest.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getApiRequest_Action(), theEcorePackage.getEString(), "action", null, 0, 1, ApiRequest.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getApiRequest_Duration(), theEcorePackage.getELongObject(), "duration", null, 0, 1, ApiRequest.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getApiRequest_Status(), this.getApiRequestStatus(), "status", null, 0, 1, ApiRequest.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(droolsRuntimeEClass, DroolsRuntime.class, "DroolsRuntime", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getDroolsRuntime_Rules(), this.getDroolsRule(), null, "rules", null, 0, -1, DroolsRuntime.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(droolsRuleEClass, DroolsRule.class, "DroolsRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDroolsRule_NumberOfFires(), theCorePackage.getIncreasingULongMetricAttribute(), "numberOfFires", null, 0, 1, DroolsRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(apiRequestStatusEEnum, ApiRequestStatus.class, "ApiRequestStatus"); + addEEnumLiteral(apiRequestStatusEEnum, ApiRequestStatus.OKAY); + addEEnumLiteral(apiRequestStatusEEnum, ApiRequestStatus.ERROR); + addEEnumLiteral(apiRequestStatusEEnum, ApiRequestStatus.INPROGRESS); + addEEnumLiteral(apiRequestStatusEEnum, ApiRequestStatus.START); + + initEEnum(droolsObjectChangeEEnum, DroolsObjectChange.class, "DroolsObjectChange"); + addEEnumLiteral(droolsObjectChangeEEnum, DroolsObjectChange.INSERTED); + addEEnumLiteral(droolsObjectChangeEEnum, DroolsObjectChange.DELETED); + addEEnumLiteral(droolsObjectChangeEEnum, DroolsObjectChange.UPDATED); + + // Create resource + createResource(eNS_URI); + } + +} //ComponentPackageImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/DroolsRuleImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/DroolsRuleImpl.java new file mode 100644 index 0000000..ba07a54 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/DroolsRuleImpl.java @@ -0,0 +1,187 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.component.impl; + +import org.openecomp.ncomp.component.ComponentPackage; +import org.openecomp.ncomp.component.DroolsRule; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Drools Rule'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.component.impl.DroolsRuleImpl#getNumberOfFires Number Of Fires}
  • + *
+ *

+ * + * @generated + */ +public class DroolsRuleImpl extends NamedEntityImpl implements DroolsRule { + /** + * The default value of the '{@link #getNumberOfFires() Number Of Fires}' attribute. + * + * + * @see #getNumberOfFires() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_OF_FIRES_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNumberOfFires() Number Of Fires}' attribute. + * + * + * @see #getNumberOfFires() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberOfFires = NUMBER_OF_FIRES_EDEFAULT; + + /** + * + * + * @generated + */ + protected DroolsRuleImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ComponentPackage.Literals.DROOLS_RULE; + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getNumberOfFires() { + return numberOfFires; + } + + /** + * + * + * @generated + */ + public void setNumberOfFires(IncreasingULongMetricAttribute newNumberOfFires) { + IncreasingULongMetricAttribute oldNumberOfFires = numberOfFires; + numberOfFires = newNumberOfFires; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ComponentPackage.DROOLS_RULE__NUMBER_OF_FIRES, oldNumberOfFires, numberOfFires)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ComponentPackage.DROOLS_RULE__NUMBER_OF_FIRES: + return getNumberOfFires(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ComponentPackage.DROOLS_RULE__NUMBER_OF_FIRES: + setNumberOfFires((IncreasingULongMetricAttribute)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ComponentPackage.DROOLS_RULE__NUMBER_OF_FIRES: + setNumberOfFires(NUMBER_OF_FIRES_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ComponentPackage.DROOLS_RULE__NUMBER_OF_FIRES: + return NUMBER_OF_FIRES_EDEFAULT == null ? numberOfFires != null : !NUMBER_OF_FIRES_EDEFAULT.equals(numberOfFires); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (numberOfFires: "); + result.append(numberOfFires); + result.append(')'); + return result.toString(); + } + +} //DroolsRuleImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/DroolsRuntimeImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/DroolsRuntimeImpl.java new file mode 100644 index 0000000..e05f51b --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/impl/DroolsRuntimeImpl.java @@ -0,0 +1,167 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.component.impl; + +import org.openecomp.ncomp.component.ComponentPackage; +import org.openecomp.ncomp.component.DroolsRule; +import org.openecomp.ncomp.component.DroolsRuntime; +import org.openecomp.ncomp.core.impl.NamedEntityImpl; +import java.util.Collection; +import org.eclipse.emf.common.notify.NotificationChain; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Drools Runtime'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.component.impl.DroolsRuntimeImpl#getRules Rules}
  • + *
+ *

+ * + * @generated + */ +public class DroolsRuntimeImpl extends NamedEntityImpl implements DroolsRuntime { + /** + * The cached value of the '{@link #getRules() Rules}' containment reference list. + * + * + * @see #getRules() + * @generated + * @ordered + */ + protected EList rules; + + /** + * + * + * @generated + */ + protected DroolsRuntimeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return ComponentPackage.Literals.DROOLS_RUNTIME; + } + + /** + * + * + * @generated + */ + public EList getRules() { + if (rules == null) { + rules = new EObjectContainmentEList(DroolsRule.class, this, ComponentPackage.DROOLS_RUNTIME__RULES); + } + return rules; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case ComponentPackage.DROOLS_RUNTIME__RULES: + return ((InternalEList)getRules()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case ComponentPackage.DROOLS_RUNTIME__RULES: + return getRules(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ComponentPackage.DROOLS_RUNTIME__RULES: + getRules().clear(); + getRules().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ComponentPackage.DROOLS_RUNTIME__RULES: + getRules().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case ComponentPackage.DROOLS_RUNTIME__RULES: + return rules != null && !rules.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //DroolsRuntimeImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/util/ComponentAdapterFactory.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/util/ComponentAdapterFactory.java new file mode 100644 index 0000000..b8eb870 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/util/ComponentAdapterFactory.java @@ -0,0 +1,270 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.component.util; + +import org.openecomp.ncomp.component.*; + +import org.openecomp.ncomp.core.Event; +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.ncomp.component.ComponentPackage + * @generated + */ +public class ComponentAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static ComponentPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public ComponentAdapterFactory() { + if (modelPackage == null) { + modelPackage = ComponentPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected ComponentSwitch modelSwitch = + new ComponentSwitch() { + @Override + public Adapter caseComponent(Component object) { + return createComponentAdapter(); + } + @Override + public Adapter caseComponentClass(ComponentClass object) { + return createComponentClassAdapter(); + } + @Override + public Adapter caseApi(Api object) { + return createApiAdapter(); + } + @Override + public Adapter caseApiRequest(ApiRequest object) { + return createApiRequestAdapter(); + } + @Override + public Adapter caseDroolsRuntime(DroolsRuntime object) { + return createDroolsRuntimeAdapter(); + } + @Override + public Adapter caseDroolsRule(DroolsRule object) { + return createDroolsRuleAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter caseEvent(Event object) { + return createEventAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.component.Component Component}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.component.Component + * @generated + */ + public Adapter createComponentAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.component.ComponentClass Class}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.component.ComponentClass + * @generated + */ + public Adapter createComponentClassAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.component.Api Api}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.component.Api + * @generated + */ + public Adapter createApiAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.component.ApiRequest Api Request}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.component.ApiRequest + * @generated + */ + public Adapter createApiRequestAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.component.DroolsRuntime Drools Runtime}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.component.DroolsRuntime + * @generated + */ + public Adapter createDroolsRuntimeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.component.DroolsRule Drools Rule}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.component.DroolsRule + * @generated + */ + public Adapter createDroolsRuleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.Event Event}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.Event + * @generated + */ + public Adapter createEventAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //ComponentAdapterFactory diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/util/ComponentSwitch.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/util/ComponentSwitch.java new file mode 100644 index 0000000..ba62bce --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/component/util/ComponentSwitch.java @@ -0,0 +1,275 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.component.util; + +import org.openecomp.ncomp.component.*; + +import org.openecomp.ncomp.core.Event; +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.ncomp.component.ComponentPackage + * @generated + */ +public class ComponentSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static ComponentPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public ComponentSwitch() { + if (modelPackage == null) { + modelPackage = ComponentPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case ComponentPackage.COMPONENT: { + Component component = (Component)theEObject; + T result = caseComponent(component); + if (result == null) result = caseNamedEntity(component); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ComponentPackage.COMPONENT_CLASS: { + ComponentClass componentClass = (ComponentClass)theEObject; + T result = caseComponentClass(componentClass); + if (result == null) result = caseNamedEntity(componentClass); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ComponentPackage.API: { + Api api = (Api)theEObject; + T result = caseApi(api); + if (result == null) result = caseNamedEntity(api); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ComponentPackage.API_REQUEST: { + ApiRequest apiRequest = (ApiRequest)theEObject; + T result = caseApiRequest(apiRequest); + if (result == null) result = caseEvent(apiRequest); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ComponentPackage.DROOLS_RUNTIME: { + DroolsRuntime droolsRuntime = (DroolsRuntime)theEObject; + T result = caseDroolsRuntime(droolsRuntime); + if (result == null) result = caseNamedEntity(droolsRuntime); + if (result == null) result = defaultCase(theEObject); + return result; + } + case ComponentPackage.DROOLS_RULE: { + DroolsRule droolsRule = (DroolsRule)theEObject; + T result = caseDroolsRule(droolsRule); + if (result == null) result = caseNamedEntity(droolsRule); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Component'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Component'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseComponent(Component object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Class'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Class'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseComponentClass(ComponentClass object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Api'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Api'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseApi(Api object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Api Request'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Api Request'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseApiRequest(ApiRequest object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Drools Runtime'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Drools Runtime'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDroolsRuntime(DroolsRuntime object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Drools Rule'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Drools Rule'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDroolsRule(DroolsRule object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Event'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Event'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEvent(Event object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //ComponentSwitch diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/.gitignore b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/.gitignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/.gitignore @@ -0,0 +1 @@ + diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/CoreFactory.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/CoreFactory.java new file mode 100644 index 0000000..c3369fd --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/CoreFactory.java @@ -0,0 +1,63 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.ncomp.core.CorePackage + * @generated + */ +public interface CoreFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + CoreFactory eINSTANCE = org.openecomp.ncomp.core.impl.CoreFactoryImpl.init(); + + /** + * Returns a new object of class 'User'. + * + * + * @return a new object of class 'User'. + * @generated + */ + User createUser(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + CorePackage getCorePackage(); + +} //CoreFactory diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/CorePackage.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/CorePackage.java new file mode 100644 index 0000000..7ae2807 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/CorePackage.java @@ -0,0 +1,816 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.ncomp.core.CoreFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/ncomp-core-model/src/main/xcore-gen' basePackage='org.openecomp.ncomp'" + * annotation="http://www.eclipse.org/emf/2011/Xcore ecomp='http://openecomp.org'" + * @generated + */ +public interface CorePackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "core"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.core"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "core"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + CorePackage eINSTANCE = org.openecomp.ncomp.core.impl.CorePackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.impl.NamedEntityImpl Named Entity}' class. + * + * + * @see org.openecomp.ncomp.core.impl.NamedEntityImpl + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getNamedEntity() + * @generated + */ + int NAMED_ENTITY = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int NAMED_ENTITY__NAME = 0; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int NAMED_ENTITY__LAST_POLLED = 1; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int NAMED_ENTITY__LAST_CHANGED = 2; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int NAMED_ENTITY__CREATED = 3; + + /** + * The number of structural features of the 'Named Entity' class. + * + * + * @generated + * @ordered + */ + int NAMED_ENTITY_FEATURE_COUNT = 4; + + /** + * The number of operations of the 'Named Entity' class. + * + * + * @generated + * @ordered + */ + int NAMED_ENTITY_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.impl.EventImpl Event}' class. + * + * + * @see org.openecomp.ncomp.core.impl.EventImpl + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getEvent() + * @generated + */ + int EVENT = 1; + + /** + * The number of structural features of the 'Event' class. + * + * + * @generated + * @ordered + */ + int EVENT_FEATURE_COUNT = 0; + + /** + * The number of operations of the 'Event' class. + * + * + * @generated + * @ordered + */ + int EVENT_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.impl.HasOperationalStateImpl Has Operational State}' class. + * + * + * @see org.openecomp.ncomp.core.impl.HasOperationalStateImpl + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getHasOperationalState() + * @generated + */ + int HAS_OPERATIONAL_STATE = 2; + + /** + * The feature id for the 'Operational State' attribute. + * + * + * @generated + * @ordered + */ + int HAS_OPERATIONAL_STATE__OPERATIONAL_STATE = 0; + + /** + * The number of structural features of the 'Has Operational State' class. + * + * + * @generated + * @ordered + */ + int HAS_OPERATIONAL_STATE_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Has Operational State' class. + * + * + * @generated + * @ordered + */ + int HAS_OPERATIONAL_STATE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.impl.UserImpl User}' class. + * + * + * @see org.openecomp.ncomp.core.impl.UserImpl + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getUser() + * @generated + */ + int USER = 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int USER__NAME = NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int USER__LAST_POLLED = NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int USER__LAST_CHANGED = NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int USER__CREATED = NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Public Key' attribute. + * + * + * @generated + * @ordered + */ + int USER__PUBLIC_KEY = NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Deployment Status' attribute. + * + * + * @generated + * @ordered + */ + int USER__DEPLOYMENT_STATUS = NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'User' class. + * + * + * @generated + * @ordered + */ + int USER_FEATURE_COUNT = NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'User' class. + * + * + * @generated + * @ordered + */ + int USER_OPERATION_COUNT = NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.OperationalState Operational State}' enum. + * + * + * @see org.openecomp.ncomp.core.OperationalState + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getOperationalState() + * @generated + */ + int OPERATIONAL_STATE = 4; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.DeploymentStatus Deployment Status}' enum. + * + * + * @see org.openecomp.ncomp.core.DeploymentStatus + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getDeploymentStatus() + * @generated + */ + int DEPLOYMENT_STATUS = 5; + + /** + * The meta object id for the 'Json Object' data type. + * + * + * @see org.json.JSONObject + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getJsonObject() + * @generated + */ + int JSON_OBJECT = 6; + + /** + * The meta object id for the 'Remote Context' data type. + * + * + * @see org.json.JSONObject + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getRemoteContext() + * @generated + */ + int REMOTE_CONTEXT = 7; + + /** + * The meta object id for the 'Increasing ULong Metric Attribute' data type. + * + * + * @see org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getIncreasingULongMetricAttribute() + * @generated + */ + int INCREASING_ULONG_METRIC_ATTRIBUTE = 8; + + /** + * The meta object id for the 'Long Metric Attribute' data type. + * + * + * @see org.openecomp.ncomp.core.types.metrics.LongMetricAttribute + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getLongMetricAttribute() + * @generated + */ + int LONG_METRIC_ATTRIBUTE = 9; + + /** + * The meta object id for the 'Double Metric Attribute' data type. + * + * + * @see org.openecomp.ncomp.core.types.metrics.DoubleMetricAttribute + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getDoubleMetricAttribute() + * @generated + */ + int DOUBLE_METRIC_ATTRIBUTE = 10; + + /** + * The meta object id for the 'String Metric Attribute' data type. + * + * + * @see org.openecomp.ncomp.core.types.metrics.StringMetricAttribute + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getStringMetricAttribute() + * @generated + */ + int STRING_METRIC_ATTRIBUTE = 11; + + /** + * The meta object id for the 'Date Metric Attribute' data type. + * + * + * @see org.openecomp.ncomp.core.types.metrics.DateMetricAttribute + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getDateMetricAttribute() + * @generated + */ + int DATE_METRIC_ATTRIBUTE = 12; + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * + * @return the meta object for class 'Named Entity'. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + EClass getNamedEntity(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.NamedEntity#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see org.openecomp.ncomp.core.NamedEntity#getName() + * @see #getNamedEntity() + * @generated + */ + EAttribute getNamedEntity_Name(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.NamedEntity#getLastPolled Last Polled}'. + * + * + * @return the meta object for the attribute 'Last Polled'. + * @see org.openecomp.ncomp.core.NamedEntity#getLastPolled() + * @see #getNamedEntity() + * @generated + */ + EAttribute getNamedEntity_LastPolled(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.NamedEntity#getLastChanged Last Changed}'. + * + * + * @return the meta object for the attribute 'Last Changed'. + * @see org.openecomp.ncomp.core.NamedEntity#getLastChanged() + * @see #getNamedEntity() + * @generated + */ + EAttribute getNamedEntity_LastChanged(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.NamedEntity#getCreated Created}'. + * + * + * @return the meta object for the attribute 'Created'. + * @see org.openecomp.ncomp.core.NamedEntity#getCreated() + * @see #getNamedEntity() + * @generated + */ + EAttribute getNamedEntity_Created(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.Event Event}'. + * + * + * @return the meta object for class 'Event'. + * @see org.openecomp.ncomp.core.Event + * @generated + */ + EClass getEvent(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.HasOperationalState Has Operational State}'. + * + * + * @return the meta object for class 'Has Operational State'. + * @see org.openecomp.ncomp.core.HasOperationalState + * @generated + */ + EClass getHasOperationalState(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.HasOperationalState#getOperationalState Operational State}'. + * + * + * @return the meta object for the attribute 'Operational State'. + * @see org.openecomp.ncomp.core.HasOperationalState#getOperationalState() + * @see #getHasOperationalState() + * @generated + */ + EAttribute getHasOperationalState_OperationalState(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.User User}'. + * + * + * @return the meta object for class 'User'. + * @see org.openecomp.ncomp.core.User + * @generated + */ + EClass getUser(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.User#getPublicKey Public Key}'. + * + * + * @return the meta object for the attribute 'Public Key'. + * @see org.openecomp.ncomp.core.User#getPublicKey() + * @see #getUser() + * @generated + */ + EAttribute getUser_PublicKey(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.User#getDeploymentStatus Deployment Status}'. + * + * + * @return the meta object for the attribute 'Deployment Status'. + * @see org.openecomp.ncomp.core.User#getDeploymentStatus() + * @see #getUser() + * @generated + */ + EAttribute getUser_DeploymentStatus(); + + /** + * Returns the meta object for enum '{@link org.openecomp.ncomp.core.OperationalState Operational State}'. + * + * + * @return the meta object for enum 'Operational State'. + * @see org.openecomp.ncomp.core.OperationalState + * @generated + */ + EEnum getOperationalState(); + + /** + * Returns the meta object for enum '{@link org.openecomp.ncomp.core.DeploymentStatus Deployment Status}'. + * + * + * @return the meta object for enum 'Deployment Status'. + * @see org.openecomp.ncomp.core.DeploymentStatus + * @generated + */ + EEnum getDeploymentStatus(); + + /** + * Returns the meta object for data type '{@link org.json.JSONObject Json Object}'. + * + * + * @return the meta object for data type 'Json Object'. + * @see org.json.JSONObject + * @model instanceClass="org.json.JSONObject" + * annotation="http://www.eclipse.org/emf/2002/GenModel create='<%org.json.JSONObject%> _xtrycatchfinallyexpression = null;\ntry\n{\n\t<%org.json.JSONObject%> _xifexpression = null;\n\tboolean _notEquals = (!<%com.google.common.base.Objects%>.equal(it, null));\n\tif (_notEquals)\n\t{\n\t\t_xifexpression = new <%org.json.JSONObject%>(it);\n\t}\n\t_xtrycatchfinallyexpression = _xifexpression;\n}\ncatch (final Throwable _t) {\n\tif (_t instanceof <%java.lang.Exception%>) {\n\t\tfinal <%java.lang.Exception%> e = (<%java.lang.Exception%>)_t;\n\t\tthrow new <%java.lang.RuntimeException%>((((\"Bad JSON String: \" + it) + \" \") + e));\n\t}\n\telse\n\t{\n\t\tthrow <%org.eclipse.xtext.xbase.lib.Exceptions%>.sneakyThrow(_t);\n\t}\n}\nreturn _xtrycatchfinallyexpression;'" + * @generated + */ + EDataType getJsonObject(); + + /** + * Returns the meta object for data type '{@link org.json.JSONObject Remote Context}'. + * + * + * @return the meta object for data type 'Remote Context'. + * @see org.json.JSONObject + * @model instanceClass="org.json.JSONObject" + * annotation="http://www.eclipse.org/emf/2002/GenModel create='<%org.json.JSONObject%> _xtrycatchfinallyexpression = null;\ntry\n{\n\t<%org.json.JSONObject%> _xifexpression = null;\n\tboolean _notEquals = (!<%com.google.common.base.Objects%>.equal(it, null));\n\tif (_notEquals)\n\t{\n\t\t_xifexpression = new <%org.json.JSONObject%>(it);\n\t}\n\t_xtrycatchfinallyexpression = _xifexpression;\n}\ncatch (final Throwable _t) {\n\tif (_t instanceof <%java.lang.Exception%>) {\n\t\tfinal <%java.lang.Exception%> e = (<%java.lang.Exception%>)_t;\n\t\tthrow new <%java.lang.RuntimeException%>((((\"Bad JSON String: \" + it) + \" \") + e));\n\t}\n\telse\n\t{\n\t\tthrow <%org.eclipse.xtext.xbase.lib.Exceptions%>.sneakyThrow(_t);\n\t}\n}\nreturn _xtrycatchfinallyexpression;'" + * @generated + */ + EDataType getRemoteContext(); + + /** + * Returns the meta object for data type '{@link org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute Increasing ULong Metric Attribute}'. + * + * + * @return the meta object for data type 'Increasing ULong Metric Attribute'. + * @see org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute + * @model instanceClass="org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute" + * annotation="http://www.eclipse.org/emf/2002/GenModel convert='try\n{\n\treturn it.toStringValue();\n}\ncatch (final Throwable _t) {\n\tif (_t instanceof <%java.lang.Exception%>) {\n\t\tfinal <%java.lang.Exception%> e = (<%java.lang.Exception%>)_t;\n\t\treturn null;\n\t}\n\telse\n\t{\n\t\tthrow <%org.eclipse.xtext.xbase.lib.Exceptions%>.sneakyThrow(_t);\n\t}\n}'" + * @generated + */ + EDataType getIncreasingULongMetricAttribute(); + + /** + * Returns the meta object for data type '{@link org.openecomp.ncomp.core.types.metrics.LongMetricAttribute Long Metric Attribute}'. + * + * + * @return the meta object for data type 'Long Metric Attribute'. + * @see org.openecomp.ncomp.core.types.metrics.LongMetricAttribute + * @model instanceClass="org.openecomp.ncomp.core.types.metrics.LongMetricAttribute" + * annotation="http://www.eclipse.org/emf/2002/GenModel convert='try\n{\n\treturn it.toStringValue();\n}\ncatch (final Throwable _t) {\n\tif (_t instanceof <%java.lang.Exception%>) {\n\t\tfinal <%java.lang.Exception%> e = (<%java.lang.Exception%>)_t;\n\t\treturn null;\n\t}\n\telse\n\t{\n\t\tthrow <%org.eclipse.xtext.xbase.lib.Exceptions%>.sneakyThrow(_t);\n\t}\n}'" + * @generated + */ + EDataType getLongMetricAttribute(); + + /** + * Returns the meta object for data type '{@link org.openecomp.ncomp.core.types.metrics.DoubleMetricAttribute Double Metric Attribute}'. + * + * + * @return the meta object for data type 'Double Metric Attribute'. + * @see org.openecomp.ncomp.core.types.metrics.DoubleMetricAttribute + * @model instanceClass="org.openecomp.ncomp.core.types.metrics.DoubleMetricAttribute" + * annotation="http://www.eclipse.org/emf/2002/GenModel convert='try\n{\n\treturn it.toStringValue();\n}\ncatch (final Throwable _t) {\n\tif (_t instanceof <%java.lang.Exception%>) {\n\t\tfinal <%java.lang.Exception%> e = (<%java.lang.Exception%>)_t;\n\t\treturn null;\n\t}\n\telse\n\t{\n\t\tthrow <%org.eclipse.xtext.xbase.lib.Exceptions%>.sneakyThrow(_t);\n\t}\n}'" + * @generated + */ + EDataType getDoubleMetricAttribute(); + + /** + * Returns the meta object for data type '{@link org.openecomp.ncomp.core.types.metrics.StringMetricAttribute String Metric Attribute}'. + * + * + * @return the meta object for data type 'String Metric Attribute'. + * @see org.openecomp.ncomp.core.types.metrics.StringMetricAttribute + * @model instanceClass="org.openecomp.ncomp.core.types.metrics.StringMetricAttribute" + * annotation="http://www.eclipse.org/emf/2002/GenModel convert='try\n{\n\treturn it.toStringValue();\n}\ncatch (final Throwable _t) {\n\tif (_t instanceof <%java.lang.Exception%>) {\n\t\tfinal <%java.lang.Exception%> e = (<%java.lang.Exception%>)_t;\n\t\treturn null;\n\t}\n\telse\n\t{\n\t\tthrow <%org.eclipse.xtext.xbase.lib.Exceptions%>.sneakyThrow(_t);\n\t}\n}'" + * @generated + */ + EDataType getStringMetricAttribute(); + + /** + * Returns the meta object for data type '{@link org.openecomp.ncomp.core.types.metrics.DateMetricAttribute Date Metric Attribute}'. + * + * + * @return the meta object for data type 'Date Metric Attribute'. + * @see org.openecomp.ncomp.core.types.metrics.DateMetricAttribute + * @model instanceClass="org.openecomp.ncomp.core.types.metrics.DateMetricAttribute" + * annotation="http://www.eclipse.org/emf/2002/GenModel convert='try\n{\n\treturn it.toStringValue();\n}\ncatch (final Throwable _t) {\n\tif (_t instanceof <%java.lang.Exception%>) {\n\t\tfinal <%java.lang.Exception%> e = (<%java.lang.Exception%>)_t;\n\t\treturn null;\n\t}\n\telse\n\t{\n\t\tthrow <%org.eclipse.xtext.xbase.lib.Exceptions%>.sneakyThrow(_t);\n\t}\n}'" + * @generated + */ + EDataType getDateMetricAttribute(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + CoreFactory getCoreFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.impl.NamedEntityImpl Named Entity}' class. + * + * + * @see org.openecomp.ncomp.core.impl.NamedEntityImpl + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getNamedEntity() + * @generated + */ + EClass NAMED_ENTITY = eINSTANCE.getNamedEntity(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute NAMED_ENTITY__NAME = eINSTANCE.getNamedEntity_Name(); + + /** + * The meta object literal for the 'Last Polled' attribute feature. + * + * + * @generated + */ + EAttribute NAMED_ENTITY__LAST_POLLED = eINSTANCE.getNamedEntity_LastPolled(); + + /** + * The meta object literal for the 'Last Changed' attribute feature. + * + * + * @generated + */ + EAttribute NAMED_ENTITY__LAST_CHANGED = eINSTANCE.getNamedEntity_LastChanged(); + + /** + * The meta object literal for the 'Created' attribute feature. + * + * + * @generated + */ + EAttribute NAMED_ENTITY__CREATED = eINSTANCE.getNamedEntity_Created(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.impl.EventImpl Event}' class. + * + * + * @see org.openecomp.ncomp.core.impl.EventImpl + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getEvent() + * @generated + */ + EClass EVENT = eINSTANCE.getEvent(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.impl.HasOperationalStateImpl Has Operational State}' class. + * + * + * @see org.openecomp.ncomp.core.impl.HasOperationalStateImpl + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getHasOperationalState() + * @generated + */ + EClass HAS_OPERATIONAL_STATE = eINSTANCE.getHasOperationalState(); + + /** + * The meta object literal for the 'Operational State' attribute feature. + * + * + * @generated + */ + EAttribute HAS_OPERATIONAL_STATE__OPERATIONAL_STATE = eINSTANCE.getHasOperationalState_OperationalState(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.impl.UserImpl User}' class. + * + * + * @see org.openecomp.ncomp.core.impl.UserImpl + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getUser() + * @generated + */ + EClass USER = eINSTANCE.getUser(); + + /** + * The meta object literal for the 'Public Key' attribute feature. + * + * + * @generated + */ + EAttribute USER__PUBLIC_KEY = eINSTANCE.getUser_PublicKey(); + + /** + * The meta object literal for the 'Deployment Status' attribute feature. + * + * + * @generated + */ + EAttribute USER__DEPLOYMENT_STATUS = eINSTANCE.getUser_DeploymentStatus(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.OperationalState Operational State}' enum. + * + * + * @see org.openecomp.ncomp.core.OperationalState + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getOperationalState() + * @generated + */ + EEnum OPERATIONAL_STATE = eINSTANCE.getOperationalState(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.DeploymentStatus Deployment Status}' enum. + * + * + * @see org.openecomp.ncomp.core.DeploymentStatus + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getDeploymentStatus() + * @generated + */ + EEnum DEPLOYMENT_STATUS = eINSTANCE.getDeploymentStatus(); + + /** + * The meta object literal for the 'Json Object' data type. + * + * + * @see org.json.JSONObject + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getJsonObject() + * @generated + */ + EDataType JSON_OBJECT = eINSTANCE.getJsonObject(); + + /** + * The meta object literal for the 'Remote Context' data type. + * + * + * @see org.json.JSONObject + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getRemoteContext() + * @generated + */ + EDataType REMOTE_CONTEXT = eINSTANCE.getRemoteContext(); + + /** + * The meta object literal for the 'Increasing ULong Metric Attribute' data type. + * + * + * @see org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getIncreasingULongMetricAttribute() + * @generated + */ + EDataType INCREASING_ULONG_METRIC_ATTRIBUTE = eINSTANCE.getIncreasingULongMetricAttribute(); + + /** + * The meta object literal for the 'Long Metric Attribute' data type. + * + * + * @see org.openecomp.ncomp.core.types.metrics.LongMetricAttribute + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getLongMetricAttribute() + * @generated + */ + EDataType LONG_METRIC_ATTRIBUTE = eINSTANCE.getLongMetricAttribute(); + + /** + * The meta object literal for the 'Double Metric Attribute' data type. + * + * + * @see org.openecomp.ncomp.core.types.metrics.DoubleMetricAttribute + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getDoubleMetricAttribute() + * @generated + */ + EDataType DOUBLE_METRIC_ATTRIBUTE = eINSTANCE.getDoubleMetricAttribute(); + + /** + * The meta object literal for the 'String Metric Attribute' data type. + * + * + * @see org.openecomp.ncomp.core.types.metrics.StringMetricAttribute + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getStringMetricAttribute() + * @generated + */ + EDataType STRING_METRIC_ATTRIBUTE = eINSTANCE.getStringMetricAttribute(); + + /** + * The meta object literal for the 'Date Metric Attribute' data type. + * + * + * @see org.openecomp.ncomp.core.types.metrics.DateMetricAttribute + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getDateMetricAttribute() + * @generated + */ + EDataType DATE_METRIC_ATTRIBUTE = eINSTANCE.getDateMetricAttribute(); + + } + +} //CorePackage diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/DeploymentStatus.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/DeploymentStatus.java new file mode 100644 index 0000000..e7036f3 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/DeploymentStatus.java @@ -0,0 +1,280 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Deployment Status', + * and utility methods for working with them. + * + * @see org.openecomp.ncomp.core.CorePackage#getDeploymentStatus() + * @model + * @generated + */ +public enum DeploymentStatus implements Enumerator { + /** + * The 'UNDEPLOYED' literal object. + * + * + * @see #UNDEPLOYED_VALUE + * @generated + * @ordered + */ + UNDEPLOYED(0, "UNDEPLOYED", "UNDEPLOYED"), + + /** + * The 'DEPLOYED' literal object. + * + * + * @see #DEPLOYED_VALUE + * @generated + * @ordered + */ + DEPLOYED(0, "DEPLOYED", "DEPLOYED"), + + /** + * The 'DEPLOYED PARTIALLY' literal object. + * + * + * @see #DEPLOYED_PARTIALLY_VALUE + * @generated + * @ordered + */ + DEPLOYED_PARTIALLY(0, "DEPLOYED_PARTIALLY", "DEPLOYED_PARTIALLY"), + + /** + * The 'DEPLOYED ERRORS' literal object. + * + * + * @see #DEPLOYED_ERRORS_VALUE + * @generated + * @ordered + */ + DEPLOYED_ERRORS(0, "DEPLOYED_ERRORS", "DEPLOYED_ERRORS"); + + /** + * The 'UNDEPLOYED' literal value. + * + *

+ * If the meaning of 'UNDEPLOYED' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #UNDEPLOYED + * @model + * @generated + * @ordered + */ + public static final int UNDEPLOYED_VALUE = 0; + + /** + * The 'DEPLOYED' literal value. + * + *

+ * If the meaning of 'DEPLOYED' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #DEPLOYED + * @model + * @generated + * @ordered + */ + public static final int DEPLOYED_VALUE = 0; + + /** + * The 'DEPLOYED PARTIALLY' literal value. + * + *

+ * If the meaning of 'DEPLOYED PARTIALLY' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #DEPLOYED_PARTIALLY + * @model + * @generated + * @ordered + */ + public static final int DEPLOYED_PARTIALLY_VALUE = 0; + + /** + * The 'DEPLOYED ERRORS' literal value. + * + *

+ * If the meaning of 'DEPLOYED ERRORS' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #DEPLOYED_ERRORS + * @model + * @generated + * @ordered + */ + public static final int DEPLOYED_ERRORS_VALUE = 0; + + /** + * An array of all the 'Deployment Status' enumerators. + * + * + * @generated + */ + private static final DeploymentStatus[] VALUES_ARRAY = + new DeploymentStatus[] { + UNDEPLOYED, + DEPLOYED, + DEPLOYED_PARTIALLY, + DEPLOYED_ERRORS, + }; + + /** + * A public read-only list of all the 'Deployment Status' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Deployment Status' literal with the specified literal value. + * + * + * @generated + */ + public static DeploymentStatus get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + DeploymentStatus result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Deployment Status' literal with the specified name. + * + * + * @generated + */ + public static DeploymentStatus getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + DeploymentStatus result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Deployment Status' literal with the specified integer value. + * + * + * @generated + */ + public static DeploymentStatus get(int value) { + switch (value) { + case UNDEPLOYED_VALUE: return UNDEPLOYED; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private DeploymentStatus(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //DeploymentStatus diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/Event.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/Event.java new file mode 100644 index 0000000..8a3812b --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/Event.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Event'. + * + * + * + * @see org.openecomp.ncomp.core.CorePackage#getEvent() + * @model abstract="true" + * @generated + */ +public interface Event extends EObject { +} // Event diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/HasOperationalState.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/HasOperationalState.java new file mode 100644 index 0000000..2f58858 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/HasOperationalState.java @@ -0,0 +1,74 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Has Operational State'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.HasOperationalState#getOperationalState Operational State}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.CorePackage#getHasOperationalState() + * @model abstract="true" + * @generated + */ +public interface HasOperationalState extends EObject { + /** + * Returns the value of the 'Operational State' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.OperationalState}. + * + *

+ * If the meaning of the 'Operational State' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Operational State' attribute. + * @see org.openecomp.ncomp.core.OperationalState + * @see #setOperationalState(OperationalState) + * @see org.openecomp.ncomp.core.CorePackage#getHasOperationalState_OperationalState() + * @model unique="false" + * @generated + */ + OperationalState getOperationalState(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.HasOperationalState#getOperationalState Operational State}' attribute. + * + * + * @param value the new value of the 'Operational State' attribute. + * @see org.openecomp.ncomp.core.OperationalState + * @see #getOperationalState() + * @generated + */ + void setOperationalState(OperationalState value); + +} // HasOperationalState diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/LogLevel.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/LogLevel.java new file mode 100644 index 0000000..b25a2a2 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/LogLevel.java @@ -0,0 +1,358 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Log Level', + * and utility methods for working with them. + * + * @see org.openecomp.ncomp.core.CorePackage#getLogLevel() + * @model + * @generated + */ +public enum LogLevel implements Enumerator { + /** + * The 'UNKNOWN' literal object. + * + * + * @see #UNKNOWN_VALUE + * @generated + * @ordered + */ + UNKNOWN(0, "UNKNOWN", "UNKNOWN"), + + /** + * The 'TRACE' literal object. + * + * + * @see #TRACE_VALUE + * @generated + * @ordered + */ + TRACE(0, "TRACE", "TRACE"), + + /** + * The 'DEBUG' literal object. + * + * + * @see #DEBUG_VALUE + * @generated + * @ordered + */ + DEBUG(0, "DEBUG", "DEBUG"), + + /** + * The 'INFO' literal object. + * + * + * @see #INFO_VALUE + * @generated + * @ordered + */ + INFO(0, "INFO", "INFO"), + + /** + * The 'WARN' literal object. + * + * + * @see #WARN_VALUE + * @generated + * @ordered + */ + WARN(0, "WARN", "WARN"), + + /** + * The 'ERROR' literal object. + * + * + * @see #ERROR_VALUE + * @generated + * @ordered + */ + ERROR(0, "ERROR", "ERROR"), + + /** + * The 'FATAL' literal object. + * + * + * @see #FATAL_VALUE + * @generated + * @ordered + */ + FATAL(0, "FATAL", "FATAL"); + + /** + * The 'UNKNOWN' literal value. + * + *

+ * If the meaning of 'UNKNOWN' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #UNKNOWN + * @model + * @generated + * @ordered + */ + public static final int UNKNOWN_VALUE = 0; + + /** + * The 'TRACE' literal value. + * + *

+ * If the meaning of 'TRACE' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #TRACE + * @model + * @generated + * @ordered + */ + public static final int TRACE_VALUE = 0; + + /** + * The 'DEBUG' literal value. + * + *

+ * If the meaning of 'DEBUG' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #DEBUG + * @model + * @generated + * @ordered + */ + public static final int DEBUG_VALUE = 0; + + /** + * The 'INFO' literal value. + * + *

+ * If the meaning of 'INFO' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #INFO + * @model + * @generated + * @ordered + */ + public static final int INFO_VALUE = 0; + + /** + * The 'WARN' literal value. + * + *

+ * If the meaning of 'WARN' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #WARN + * @model + * @generated + * @ordered + */ + public static final int WARN_VALUE = 0; + + /** + * The 'ERROR' literal value. + * + *

+ * If the meaning of 'ERROR' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #ERROR + * @model + * @generated + * @ordered + */ + public static final int ERROR_VALUE = 0; + + /** + * The 'FATAL' literal value. + * + *

+ * If the meaning of 'FATAL' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #FATAL + * @model + * @generated + * @ordered + */ + public static final int FATAL_VALUE = 0; + + /** + * An array of all the 'Log Level' enumerators. + * + * + * @generated + */ + private static final LogLevel[] VALUES_ARRAY = + new LogLevel[] { + UNKNOWN, + TRACE, + DEBUG, + INFO, + WARN, + ERROR, + FATAL, + }; + + /** + * A public read-only list of all the 'Log Level' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Log Level' literal with the specified literal value. + * + * + * @generated + */ + public static LogLevel get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + LogLevel result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Log Level' literal with the specified name. + * + * + * @generated + */ + public static LogLevel getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + LogLevel result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Log Level' literal with the specified integer value. + * + * + * @generated + */ + public static LogLevel get(int value) { + switch (value) { + case UNKNOWN_VALUE: return UNKNOWN; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private LogLevel(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //LogLevel diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/LogSeverity.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/LogSeverity.java new file mode 100644 index 0000000..609579f --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/LogSeverity.java @@ -0,0 +1,306 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Log Severity', + * and utility methods for working with them. + * + * @see org.openecomp.ncomp.core.CorePackage#getLogSeverity() + * @model + * @generated + */ +public enum LogSeverity implements Enumerator { + /** + * The 'UNKNOWN' literal object. + * + * + * @see #UNKNOWN_VALUE + * @generated + * @ordered + */ + UNKNOWN(0, "UNKNOWN", "UNKNOWN"), + + /** + * The 'SEV1' literal object. + * + * + * @see #SEV1_VALUE + * @generated + * @ordered + */ + SEV1(0, "SEV1", "SEV1"), + + /** + * The 'SEV2' literal object. + * + * + * @see #SEV2_VALUE + * @generated + * @ordered + */ + SEV2(0, "SEV2", "SEV2"), + + /** + * The 'SEV3' literal object. + * + * + * @see #SEV3_VALUE + * @generated + * @ordered + */ + SEV3(0, "SEV3", "SEV3"), + + /** + * The 'SEV4' literal object. + * + * + * @see #SEV4_VALUE + * @generated + * @ordered + */ + SEV4(0, "SEV4", "SEV4"); + + /** + * The 'UNKNOWN' literal value. + * + *

+ * If the meaning of 'UNKNOWN' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #UNKNOWN + * @model + * @generated + * @ordered + */ + public static final int UNKNOWN_VALUE = 0; + + /** + * The 'SEV1' literal value. + * + *

+ * If the meaning of 'SEV1' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #SEV1 + * @model + * @generated + * @ordered + */ + public static final int SEV1_VALUE = 0; + + /** + * The 'SEV2' literal value. + * + *

+ * If the meaning of 'SEV2' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #SEV2 + * @model + * @generated + * @ordered + */ + public static final int SEV2_VALUE = 0; + + /** + * The 'SEV3' literal value. + * + *

+ * If the meaning of 'SEV3' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #SEV3 + * @model + * @generated + * @ordered + */ + public static final int SEV3_VALUE = 0; + + /** + * The 'SEV4' literal value. + * + *

+ * If the meaning of 'SEV4' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #SEV4 + * @model + * @generated + * @ordered + */ + public static final int SEV4_VALUE = 0; + + /** + * An array of all the 'Log Severity' enumerators. + * + * + * @generated + */ + private static final LogSeverity[] VALUES_ARRAY = + new LogSeverity[] { + UNKNOWN, + SEV1, + SEV2, + SEV3, + SEV4, + }; + + /** + * A public read-only list of all the 'Log Severity' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Log Severity' literal with the specified literal value. + * + * + * @generated + */ + public static LogSeverity get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + LogSeverity result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Log Severity' literal with the specified name. + * + * + * @generated + */ + public static LogSeverity getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + LogSeverity result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Log Severity' literal with the specified integer value. + * + * + * @generated + */ + public static LogSeverity get(int value) { + switch (value) { + case UNKNOWN_VALUE: return UNKNOWN; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private LogSeverity(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //LogSeverity diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/NamedEntity.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/NamedEntity.java new file mode 100644 index 0000000..6e1128e --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/NamedEntity.java @@ -0,0 +1,155 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core; + +import java.util.Date; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Named Entity'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.NamedEntity#getName Name}
  • + *
  • {@link org.openecomp.ncomp.core.NamedEntity#getLastPolled Last Polled}
  • + *
  • {@link org.openecomp.ncomp.core.NamedEntity#getLastChanged Last Changed}
  • + *
  • {@link org.openecomp.ncomp.core.NamedEntity#getCreated Created}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.CorePackage#getNamedEntity() + * @model abstract="true" + * @generated + */ +public interface NamedEntity extends EObject { + /** + * Returns the value of the 'Name' attribute. + * + *

+ * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see org.openecomp.ncomp.core.CorePackage#getNamedEntity_Name() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.NamedEntity#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the 'Last Polled' attribute. + * + *

+ * If the meaning of the 'Last Polled' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Last Polled' attribute. + * @see #setLastPolled(Date) + * @see org.openecomp.ncomp.core.CorePackage#getNamedEntity_LastPolled() + * @model unique="false" + * @generated + */ + Date getLastPolled(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.NamedEntity#getLastPolled Last Polled}' attribute. + * + * + * @param value the new value of the 'Last Polled' attribute. + * @see #getLastPolled() + * @generated + */ + void setLastPolled(Date value); + + /** + * Returns the value of the 'Last Changed' attribute. + * + *

+ * If the meaning of the 'Last Changed' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Last Changed' attribute. + * @see #setLastChanged(Date) + * @see org.openecomp.ncomp.core.CorePackage#getNamedEntity_LastChanged() + * @model unique="false" + * @generated + */ + Date getLastChanged(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.NamedEntity#getLastChanged Last Changed}' attribute. + * + * + * @param value the new value of the 'Last Changed' attribute. + * @see #getLastChanged() + * @generated + */ + void setLastChanged(Date value); + + /** + * Returns the value of the 'Created' attribute. + * + *

+ * If the meaning of the 'Created' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Created' attribute. + * @see #setCreated(Date) + * @see org.openecomp.ncomp.core.CorePackage#getNamedEntity_Created() + * @model unique="false" + * @generated + */ + Date getCreated(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.NamedEntity#getCreated Created}' attribute. + * + * + * @param value the new value of the 'Created' attribute. + * @see #getCreated() + * @generated + */ + void setCreated(Date value); + +} // NamedEntity diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/OperationalState.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/OperationalState.java new file mode 100644 index 0000000..ca4406e --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/OperationalState.java @@ -0,0 +1,228 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Operational State', + * and utility methods for working with them. + * + * @see org.openecomp.ncomp.core.CorePackage#getOperationalState() + * @model + * @generated + */ +public enum OperationalState implements Enumerator { + /** + * The 'OPERATIONAL' literal object. + * + * + * @see #OPERATIONAL_VALUE + * @generated + * @ordered + */ + OPERATIONAL(0, "OPERATIONAL", "OPERATIONAL"), + + /** + * The 'SUSPENDED' literal object. + * + * + * @see #SUSPENDED_VALUE + * @generated + * @ordered + */ + SUSPENDED(0, "SUSPENDED", "SUSPENDED"); + + /** + * The 'OPERATIONAL' literal value. + * + *

+ * If the meaning of 'OPERATIONAL' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #OPERATIONAL + * @model + * @generated + * @ordered + */ + public static final int OPERATIONAL_VALUE = 0; + + /** + * The 'SUSPENDED' literal value. + * + *

+ * If the meaning of 'SUSPENDED' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #SUSPENDED + * @model + * @generated + * @ordered + */ + public static final int SUSPENDED_VALUE = 0; + + /** + * An array of all the 'Operational State' enumerators. + * + * + * @generated + */ + private static final OperationalState[] VALUES_ARRAY = + new OperationalState[] { + OPERATIONAL, + SUSPENDED, + }; + + /** + * A public read-only list of all the 'Operational State' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Operational State' literal with the specified literal value. + * + * + * @generated + */ + public static OperationalState get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + OperationalState result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Operational State' literal with the specified name. + * + * + * @generated + */ + public static OperationalState getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + OperationalState result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Operational State' literal with the specified integer value. + * + * + * @generated + */ + public static OperationalState get(int value) { + switch (value) { + case OPERATIONAL_VALUE: return OPERATIONAL; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private OperationalState(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //OperationalState diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/User.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/User.java new file mode 100644 index 0000000..cdff24a --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/User.java @@ -0,0 +1,100 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core; + + +/** + * + * A representation of the model object 'User'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.User#getPublicKey Public Key}
  • + *
  • {@link org.openecomp.ncomp.core.User#getDeploymentStatus Deployment Status}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.CorePackage#getUser() + * @model + * @generated + */ +public interface User extends NamedEntity { + /** + * Returns the value of the 'Public Key' attribute. + * + *

+ * If the meaning of the 'Public Key' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Public Key' attribute. + * @see #setPublicKey(String) + * @see org.openecomp.ncomp.core.CorePackage#getUser_PublicKey() + * @model unique="false" + * @generated + */ + String getPublicKey(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.User#getPublicKey Public Key}' attribute. + * + * + * @param value the new value of the 'Public Key' attribute. + * @see #getPublicKey() + * @generated + */ + void setPublicKey(String value); + + /** + * Returns the value of the 'Deployment Status' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.DeploymentStatus}. + * + *

+ * If the meaning of the 'Deployment Status' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Deployment Status' attribute. + * @see org.openecomp.ncomp.core.DeploymentStatus + * @see #setDeploymentStatus(DeploymentStatus) + * @see org.openecomp.ncomp.core.CorePackage#getUser_DeploymentStatus() + * @model unique="false" + * @generated + */ + DeploymentStatus getDeploymentStatus(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.User#getDeploymentStatus Deployment Status}' attribute. + * + * + * @param value the new value of the 'Deployment Status' attribute. + * @see org.openecomp.ncomp.core.DeploymentStatus + * @see #getDeploymentStatus() + * @generated + */ + void setDeploymentStatus(DeploymentStatus value); + +} // User diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/Alert.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/Alert.java new file mode 100644 index 0000000..aba8882 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/Alert.java @@ -0,0 +1,160 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.alerts; + +import org.openecomp.ncomp.core.HasOperationalState; +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.logs.LogSeverity; + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +/** + * + * A representation of the model object 'Alert'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.alerts.Alert#getSeverity Severity}
  • + *
  • {@link org.openecomp.ncomp.core.alerts.Alert#getDampingRule Damping Rule}
  • + *
  • {@link org.openecomp.ncomp.core.alerts.Alert#getNumAlerts Num Alerts}
  • + *
  • {@link org.openecomp.ncomp.core.alerts.Alert#getNumAlertsSuppressed Num Alerts Suppressed}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getAlert() + * @model abstract="true" + * @generated + */ +public interface Alert extends NamedEntity, HasOperationalState { + /** + * Returns the value of the 'Severity' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.logs.LogSeverity}. + * + *

+ * If the meaning of the 'Severity' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Severity' attribute. + * @see org.openecomp.ncomp.core.logs.LogSeverity + * @see #setSeverity(LogSeverity) + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getAlert_Severity() + * @model unique="false" + * @generated + */ + LogSeverity getSeverity(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.alerts.Alert#getSeverity Severity}' attribute. + * + * + * @param value the new value of the 'Severity' attribute. + * @see org.openecomp.ncomp.core.logs.LogSeverity + * @see #getSeverity() + * @generated + */ + void setSeverity(LogSeverity value); + + /** + * Returns the value of the 'Damping Rule' containment reference. + * + *

+ * If the meaning of the 'Damping Rule' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Damping Rule' containment reference. + * @see #setDampingRule(DampingRule) + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getAlert_DampingRule() + * @model containment="true" + * @generated + */ + DampingRule getDampingRule(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.alerts.Alert#getDampingRule Damping Rule}' containment reference. + * + * + * @param value the new value of the 'Damping Rule' containment reference. + * @see #getDampingRule() + * @generated + */ + void setDampingRule(DampingRule value); + + /** + * Returns the value of the 'Num Alerts' attribute. + * + *

+ * If the meaning of the 'Num Alerts' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Num Alerts' attribute. + * @see #setNumAlerts(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getAlert_NumAlerts() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * @generated + */ + IncreasingULongMetricAttribute getNumAlerts(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.alerts.Alert#getNumAlerts Num Alerts}' attribute. + * + * + * @param value the new value of the 'Num Alerts' attribute. + * @see #getNumAlerts() + * @generated + */ + void setNumAlerts(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the 'Num Alerts Suppressed' attribute. + * + *

+ * If the meaning of the 'Num Alerts Suppressed' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Num Alerts Suppressed' attribute. + * @see #setNumAlertsSuppressed(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getAlert_NumAlertsSuppressed() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * @generated + */ + IncreasingULongMetricAttribute getNumAlertsSuppressed(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.alerts.Alert#getNumAlertsSuppressed Num Alerts Suppressed}' attribute. + * + * + * @param value the new value of the 'Num Alerts Suppressed' attribute. + * @see #getNumAlertsSuppressed() + * @generated + */ + void setNumAlertsSuppressed(IncreasingULongMetricAttribute value); + +} // Alert diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/AlertContainer.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/AlertContainer.java new file mode 100644 index 0000000..d23eeca --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/AlertContainer.java @@ -0,0 +1,90 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.alerts; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Alert Container'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.alerts.AlertContainer#getAlerts Alerts}
  • + *
  • {@link org.openecomp.ncomp.core.alerts.AlertContainer#getAlertingTemplate Alerting Template}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getAlertContainer() + * @model abstract="true" + * @generated + */ +public interface AlertContainer extends EObject { + /** + * Returns the value of the 'Alerts' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.alerts.Alert}. + * + *

+ * If the meaning of the 'Alerts' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Alerts' containment reference list. + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getAlertContainer_Alerts() + * @model containment="true" + * @generated + */ + EList getAlerts(); + + /** + * Returns the value of the 'Alerting Template' reference. + * + *

+ * If the meaning of the 'Alerting Template' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Alerting Template' reference. + * @see #setAlertingTemplate(AlertingTemplate) + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getAlertContainer_AlertingTemplate() + * @model + * @generated + */ + AlertingTemplate getAlertingTemplate(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.alerts.AlertContainer#getAlertingTemplate Alerting Template}' reference. + * + * + * @param value the new value of the 'Alerting Template' reference. + * @see #getAlertingTemplate() + * @generated + */ + void setAlertingTemplate(AlertingTemplate value); + +} // AlertContainer diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/AlertingTemplate.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/AlertingTemplate.java new file mode 100644 index 0000000..6567166 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/AlertingTemplate.java @@ -0,0 +1,63 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.alerts; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Alerting Template'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.alerts.AlertingTemplate#getAlerts Alerts}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getAlertingTemplate() + * @model + * @generated + */ +public interface AlertingTemplate extends NamedEntity { + /** + * Returns the value of the 'Alerts' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.alerts.Alert}. + * + *

+ * If the meaning of the 'Alerts' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Alerts' containment reference list. + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getAlertingTemplate_Alerts() + * @model containment="true" + * @generated + */ + EList getAlerts(); + +} // AlertingTemplate diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/AlertsFactory.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/AlertsFactory.java new file mode 100644 index 0000000..9e13b9d --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/AlertsFactory.java @@ -0,0 +1,81 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.alerts; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.ncomp.core.alerts.AlertsPackage + * @generated + */ +public interface AlertsFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + AlertsFactory eINSTANCE = org.openecomp.ncomp.core.alerts.impl.AlertsFactoryImpl.init(); + + /** + * Returns a new object of class 'Threshold Alert'. + * + * + * @return a new object of class 'Threshold Alert'. + * @generated + */ + ThresholdAlert createThresholdAlert(); + + /** + * Returns a new object of class 'Alerting Template'. + * + * + * @return a new object of class 'Alerting Template'. + * @generated + */ + AlertingTemplate createAlertingTemplate(); + + /** + * Returns a new object of class 'Max Alert Per Interval'. + * + * + * @return a new object of class 'Max Alert Per Interval'. + * @generated + */ + MaxAlertPerInterval createMaxAlertPerInterval(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + AlertsPackage getAlertsPackage(); + +} //AlertsFactory diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/AlertsPackage.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/AlertsPackage.java new file mode 100644 index 0000000..cd1cc4d --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/AlertsPackage.java @@ -0,0 +1,951 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.alerts; + +import org.openecomp.ncomp.core.CorePackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.ncomp.core.alerts.AlertsFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/ncomp-core-model/src/main/xcore-gen' basePackage='org.openecomp.ncomp.core'" + * @generated + */ +public interface AlertsPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "alerts"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.core.alerts"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "alerts"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + AlertsPackage eINSTANCE = org.openecomp.ncomp.core.alerts.impl.AlertsPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.alerts.impl.AlertImpl Alert}' class. + * + * + * @see org.openecomp.ncomp.core.alerts.impl.AlertImpl + * @see org.openecomp.ncomp.core.alerts.impl.AlertsPackageImpl#getAlert() + * @generated + */ + int ALERT = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int ALERT__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int ALERT__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int ALERT__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int ALERT__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Operational State' attribute. + * + * + * @generated + * @ordered + */ + int ALERT__OPERATIONAL_STATE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Severity' attribute. + * + * + * @generated + * @ordered + */ + int ALERT__SEVERITY = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Damping Rule' containment reference. + * + * + * @generated + * @ordered + */ + int ALERT__DAMPING_RULE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Num Alerts' attribute. + * + * + * @generated + * @ordered + */ + int ALERT__NUM_ALERTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Num Alerts Suppressed' attribute. + * + * + * @generated + * @ordered + */ + int ALERT__NUM_ALERTS_SUPPRESSED = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The number of structural features of the 'Alert' class. + * + * + * @generated + * @ordered + */ + int ALERT_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The number of operations of the 'Alert' class. + * + * + * @generated + * @ordered + */ + int ALERT_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.alerts.impl.ThresholdAlertImpl Threshold Alert}' class. + * + * + * @see org.openecomp.ncomp.core.alerts.impl.ThresholdAlertImpl + * @see org.openecomp.ncomp.core.alerts.impl.AlertsPackageImpl#getThresholdAlert() + * @generated + */ + int THRESHOLD_ALERT = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int THRESHOLD_ALERT__NAME = ALERT__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int THRESHOLD_ALERT__LAST_POLLED = ALERT__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int THRESHOLD_ALERT__LAST_CHANGED = ALERT__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int THRESHOLD_ALERT__CREATED = ALERT__CREATED; + + /** + * The feature id for the 'Operational State' attribute. + * + * + * @generated + * @ordered + */ + int THRESHOLD_ALERT__OPERATIONAL_STATE = ALERT__OPERATIONAL_STATE; + + /** + * The feature id for the 'Severity' attribute. + * + * + * @generated + * @ordered + */ + int THRESHOLD_ALERT__SEVERITY = ALERT__SEVERITY; + + /** + * The feature id for the 'Damping Rule' containment reference. + * + * + * @generated + * @ordered + */ + int THRESHOLD_ALERT__DAMPING_RULE = ALERT__DAMPING_RULE; + + /** + * The feature id for the 'Num Alerts' attribute. + * + * + * @generated + * @ordered + */ + int THRESHOLD_ALERT__NUM_ALERTS = ALERT__NUM_ALERTS; + + /** + * The feature id for the 'Num Alerts Suppressed' attribute. + * + * + * @generated + * @ordered + */ + int THRESHOLD_ALERT__NUM_ALERTS_SUPPRESSED = ALERT__NUM_ALERTS_SUPPRESSED; + + /** + * The feature id for the 'Metric Name' attribute. + * + * + * @generated + * @ordered + */ + int THRESHOLD_ALERT__METRIC_NAME = ALERT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Lower Bound' attribute. + * + * + * @generated + * @ordered + */ + int THRESHOLD_ALERT__LOWER_BOUND = ALERT_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Upper Bound' attribute. + * + * + * @generated + * @ordered + */ + int THRESHOLD_ALERT__UPPER_BOUND = ALERT_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Duration' attribute. + * + * + * @generated + * @ordered + */ + int THRESHOLD_ALERT__DURATION = ALERT_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Max Delay' attribute. + * + * + * @generated + * @ordered + */ + int THRESHOLD_ALERT__MAX_DELAY = ALERT_FEATURE_COUNT + 4; + + /** + * The number of structural features of the 'Threshold Alert' class. + * + * + * @generated + * @ordered + */ + int THRESHOLD_ALERT_FEATURE_COUNT = ALERT_FEATURE_COUNT + 5; + + /** + * The number of operations of the 'Threshold Alert' class. + * + * + * @generated + * @ordered + */ + int THRESHOLD_ALERT_OPERATION_COUNT = ALERT_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.alerts.impl.AlertContainerImpl Alert Container}' class. + * + * + * @see org.openecomp.ncomp.core.alerts.impl.AlertContainerImpl + * @see org.openecomp.ncomp.core.alerts.impl.AlertsPackageImpl#getAlertContainer() + * @generated + */ + int ALERT_CONTAINER = 2; + + /** + * The feature id for the 'Alerts' containment reference list. + * + * + * @generated + * @ordered + */ + int ALERT_CONTAINER__ALERTS = 0; + + /** + * The feature id for the 'Alerting Template' reference. + * + * + * @generated + * @ordered + */ + int ALERT_CONTAINER__ALERTING_TEMPLATE = 1; + + /** + * The number of structural features of the 'Alert Container' class. + * + * + * @generated + * @ordered + */ + int ALERT_CONTAINER_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Alert Container' class. + * + * + * @generated + * @ordered + */ + int ALERT_CONTAINER_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.alerts.impl.AlertingTemplateImpl Alerting Template}' class. + * + * + * @see org.openecomp.ncomp.core.alerts.impl.AlertingTemplateImpl + * @see org.openecomp.ncomp.core.alerts.impl.AlertsPackageImpl#getAlertingTemplate() + * @generated + */ + int ALERTING_TEMPLATE = 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int ALERTING_TEMPLATE__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int ALERTING_TEMPLATE__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int ALERTING_TEMPLATE__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int ALERTING_TEMPLATE__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Alerts' containment reference list. + * + * + * @generated + * @ordered + */ + int ALERTING_TEMPLATE__ALERTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Alerting Template' class. + * + * + * @generated + * @ordered + */ + int ALERTING_TEMPLATE_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Alerting Template' class. + * + * + * @generated + * @ordered + */ + int ALERTING_TEMPLATE_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.alerts.impl.DampingRuleImpl Damping Rule}' class. + * + * + * @see org.openecomp.ncomp.core.alerts.impl.DampingRuleImpl + * @see org.openecomp.ncomp.core.alerts.impl.AlertsPackageImpl#getDampingRule() + * @generated + */ + int DAMPING_RULE = 4; + + /** + * The number of structural features of the 'Damping Rule' class. + * + * + * @generated + * @ordered + */ + int DAMPING_RULE_FEATURE_COUNT = 0; + + /** + * The number of operations of the 'Damping Rule' class. + * + * + * @generated + * @ordered + */ + int DAMPING_RULE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.alerts.impl.MaxAlertPerIntervalImpl Max Alert Per Interval}' class. + * + * + * @see org.openecomp.ncomp.core.alerts.impl.MaxAlertPerIntervalImpl + * @see org.openecomp.ncomp.core.alerts.impl.AlertsPackageImpl#getMaxAlertPerInterval() + * @generated + */ + int MAX_ALERT_PER_INTERVAL = 5; + + /** + * The feature id for the 'Interval' attribute. + * + * + * @generated + * @ordered + */ + int MAX_ALERT_PER_INTERVAL__INTERVAL = DAMPING_RULE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Max Alerts' attribute. + * + * + * @generated + * @ordered + */ + int MAX_ALERT_PER_INTERVAL__MAX_ALERTS = DAMPING_RULE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Max Alert Per Interval' class. + * + * + * @generated + * @ordered + */ + int MAX_ALERT_PER_INTERVAL_FEATURE_COUNT = DAMPING_RULE_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Max Alert Per Interval' class. + * + * + * @generated + * @ordered + */ + int MAX_ALERT_PER_INTERVAL_OPERATION_COUNT = DAMPING_RULE_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.alerts.Alert Alert}'. + * + * + * @return the meta object for class 'Alert'. + * @see org.openecomp.ncomp.core.alerts.Alert + * @generated + */ + EClass getAlert(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.alerts.Alert#getSeverity Severity}'. + * + * + * @return the meta object for the attribute 'Severity'. + * @see org.openecomp.ncomp.core.alerts.Alert#getSeverity() + * @see #getAlert() + * @generated + */ + EAttribute getAlert_Severity(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.core.alerts.Alert#getDampingRule Damping Rule}'. + * + * + * @return the meta object for the containment reference 'Damping Rule'. + * @see org.openecomp.ncomp.core.alerts.Alert#getDampingRule() + * @see #getAlert() + * @generated + */ + EReference getAlert_DampingRule(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.alerts.Alert#getNumAlerts Num Alerts}'. + * + * + * @return the meta object for the attribute 'Num Alerts'. + * @see org.openecomp.ncomp.core.alerts.Alert#getNumAlerts() + * @see #getAlert() + * @generated + */ + EAttribute getAlert_NumAlerts(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.alerts.Alert#getNumAlertsSuppressed Num Alerts Suppressed}'. + * + * + * @return the meta object for the attribute 'Num Alerts Suppressed'. + * @see org.openecomp.ncomp.core.alerts.Alert#getNumAlertsSuppressed() + * @see #getAlert() + * @generated + */ + EAttribute getAlert_NumAlertsSuppressed(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.alerts.ThresholdAlert Threshold Alert}'. + * + * + * @return the meta object for class 'Threshold Alert'. + * @see org.openecomp.ncomp.core.alerts.ThresholdAlert + * @generated + */ + EClass getThresholdAlert(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.alerts.ThresholdAlert#getMetricName Metric Name}'. + * + * + * @return the meta object for the attribute 'Metric Name'. + * @see org.openecomp.ncomp.core.alerts.ThresholdAlert#getMetricName() + * @see #getThresholdAlert() + * @generated + */ + EAttribute getThresholdAlert_MetricName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.alerts.ThresholdAlert#getLowerBound Lower Bound}'. + * + * + * @return the meta object for the attribute 'Lower Bound'. + * @see org.openecomp.ncomp.core.alerts.ThresholdAlert#getLowerBound() + * @see #getThresholdAlert() + * @generated + */ + EAttribute getThresholdAlert_LowerBound(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.alerts.ThresholdAlert#getUpperBound Upper Bound}'. + * + * + * @return the meta object for the attribute 'Upper Bound'. + * @see org.openecomp.ncomp.core.alerts.ThresholdAlert#getUpperBound() + * @see #getThresholdAlert() + * @generated + */ + EAttribute getThresholdAlert_UpperBound(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.alerts.ThresholdAlert#getDuration Duration}'. + * + * + * @return the meta object for the attribute 'Duration'. + * @see org.openecomp.ncomp.core.alerts.ThresholdAlert#getDuration() + * @see #getThresholdAlert() + * @generated + */ + EAttribute getThresholdAlert_Duration(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.alerts.ThresholdAlert#getMaxDelay Max Delay}'. + * + * + * @return the meta object for the attribute 'Max Delay'. + * @see org.openecomp.ncomp.core.alerts.ThresholdAlert#getMaxDelay() + * @see #getThresholdAlert() + * @generated + */ + EAttribute getThresholdAlert_MaxDelay(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.alerts.AlertContainer Alert Container}'. + * + * + * @return the meta object for class 'Alert Container'. + * @see org.openecomp.ncomp.core.alerts.AlertContainer + * @generated + */ + EClass getAlertContainer(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.core.alerts.AlertContainer#getAlerts Alerts}'. + * + * + * @return the meta object for the containment reference list 'Alerts'. + * @see org.openecomp.ncomp.core.alerts.AlertContainer#getAlerts() + * @see #getAlertContainer() + * @generated + */ + EReference getAlertContainer_Alerts(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.ncomp.core.alerts.AlertContainer#getAlertingTemplate Alerting Template}'. + * + * + * @return the meta object for the reference 'Alerting Template'. + * @see org.openecomp.ncomp.core.alerts.AlertContainer#getAlertingTemplate() + * @see #getAlertContainer() + * @generated + */ + EReference getAlertContainer_AlertingTemplate(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.alerts.AlertingTemplate Alerting Template}'. + * + * + * @return the meta object for class 'Alerting Template'. + * @see org.openecomp.ncomp.core.alerts.AlertingTemplate + * @generated + */ + EClass getAlertingTemplate(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.core.alerts.AlertingTemplate#getAlerts Alerts}'. + * + * + * @return the meta object for the containment reference list 'Alerts'. + * @see org.openecomp.ncomp.core.alerts.AlertingTemplate#getAlerts() + * @see #getAlertingTemplate() + * @generated + */ + EReference getAlertingTemplate_Alerts(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.alerts.DampingRule Damping Rule}'. + * + * + * @return the meta object for class 'Damping Rule'. + * @see org.openecomp.ncomp.core.alerts.DampingRule + * @generated + */ + EClass getDampingRule(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.alerts.MaxAlertPerInterval Max Alert Per Interval}'. + * + * + * @return the meta object for class 'Max Alert Per Interval'. + * @see org.openecomp.ncomp.core.alerts.MaxAlertPerInterval + * @generated + */ + EClass getMaxAlertPerInterval(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.alerts.MaxAlertPerInterval#getInterval Interval}'. + * + * + * @return the meta object for the attribute 'Interval'. + * @see org.openecomp.ncomp.core.alerts.MaxAlertPerInterval#getInterval() + * @see #getMaxAlertPerInterval() + * @generated + */ + EAttribute getMaxAlertPerInterval_Interval(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.alerts.MaxAlertPerInterval#getMaxAlerts Max Alerts}'. + * + * + * @return the meta object for the attribute 'Max Alerts'. + * @see org.openecomp.ncomp.core.alerts.MaxAlertPerInterval#getMaxAlerts() + * @see #getMaxAlertPerInterval() + * @generated + */ + EAttribute getMaxAlertPerInterval_MaxAlerts(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + AlertsFactory getAlertsFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.alerts.impl.AlertImpl Alert}' class. + * + * + * @see org.openecomp.ncomp.core.alerts.impl.AlertImpl + * @see org.openecomp.ncomp.core.alerts.impl.AlertsPackageImpl#getAlert() + * @generated + */ + EClass ALERT = eINSTANCE.getAlert(); + + /** + * The meta object literal for the 'Severity' attribute feature. + * + * + * @generated + */ + EAttribute ALERT__SEVERITY = eINSTANCE.getAlert_Severity(); + + /** + * The meta object literal for the 'Damping Rule' containment reference feature. + * + * + * @generated + */ + EReference ALERT__DAMPING_RULE = eINSTANCE.getAlert_DampingRule(); + + /** + * The meta object literal for the 'Num Alerts' attribute feature. + * + * + * @generated + */ + EAttribute ALERT__NUM_ALERTS = eINSTANCE.getAlert_NumAlerts(); + + /** + * The meta object literal for the 'Num Alerts Suppressed' attribute feature. + * + * + * @generated + */ + EAttribute ALERT__NUM_ALERTS_SUPPRESSED = eINSTANCE.getAlert_NumAlertsSuppressed(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.alerts.impl.ThresholdAlertImpl Threshold Alert}' class. + * + * + * @see org.openecomp.ncomp.core.alerts.impl.ThresholdAlertImpl + * @see org.openecomp.ncomp.core.alerts.impl.AlertsPackageImpl#getThresholdAlert() + * @generated + */ + EClass THRESHOLD_ALERT = eINSTANCE.getThresholdAlert(); + + /** + * The meta object literal for the 'Metric Name' attribute feature. + * + * + * @generated + */ + EAttribute THRESHOLD_ALERT__METRIC_NAME = eINSTANCE.getThresholdAlert_MetricName(); + + /** + * The meta object literal for the 'Lower Bound' attribute feature. + * + * + * @generated + */ + EAttribute THRESHOLD_ALERT__LOWER_BOUND = eINSTANCE.getThresholdAlert_LowerBound(); + + /** + * The meta object literal for the 'Upper Bound' attribute feature. + * + * + * @generated + */ + EAttribute THRESHOLD_ALERT__UPPER_BOUND = eINSTANCE.getThresholdAlert_UpperBound(); + + /** + * The meta object literal for the 'Duration' attribute feature. + * + * + * @generated + */ + EAttribute THRESHOLD_ALERT__DURATION = eINSTANCE.getThresholdAlert_Duration(); + + /** + * The meta object literal for the 'Max Delay' attribute feature. + * + * + * @generated + */ + EAttribute THRESHOLD_ALERT__MAX_DELAY = eINSTANCE.getThresholdAlert_MaxDelay(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.alerts.impl.AlertContainerImpl Alert Container}' class. + * + * + * @see org.openecomp.ncomp.core.alerts.impl.AlertContainerImpl + * @see org.openecomp.ncomp.core.alerts.impl.AlertsPackageImpl#getAlertContainer() + * @generated + */ + EClass ALERT_CONTAINER = eINSTANCE.getAlertContainer(); + + /** + * The meta object literal for the 'Alerts' containment reference list feature. + * + * + * @generated + */ + EReference ALERT_CONTAINER__ALERTS = eINSTANCE.getAlertContainer_Alerts(); + + /** + * The meta object literal for the 'Alerting Template' reference feature. + * + * + * @generated + */ + EReference ALERT_CONTAINER__ALERTING_TEMPLATE = eINSTANCE.getAlertContainer_AlertingTemplate(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.alerts.impl.AlertingTemplateImpl Alerting Template}' class. + * + * + * @see org.openecomp.ncomp.core.alerts.impl.AlertingTemplateImpl + * @see org.openecomp.ncomp.core.alerts.impl.AlertsPackageImpl#getAlertingTemplate() + * @generated + */ + EClass ALERTING_TEMPLATE = eINSTANCE.getAlertingTemplate(); + + /** + * The meta object literal for the 'Alerts' containment reference list feature. + * + * + * @generated + */ + EReference ALERTING_TEMPLATE__ALERTS = eINSTANCE.getAlertingTemplate_Alerts(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.alerts.impl.DampingRuleImpl Damping Rule}' class. + * + * + * @see org.openecomp.ncomp.core.alerts.impl.DampingRuleImpl + * @see org.openecomp.ncomp.core.alerts.impl.AlertsPackageImpl#getDampingRule() + * @generated + */ + EClass DAMPING_RULE = eINSTANCE.getDampingRule(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.alerts.impl.MaxAlertPerIntervalImpl Max Alert Per Interval}' class. + * + * + * @see org.openecomp.ncomp.core.alerts.impl.MaxAlertPerIntervalImpl + * @see org.openecomp.ncomp.core.alerts.impl.AlertsPackageImpl#getMaxAlertPerInterval() + * @generated + */ + EClass MAX_ALERT_PER_INTERVAL = eINSTANCE.getMaxAlertPerInterval(); + + /** + * The meta object literal for the 'Interval' attribute feature. + * + * + * @generated + */ + EAttribute MAX_ALERT_PER_INTERVAL__INTERVAL = eINSTANCE.getMaxAlertPerInterval_Interval(); + + /** + * The meta object literal for the 'Max Alerts' attribute feature. + * + * + * @generated + */ + EAttribute MAX_ALERT_PER_INTERVAL__MAX_ALERTS = eINSTANCE.getMaxAlertPerInterval_MaxAlerts(); + + } + +} //AlertsPackage diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/DampingRule.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/DampingRule.java new file mode 100644 index 0000000..c7ec3e2 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/DampingRule.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.alerts; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Damping Rule'. + * + * + * + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getDampingRule() + * @model abstract="true" + * @generated + */ +public interface DampingRule extends EObject { +} // DampingRule diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/MaxAlertPerInterval.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/MaxAlertPerInterval.java new file mode 100644 index 0000000..1623a75 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/MaxAlertPerInterval.java @@ -0,0 +1,98 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.alerts; + + +/** + * + * A representation of the model object 'Max Alert Per Interval'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.alerts.MaxAlertPerInterval#getInterval Interval}
  • + *
  • {@link org.openecomp.ncomp.core.alerts.MaxAlertPerInterval#getMaxAlerts Max Alerts}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getMaxAlertPerInterval() + * @model + * @generated + */ +public interface MaxAlertPerInterval extends DampingRule { + /** + * Returns the value of the 'Interval' attribute. + * + *

+ * If the meaning of the 'Interval' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Interval' attribute. + * @see #setInterval(String) + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getMaxAlertPerInterval_Interval() + * @model unique="false" + * @generated + */ + String getInterval(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.alerts.MaxAlertPerInterval#getInterval Interval}' attribute. + * + * + * @param value the new value of the 'Interval' attribute. + * @see #getInterval() + * @generated + */ + void setInterval(String value); + + /** + * Returns the value of the 'Max Alerts' attribute. + * The default value is "1". + * + *

+ * If the meaning of the 'Max Alerts' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Max Alerts' attribute. + * @see #setMaxAlerts(int) + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getMaxAlertPerInterval_MaxAlerts() + * @model default="1" unique="false" + * @generated + */ + int getMaxAlerts(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.alerts.MaxAlertPerInterval#getMaxAlerts Max Alerts}' attribute. + * + * + * @param value the new value of the 'Max Alerts' attribute. + * @see #getMaxAlerts() + * @generated + */ + void setMaxAlerts(int value); + +} // MaxAlertPerInterval diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/ThresholdAlert.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/ThresholdAlert.java new file mode 100644 index 0000000..b9b3921 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/ThresholdAlert.java @@ -0,0 +1,178 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.alerts; + + +/** + * + * A representation of the model object 'Threshold Alert'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.alerts.ThresholdAlert#getMetricName Metric Name}
  • + *
  • {@link org.openecomp.ncomp.core.alerts.ThresholdAlert#getLowerBound Lower Bound}
  • + *
  • {@link org.openecomp.ncomp.core.alerts.ThresholdAlert#getUpperBound Upper Bound}
  • + *
  • {@link org.openecomp.ncomp.core.alerts.ThresholdAlert#getDuration Duration}
  • + *
  • {@link org.openecomp.ncomp.core.alerts.ThresholdAlert#getMaxDelay Max Delay}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getThresholdAlert() + * @model + * @generated + */ +public interface ThresholdAlert extends Alert { + /** + * Returns the value of the 'Metric Name' attribute. + * + *

+ * If the meaning of the 'Metric Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Metric Name' attribute. + * @see #setMetricName(String) + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getThresholdAlert_MetricName() + * @model unique="false" + * @generated + */ + String getMetricName(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.alerts.ThresholdAlert#getMetricName Metric Name}' attribute. + * + * + * @param value the new value of the 'Metric Name' attribute. + * @see #getMetricName() + * @generated + */ + void setMetricName(String value); + + /** + * Returns the value of the 'Lower Bound' attribute. + * + *

+ * If the meaning of the 'Lower Bound' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Lower Bound' attribute. + * @see #setLowerBound(Double) + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getThresholdAlert_LowerBound() + * @model unique="false" + * @generated + */ + Double getLowerBound(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.alerts.ThresholdAlert#getLowerBound Lower Bound}' attribute. + * + * + * @param value the new value of the 'Lower Bound' attribute. + * @see #getLowerBound() + * @generated + */ + void setLowerBound(Double value); + + /** + * Returns the value of the 'Upper Bound' attribute. + * + *

+ * If the meaning of the 'Upper Bound' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Upper Bound' attribute. + * @see #setUpperBound(Double) + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getThresholdAlert_UpperBound() + * @model unique="false" + * @generated + */ + Double getUpperBound(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.alerts.ThresholdAlert#getUpperBound Upper Bound}' attribute. + * + * + * @param value the new value of the 'Upper Bound' attribute. + * @see #getUpperBound() + * @generated + */ + void setUpperBound(Double value); + + /** + * Returns the value of the 'Duration' attribute. + * + *

+ * If the meaning of the 'Duration' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Duration' attribute. + * @see #setDuration(String) + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getThresholdAlert_Duration() + * @model unique="false" + * @generated + */ + String getDuration(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.alerts.ThresholdAlert#getDuration Duration}' attribute. + * + * + * @param value the new value of the 'Duration' attribute. + * @see #getDuration() + * @generated + */ + void setDuration(String value); + + /** + * Returns the value of the 'Max Delay' attribute. + * + *

+ * If the meaning of the 'Max Delay' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Max Delay' attribute. + * @see #setMaxDelay(String) + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getThresholdAlert_MaxDelay() + * @model unique="false" + * @generated + */ + String getMaxDelay(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.alerts.ThresholdAlert#getMaxDelay Max Delay}' attribute. + * + * + * @param value the new value of the 'Max Delay' attribute. + * @see #getMaxDelay() + * @generated + */ + void setMaxDelay(String value); + +} // ThresholdAlert diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/AlertContainerImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/AlertContainerImpl.java new file mode 100644 index 0000000..109458f --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/AlertContainerImpl.java @@ -0,0 +1,236 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.alerts.impl; + +import org.openecomp.ncomp.core.alerts.Alert; +import org.openecomp.ncomp.core.alerts.AlertContainer; +import org.openecomp.ncomp.core.alerts.AlertingTemplate; +import org.openecomp.ncomp.core.alerts.AlertsPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Alert Container'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.alerts.impl.AlertContainerImpl#getAlerts Alerts}
  • + *
  • {@link org.openecomp.ncomp.core.alerts.impl.AlertContainerImpl#getAlertingTemplate Alerting Template}
  • + *
+ *

+ * + * @generated + */ +public abstract class AlertContainerImpl extends MinimalEObjectImpl.Container implements AlertContainer { + /** + * The cached value of the '{@link #getAlerts() Alerts}' containment reference list. + * + * + * @see #getAlerts() + * @generated + * @ordered + */ + protected EList alerts; + + /** + * The cached value of the '{@link #getAlertingTemplate() Alerting Template}' reference. + * + * + * @see #getAlertingTemplate() + * @generated + * @ordered + */ + protected AlertingTemplate alertingTemplate; + + /** + * + * + * @generated + */ + protected AlertContainerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return AlertsPackage.Literals.ALERT_CONTAINER; + } + + /** + * + * + * @generated + */ + public EList getAlerts() { + if (alerts == null) { + alerts = new EObjectContainmentEList(Alert.class, this, AlertsPackage.ALERT_CONTAINER__ALERTS); + } + return alerts; + } + + /** + * + * + * @generated + */ + public AlertingTemplate getAlertingTemplate() { + if (alertingTemplate != null && alertingTemplate.eIsProxy()) { + InternalEObject oldAlertingTemplate = (InternalEObject)alertingTemplate; + alertingTemplate = (AlertingTemplate)eResolveProxy(oldAlertingTemplate); + if (alertingTemplate != oldAlertingTemplate) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE, oldAlertingTemplate, alertingTemplate)); + } + } + return alertingTemplate; + } + + /** + * + * + * @generated + */ + public AlertingTemplate basicGetAlertingTemplate() { + return alertingTemplate; + } + + /** + * + * + * @generated + */ + public void setAlertingTemplate(AlertingTemplate newAlertingTemplate) { + AlertingTemplate oldAlertingTemplate = alertingTemplate; + alertingTemplate = newAlertingTemplate; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE, oldAlertingTemplate, alertingTemplate)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case AlertsPackage.ALERT_CONTAINER__ALERTS: + return ((InternalEList)getAlerts()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case AlertsPackage.ALERT_CONTAINER__ALERTS: + return getAlerts(); + case AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE: + if (resolve) return getAlertingTemplate(); + return basicGetAlertingTemplate(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case AlertsPackage.ALERT_CONTAINER__ALERTS: + getAlerts().clear(); + getAlerts().addAll((Collection)newValue); + return; + case AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE: + setAlertingTemplate((AlertingTemplate)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case AlertsPackage.ALERT_CONTAINER__ALERTS: + getAlerts().clear(); + return; + case AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE: + setAlertingTemplate((AlertingTemplate)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case AlertsPackage.ALERT_CONTAINER__ALERTS: + return alerts != null && !alerts.isEmpty(); + case AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE: + return alertingTemplate != null; + } + return super.eIsSet(featureID); + } + +} //AlertContainerImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/AlertImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/AlertImpl.java new file mode 100644 index 0000000..0a4ba84 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/AlertImpl.java @@ -0,0 +1,468 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.alerts.impl; + +import org.openecomp.ncomp.core.CorePackage; +import org.openecomp.ncomp.core.HasOperationalState; +import org.openecomp.ncomp.core.OperationalState; + +import org.openecomp.ncomp.core.alerts.Alert; +import org.openecomp.ncomp.core.alerts.AlertsPackage; +import org.openecomp.ncomp.core.alerts.DampingRule; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.core.logs.LogSeverity; + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Alert'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.alerts.impl.AlertImpl#getOperationalState Operational State}
  • + *
  • {@link org.openecomp.ncomp.core.alerts.impl.AlertImpl#getSeverity Severity}
  • + *
  • {@link org.openecomp.ncomp.core.alerts.impl.AlertImpl#getDampingRule Damping Rule}
  • + *
  • {@link org.openecomp.ncomp.core.alerts.impl.AlertImpl#getNumAlerts Num Alerts}
  • + *
  • {@link org.openecomp.ncomp.core.alerts.impl.AlertImpl#getNumAlertsSuppressed Num Alerts Suppressed}
  • + *
+ *

+ * + * @generated + */ +public abstract class AlertImpl extends NamedEntityImpl implements Alert { + /** + * The default value of the '{@link #getOperationalState() Operational State}' attribute. + * + * + * @see #getOperationalState() + * @generated + * @ordered + */ + protected static final OperationalState OPERATIONAL_STATE_EDEFAULT = OperationalState.OPERATIONAL; + + /** + * The cached value of the '{@link #getOperationalState() Operational State}' attribute. + * + * + * @see #getOperationalState() + * @generated + * @ordered + */ + protected OperationalState operationalState = OPERATIONAL_STATE_EDEFAULT; + + /** + * The default value of the '{@link #getSeverity() Severity}' attribute. + * + * + * @see #getSeverity() + * @generated + * @ordered + */ + protected static final LogSeverity SEVERITY_EDEFAULT = LogSeverity.UNKNOWN; + + /** + * The cached value of the '{@link #getSeverity() Severity}' attribute. + * + * + * @see #getSeverity() + * @generated + * @ordered + */ + protected LogSeverity severity = SEVERITY_EDEFAULT; + + /** + * The cached value of the '{@link #getDampingRule() Damping Rule}' containment reference. + * + * + * @see #getDampingRule() + * @generated + * @ordered + */ + protected DampingRule dampingRule; + + /** + * The default value of the '{@link #getNumAlerts() Num Alerts}' attribute. + * + * + * @see #getNumAlerts() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUM_ALERTS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNumAlerts() Num Alerts}' attribute. + * + * + * @see #getNumAlerts() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numAlerts = NUM_ALERTS_EDEFAULT; + + /** + * The default value of the '{@link #getNumAlertsSuppressed() Num Alerts Suppressed}' attribute. + * + * + * @see #getNumAlertsSuppressed() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUM_ALERTS_SUPPRESSED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNumAlertsSuppressed() Num Alerts Suppressed}' attribute. + * + * + * @see #getNumAlertsSuppressed() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numAlertsSuppressed = NUM_ALERTS_SUPPRESSED_EDEFAULT; + + /** + * + * + * @generated + */ + protected AlertImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return AlertsPackage.Literals.ALERT; + } + + /** + * + * + * @generated + */ + public OperationalState getOperationalState() { + return operationalState; + } + + /** + * + * + * @generated + */ + public void setOperationalState(OperationalState newOperationalState) { + OperationalState oldOperationalState = operationalState; + operationalState = newOperationalState == null ? OPERATIONAL_STATE_EDEFAULT : newOperationalState; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AlertsPackage.ALERT__OPERATIONAL_STATE, oldOperationalState, operationalState)); + } + + /** + * + * + * @generated + */ + public LogSeverity getSeverity() { + return severity; + } + + /** + * + * + * @generated + */ + public void setSeverity(LogSeverity newSeverity) { + LogSeverity oldSeverity = severity; + severity = newSeverity == null ? SEVERITY_EDEFAULT : newSeverity; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AlertsPackage.ALERT__SEVERITY, oldSeverity, severity)); + } + + /** + * + * + * @generated + */ + public DampingRule getDampingRule() { + return dampingRule; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetDampingRule(DampingRule newDampingRule, NotificationChain msgs) { + DampingRule oldDampingRule = dampingRule; + dampingRule = newDampingRule; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, AlertsPackage.ALERT__DAMPING_RULE, oldDampingRule, newDampingRule); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setDampingRule(DampingRule newDampingRule) { + if (newDampingRule != dampingRule) { + NotificationChain msgs = null; + if (dampingRule != null) + msgs = ((InternalEObject)dampingRule).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - AlertsPackage.ALERT__DAMPING_RULE, null, msgs); + if (newDampingRule != null) + msgs = ((InternalEObject)newDampingRule).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - AlertsPackage.ALERT__DAMPING_RULE, null, msgs); + msgs = basicSetDampingRule(newDampingRule, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AlertsPackage.ALERT__DAMPING_RULE, newDampingRule, newDampingRule)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getNumAlerts() { + return numAlerts; + } + + /** + * + * + * @generated + */ + public void setNumAlerts(IncreasingULongMetricAttribute newNumAlerts) { + IncreasingULongMetricAttribute oldNumAlerts = numAlerts; + numAlerts = newNumAlerts; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AlertsPackage.ALERT__NUM_ALERTS, oldNumAlerts, numAlerts)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getNumAlertsSuppressed() { + return numAlertsSuppressed; + } + + /** + * + * + * @generated + */ + public void setNumAlertsSuppressed(IncreasingULongMetricAttribute newNumAlertsSuppressed) { + IncreasingULongMetricAttribute oldNumAlertsSuppressed = numAlertsSuppressed; + numAlertsSuppressed = newNumAlertsSuppressed; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AlertsPackage.ALERT__NUM_ALERTS_SUPPRESSED, oldNumAlertsSuppressed, numAlertsSuppressed)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case AlertsPackage.ALERT__DAMPING_RULE: + return basicSetDampingRule(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case AlertsPackage.ALERT__OPERATIONAL_STATE: + return getOperationalState(); + case AlertsPackage.ALERT__SEVERITY: + return getSeverity(); + case AlertsPackage.ALERT__DAMPING_RULE: + return getDampingRule(); + case AlertsPackage.ALERT__NUM_ALERTS: + return getNumAlerts(); + case AlertsPackage.ALERT__NUM_ALERTS_SUPPRESSED: + return getNumAlertsSuppressed(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case AlertsPackage.ALERT__OPERATIONAL_STATE: + setOperationalState((OperationalState)newValue); + return; + case AlertsPackage.ALERT__SEVERITY: + setSeverity((LogSeverity)newValue); + return; + case AlertsPackage.ALERT__DAMPING_RULE: + setDampingRule((DampingRule)newValue); + return; + case AlertsPackage.ALERT__NUM_ALERTS: + setNumAlerts((IncreasingULongMetricAttribute)newValue); + return; + case AlertsPackage.ALERT__NUM_ALERTS_SUPPRESSED: + setNumAlertsSuppressed((IncreasingULongMetricAttribute)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case AlertsPackage.ALERT__OPERATIONAL_STATE: + setOperationalState(OPERATIONAL_STATE_EDEFAULT); + return; + case AlertsPackage.ALERT__SEVERITY: + setSeverity(SEVERITY_EDEFAULT); + return; + case AlertsPackage.ALERT__DAMPING_RULE: + setDampingRule((DampingRule)null); + return; + case AlertsPackage.ALERT__NUM_ALERTS: + setNumAlerts(NUM_ALERTS_EDEFAULT); + return; + case AlertsPackage.ALERT__NUM_ALERTS_SUPPRESSED: + setNumAlertsSuppressed(NUM_ALERTS_SUPPRESSED_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case AlertsPackage.ALERT__OPERATIONAL_STATE: + return operationalState != OPERATIONAL_STATE_EDEFAULT; + case AlertsPackage.ALERT__SEVERITY: + return severity != SEVERITY_EDEFAULT; + case AlertsPackage.ALERT__DAMPING_RULE: + return dampingRule != null; + case AlertsPackage.ALERT__NUM_ALERTS: + return NUM_ALERTS_EDEFAULT == null ? numAlerts != null : !NUM_ALERTS_EDEFAULT.equals(numAlerts); + case AlertsPackage.ALERT__NUM_ALERTS_SUPPRESSED: + return NUM_ALERTS_SUPPRESSED_EDEFAULT == null ? numAlertsSuppressed != null : !NUM_ALERTS_SUPPRESSED_EDEFAULT.equals(numAlertsSuppressed); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == HasOperationalState.class) { + switch (derivedFeatureID) { + case AlertsPackage.ALERT__OPERATIONAL_STATE: return CorePackage.HAS_OPERATIONAL_STATE__OPERATIONAL_STATE; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == HasOperationalState.class) { + switch (baseFeatureID) { + case CorePackage.HAS_OPERATIONAL_STATE__OPERATIONAL_STATE: return AlertsPackage.ALERT__OPERATIONAL_STATE; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (operationalState: "); + result.append(operationalState); + result.append(", severity: "); + result.append(severity); + result.append(", numAlerts: "); + result.append(numAlerts); + result.append(", numAlertsSuppressed: "); + result.append(numAlertsSuppressed); + result.append(')'); + return result.toString(); + } + +} //AlertImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/AlertingTemplateImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/AlertingTemplateImpl.java new file mode 100644 index 0000000..8e3ecd5 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/AlertingTemplateImpl.java @@ -0,0 +1,173 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.alerts.impl; + +import org.openecomp.ncomp.core.alerts.Alert; +import org.openecomp.ncomp.core.alerts.AlertingTemplate; +import org.openecomp.ncomp.core.alerts.AlertsPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Alerting Template'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.alerts.impl.AlertingTemplateImpl#getAlerts Alerts}
  • + *
+ *

+ * + * @generated + */ +public class AlertingTemplateImpl extends NamedEntityImpl implements AlertingTemplate { + /** + * The cached value of the '{@link #getAlerts() Alerts}' containment reference list. + * + * + * @see #getAlerts() + * @generated + * @ordered + */ + protected EList alerts; + + /** + * + * + * @generated + */ + protected AlertingTemplateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return AlertsPackage.Literals.ALERTING_TEMPLATE; + } + + /** + * + * + * @generated + */ + public EList getAlerts() { + if (alerts == null) { + alerts = new EObjectContainmentEList(Alert.class, this, AlertsPackage.ALERTING_TEMPLATE__ALERTS); + } + return alerts; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case AlertsPackage.ALERTING_TEMPLATE__ALERTS: + return ((InternalEList)getAlerts()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case AlertsPackage.ALERTING_TEMPLATE__ALERTS: + return getAlerts(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case AlertsPackage.ALERTING_TEMPLATE__ALERTS: + getAlerts().clear(); + getAlerts().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case AlertsPackage.ALERTING_TEMPLATE__ALERTS: + getAlerts().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case AlertsPackage.ALERTING_TEMPLATE__ALERTS: + return alerts != null && !alerts.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //AlertingTemplateImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/AlertsFactoryImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/AlertsFactoryImpl.java new file mode 100644 index 0000000..5e95614 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/AlertsFactoryImpl.java @@ -0,0 +1,138 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.alerts.impl; + +import org.openecomp.ncomp.core.alerts.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class AlertsFactoryImpl extends EFactoryImpl implements AlertsFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static AlertsFactory init() { + try { + AlertsFactory theAlertsFactory = (AlertsFactory)EPackage.Registry.INSTANCE.getEFactory(AlertsPackage.eNS_URI); + if (theAlertsFactory != null) { + return theAlertsFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new AlertsFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public AlertsFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case AlertsPackage.THRESHOLD_ALERT: return createThresholdAlert(); + case AlertsPackage.ALERTING_TEMPLATE: return createAlertingTemplate(); + case AlertsPackage.MAX_ALERT_PER_INTERVAL: return createMaxAlertPerInterval(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public ThresholdAlert createThresholdAlert() { + ThresholdAlertImpl thresholdAlert = new ThresholdAlertImpl(); + return thresholdAlert; + } + + /** + * + * + * @generated + */ + public AlertingTemplate createAlertingTemplate() { + AlertingTemplateImpl alertingTemplate = new AlertingTemplateImpl(); + return alertingTemplate; + } + + /** + * + * + * @generated + */ + public MaxAlertPerInterval createMaxAlertPerInterval() { + MaxAlertPerIntervalImpl maxAlertPerInterval = new MaxAlertPerIntervalImpl(); + return maxAlertPerInterval; + } + + /** + * + * + * @generated + */ + public AlertsPackage getAlertsPackage() { + return (AlertsPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static AlertsPackage getPackage() { + return AlertsPackage.eINSTANCE; + } + +} //AlertsFactoryImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/AlertsPackageImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/AlertsPackageImpl.java new file mode 100644 index 0000000..046314d --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/AlertsPackageImpl.java @@ -0,0 +1,465 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.alerts.impl; + +import org.openecomp.ncomp.core.CorePackage; + +import org.openecomp.ncomp.core.alerts.Alert; +import org.openecomp.ncomp.core.alerts.AlertContainer; +import org.openecomp.ncomp.core.alerts.AlertingTemplate; +import org.openecomp.ncomp.core.alerts.AlertsFactory; +import org.openecomp.ncomp.core.alerts.AlertsPackage; +import org.openecomp.ncomp.core.alerts.DampingRule; +import org.openecomp.ncomp.core.alerts.MaxAlertPerInterval; +import org.openecomp.ncomp.core.alerts.ThresholdAlert; + +import org.openecomp.ncomp.core.logs.LogsPackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class AlertsPackageImpl extends EPackageImpl implements AlertsPackage { + /** + * + * + * @generated + */ + private EClass alertEClass = null; + + /** + * + * + * @generated + */ + private EClass thresholdAlertEClass = null; + + /** + * + * + * @generated + */ + private EClass alertContainerEClass = null; + + /** + * + * + * @generated + */ + private EClass alertingTemplateEClass = null; + + /** + * + * + * @generated + */ + private EClass dampingRuleEClass = null; + + /** + * + * + * @generated + */ + private EClass maxAlertPerIntervalEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#eNS_URI + * @see #init() + * @generated + */ + private AlertsPackageImpl() { + super(eNS_URI, AlertsFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link AlertsPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static AlertsPackage init() { + if (isInited) return (AlertsPackage)EPackage.Registry.INSTANCE.getEPackage(AlertsPackage.eNS_URI); + + // Obtain or create and register package + AlertsPackageImpl theAlertsPackage = (AlertsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof AlertsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new AlertsPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + LogsPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theAlertsPackage.createPackageContents(); + + // Initialize created meta-data + theAlertsPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theAlertsPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(AlertsPackage.eNS_URI, theAlertsPackage); + return theAlertsPackage; + } + + /** + * + * + * @generated + */ + public EClass getAlert() { + return alertEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getAlert_Severity() { + return (EAttribute)alertEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getAlert_DampingRule() { + return (EReference)alertEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getAlert_NumAlerts() { + return (EAttribute)alertEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getAlert_NumAlertsSuppressed() { + return (EAttribute)alertEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getThresholdAlert() { + return thresholdAlertEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getThresholdAlert_MetricName() { + return (EAttribute)thresholdAlertEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getThresholdAlert_LowerBound() { + return (EAttribute)thresholdAlertEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getThresholdAlert_UpperBound() { + return (EAttribute)thresholdAlertEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getThresholdAlert_Duration() { + return (EAttribute)thresholdAlertEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getThresholdAlert_MaxDelay() { + return (EAttribute)thresholdAlertEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EClass getAlertContainer() { + return alertContainerEClass; + } + + /** + * + * + * @generated + */ + public EReference getAlertContainer_Alerts() { + return (EReference)alertContainerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getAlertContainer_AlertingTemplate() { + return (EReference)alertContainerEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getAlertingTemplate() { + return alertingTemplateEClass; + } + + /** + * + * + * @generated + */ + public EReference getAlertingTemplate_Alerts() { + return (EReference)alertingTemplateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getDampingRule() { + return dampingRuleEClass; + } + + /** + * + * + * @generated + */ + public EClass getMaxAlertPerInterval() { + return maxAlertPerIntervalEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getMaxAlertPerInterval_Interval() { + return (EAttribute)maxAlertPerIntervalEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getMaxAlertPerInterval_MaxAlerts() { + return (EAttribute)maxAlertPerIntervalEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public AlertsFactory getAlertsFactory() { + return (AlertsFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + alertEClass = createEClass(ALERT); + createEAttribute(alertEClass, ALERT__SEVERITY); + createEReference(alertEClass, ALERT__DAMPING_RULE); + createEAttribute(alertEClass, ALERT__NUM_ALERTS); + createEAttribute(alertEClass, ALERT__NUM_ALERTS_SUPPRESSED); + + thresholdAlertEClass = createEClass(THRESHOLD_ALERT); + createEAttribute(thresholdAlertEClass, THRESHOLD_ALERT__METRIC_NAME); + createEAttribute(thresholdAlertEClass, THRESHOLD_ALERT__LOWER_BOUND); + createEAttribute(thresholdAlertEClass, THRESHOLD_ALERT__UPPER_BOUND); + createEAttribute(thresholdAlertEClass, THRESHOLD_ALERT__DURATION); + createEAttribute(thresholdAlertEClass, THRESHOLD_ALERT__MAX_DELAY); + + alertContainerEClass = createEClass(ALERT_CONTAINER); + createEReference(alertContainerEClass, ALERT_CONTAINER__ALERTS); + createEReference(alertContainerEClass, ALERT_CONTAINER__ALERTING_TEMPLATE); + + alertingTemplateEClass = createEClass(ALERTING_TEMPLATE); + createEReference(alertingTemplateEClass, ALERTING_TEMPLATE__ALERTS); + + dampingRuleEClass = createEClass(DAMPING_RULE); + + maxAlertPerIntervalEClass = createEClass(MAX_ALERT_PER_INTERVAL); + createEAttribute(maxAlertPerIntervalEClass, MAX_ALERT_PER_INTERVAL__INTERVAL); + createEAttribute(maxAlertPerIntervalEClass, MAX_ALERT_PER_INTERVAL__MAX_ALERTS); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + LogsPackage theLogsPackage = (LogsPackage)EPackage.Registry.INSTANCE.getEPackage(LogsPackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + alertEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + alertEClass.getESuperTypes().add(theCorePackage.getHasOperationalState()); + thresholdAlertEClass.getESuperTypes().add(this.getAlert()); + alertingTemplateEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + maxAlertPerIntervalEClass.getESuperTypes().add(this.getDampingRule()); + + // Initialize classes, features, and operations; add parameters + initEClass(alertEClass, Alert.class, "Alert", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getAlert_Severity(), theLogsPackage.getLogSeverity(), "severity", null, 0, 1, Alert.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getAlert_DampingRule(), this.getDampingRule(), null, "dampingRule", null, 0, 1, Alert.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAlert_NumAlerts(), theCorePackage.getIncreasingULongMetricAttribute(), "numAlerts", null, 0, 1, Alert.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAlert_NumAlertsSuppressed(), theCorePackage.getIncreasingULongMetricAttribute(), "numAlertsSuppressed", null, 0, 1, Alert.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(thresholdAlertEClass, ThresholdAlert.class, "ThresholdAlert", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getThresholdAlert_MetricName(), theEcorePackage.getEString(), "metricName", null, 0, 1, ThresholdAlert.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getThresholdAlert_LowerBound(), theEcorePackage.getEDoubleObject(), "lowerBound", null, 0, 1, ThresholdAlert.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getThresholdAlert_UpperBound(), theEcorePackage.getEDoubleObject(), "upperBound", null, 0, 1, ThresholdAlert.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getThresholdAlert_Duration(), theEcorePackage.getEString(), "duration", null, 0, 1, ThresholdAlert.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getThresholdAlert_MaxDelay(), theEcorePackage.getEString(), "maxDelay", null, 0, 1, ThresholdAlert.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(alertContainerEClass, AlertContainer.class, "AlertContainer", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getAlertContainer_Alerts(), this.getAlert(), null, "alerts", null, 0, -1, AlertContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getAlertContainer_AlertingTemplate(), this.getAlertingTemplate(), null, "alertingTemplate", null, 0, 1, AlertContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(alertingTemplateEClass, AlertingTemplate.class, "AlertingTemplate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getAlertingTemplate_Alerts(), this.getAlert(), null, "alerts", null, 0, -1, AlertingTemplate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(dampingRuleEClass, DampingRule.class, "DampingRule", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(maxAlertPerIntervalEClass, MaxAlertPerInterval.class, "MaxAlertPerInterval", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getMaxAlertPerInterval_Interval(), theEcorePackage.getEString(), "interval", null, 0, 1, MaxAlertPerInterval.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getMaxAlertPerInterval_MaxAlerts(), theEcorePackage.getEInt(), "maxAlerts", "1", 0, 1, MaxAlertPerInterval.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //AlertsPackageImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/DampingRuleImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/DampingRuleImpl.java new file mode 100644 index 0000000..84e9b9a --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/DampingRuleImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.alerts.impl; + +import org.openecomp.ncomp.core.alerts.AlertsPackage; +import org.openecomp.ncomp.core.alerts.DampingRule; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Damping Rule'. + * + *

+ *

+ * + * @generated + */ +public abstract class DampingRuleImpl extends MinimalEObjectImpl.Container implements DampingRule { + /** + * + * + * @generated + */ + protected DampingRuleImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return AlertsPackage.Literals.DAMPING_RULE; + } + +} //DampingRuleImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/MaxAlertPerIntervalImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/MaxAlertPerIntervalImpl.java new file mode 100644 index 0000000..24cce3f --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/MaxAlertPerIntervalImpl.java @@ -0,0 +1,237 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.alerts.impl; + +import org.openecomp.ncomp.core.alerts.AlertsPackage; +import org.openecomp.ncomp.core.alerts.MaxAlertPerInterval; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Max Alert Per Interval'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.alerts.impl.MaxAlertPerIntervalImpl#getInterval Interval}
  • + *
  • {@link org.openecomp.ncomp.core.alerts.impl.MaxAlertPerIntervalImpl#getMaxAlerts Max Alerts}
  • + *
+ *

+ * + * @generated + */ +public class MaxAlertPerIntervalImpl extends DampingRuleImpl implements MaxAlertPerInterval { + /** + * The default value of the '{@link #getInterval() Interval}' attribute. + * + * + * @see #getInterval() + * @generated + * @ordered + */ + protected static final String INTERVAL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getInterval() Interval}' attribute. + * + * + * @see #getInterval() + * @generated + * @ordered + */ + protected String interval = INTERVAL_EDEFAULT; + + /** + * The default value of the '{@link #getMaxAlerts() Max Alerts}' attribute. + * + * + * @see #getMaxAlerts() + * @generated + * @ordered + */ + protected static final int MAX_ALERTS_EDEFAULT = 1; + + /** + * The cached value of the '{@link #getMaxAlerts() Max Alerts}' attribute. + * + * + * @see #getMaxAlerts() + * @generated + * @ordered + */ + protected int maxAlerts = MAX_ALERTS_EDEFAULT; + + /** + * + * + * @generated + */ + protected MaxAlertPerIntervalImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return AlertsPackage.Literals.MAX_ALERT_PER_INTERVAL; + } + + /** + * + * + * @generated + */ + public String getInterval() { + return interval; + } + + /** + * + * + * @generated + */ + public void setInterval(String newInterval) { + String oldInterval = interval; + interval = newInterval; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AlertsPackage.MAX_ALERT_PER_INTERVAL__INTERVAL, oldInterval, interval)); + } + + /** + * + * + * @generated + */ + public int getMaxAlerts() { + return maxAlerts; + } + + /** + * + * + * @generated + */ + public void setMaxAlerts(int newMaxAlerts) { + int oldMaxAlerts = maxAlerts; + maxAlerts = newMaxAlerts; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AlertsPackage.MAX_ALERT_PER_INTERVAL__MAX_ALERTS, oldMaxAlerts, maxAlerts)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case AlertsPackage.MAX_ALERT_PER_INTERVAL__INTERVAL: + return getInterval(); + case AlertsPackage.MAX_ALERT_PER_INTERVAL__MAX_ALERTS: + return getMaxAlerts(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case AlertsPackage.MAX_ALERT_PER_INTERVAL__INTERVAL: + setInterval((String)newValue); + return; + case AlertsPackage.MAX_ALERT_PER_INTERVAL__MAX_ALERTS: + setMaxAlerts((Integer)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case AlertsPackage.MAX_ALERT_PER_INTERVAL__INTERVAL: + setInterval(INTERVAL_EDEFAULT); + return; + case AlertsPackage.MAX_ALERT_PER_INTERVAL__MAX_ALERTS: + setMaxAlerts(MAX_ALERTS_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case AlertsPackage.MAX_ALERT_PER_INTERVAL__INTERVAL: + return INTERVAL_EDEFAULT == null ? interval != null : !INTERVAL_EDEFAULT.equals(interval); + case AlertsPackage.MAX_ALERT_PER_INTERVAL__MAX_ALERTS: + return maxAlerts != MAX_ALERTS_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (interval: "); + result.append(interval); + result.append(", maxAlerts: "); + result.append(maxAlerts); + result.append(')'); + return result.toString(); + } + +} //MaxAlertPerIntervalImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/ThresholdAlertImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/ThresholdAlertImpl.java new file mode 100644 index 0000000..f39b0e9 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/impl/ThresholdAlertImpl.java @@ -0,0 +1,399 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.alerts.impl; + +import org.openecomp.ncomp.core.alerts.AlertsPackage; +import org.openecomp.ncomp.core.alerts.ThresholdAlert; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Threshold Alert'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.alerts.impl.ThresholdAlertImpl#getMetricName Metric Name}
  • + *
  • {@link org.openecomp.ncomp.core.alerts.impl.ThresholdAlertImpl#getLowerBound Lower Bound}
  • + *
  • {@link org.openecomp.ncomp.core.alerts.impl.ThresholdAlertImpl#getUpperBound Upper Bound}
  • + *
  • {@link org.openecomp.ncomp.core.alerts.impl.ThresholdAlertImpl#getDuration Duration}
  • + *
  • {@link org.openecomp.ncomp.core.alerts.impl.ThresholdAlertImpl#getMaxDelay Max Delay}
  • + *
+ *

+ * + * @generated + */ +public class ThresholdAlertImpl extends AlertImpl implements ThresholdAlert { + /** + * The default value of the '{@link #getMetricName() Metric Name}' attribute. + * + * + * @see #getMetricName() + * @generated + * @ordered + */ + protected static final String METRIC_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMetricName() Metric Name}' attribute. + * + * + * @see #getMetricName() + * @generated + * @ordered + */ + protected String metricName = METRIC_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getLowerBound() Lower Bound}' attribute. + * + * + * @see #getLowerBound() + * @generated + * @ordered + */ + protected static final Double LOWER_BOUND_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLowerBound() Lower Bound}' attribute. + * + * + * @see #getLowerBound() + * @generated + * @ordered + */ + protected Double lowerBound = LOWER_BOUND_EDEFAULT; + + /** + * The default value of the '{@link #getUpperBound() Upper Bound}' attribute. + * + * + * @see #getUpperBound() + * @generated + * @ordered + */ + protected static final Double UPPER_BOUND_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUpperBound() Upper Bound}' attribute. + * + * + * @see #getUpperBound() + * @generated + * @ordered + */ + protected Double upperBound = UPPER_BOUND_EDEFAULT; + + /** + * The default value of the '{@link #getDuration() Duration}' attribute. + * + * + * @see #getDuration() + * @generated + * @ordered + */ + protected static final String DURATION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDuration() Duration}' attribute. + * + * + * @see #getDuration() + * @generated + * @ordered + */ + protected String duration = DURATION_EDEFAULT; + + /** + * The default value of the '{@link #getMaxDelay() Max Delay}' attribute. + * + * + * @see #getMaxDelay() + * @generated + * @ordered + */ + protected static final String MAX_DELAY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMaxDelay() Max Delay}' attribute. + * + * + * @see #getMaxDelay() + * @generated + * @ordered + */ + protected String maxDelay = MAX_DELAY_EDEFAULT; + + /** + * + * + * @generated + */ + protected ThresholdAlertImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return AlertsPackage.Literals.THRESHOLD_ALERT; + } + + /** + * + * + * @generated + */ + public String getMetricName() { + return metricName; + } + + /** + * + * + * @generated + */ + public void setMetricName(String newMetricName) { + String oldMetricName = metricName; + metricName = newMetricName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AlertsPackage.THRESHOLD_ALERT__METRIC_NAME, oldMetricName, metricName)); + } + + /** + * + * + * @generated + */ + public Double getLowerBound() { + return lowerBound; + } + + /** + * + * + * @generated + */ + public void setLowerBound(Double newLowerBound) { + Double oldLowerBound = lowerBound; + lowerBound = newLowerBound; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AlertsPackage.THRESHOLD_ALERT__LOWER_BOUND, oldLowerBound, lowerBound)); + } + + /** + * + * + * @generated + */ + public Double getUpperBound() { + return upperBound; + } + + /** + * + * + * @generated + */ + public void setUpperBound(Double newUpperBound) { + Double oldUpperBound = upperBound; + upperBound = newUpperBound; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AlertsPackage.THRESHOLD_ALERT__UPPER_BOUND, oldUpperBound, upperBound)); + } + + /** + * + * + * @generated + */ + public String getDuration() { + return duration; + } + + /** + * + * + * @generated + */ + public void setDuration(String newDuration) { + String oldDuration = duration; + duration = newDuration; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AlertsPackage.THRESHOLD_ALERT__DURATION, oldDuration, duration)); + } + + /** + * + * + * @generated + */ + public String getMaxDelay() { + return maxDelay; + } + + /** + * + * + * @generated + */ + public void setMaxDelay(String newMaxDelay) { + String oldMaxDelay = maxDelay; + maxDelay = newMaxDelay; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, AlertsPackage.THRESHOLD_ALERT__MAX_DELAY, oldMaxDelay, maxDelay)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case AlertsPackage.THRESHOLD_ALERT__METRIC_NAME: + return getMetricName(); + case AlertsPackage.THRESHOLD_ALERT__LOWER_BOUND: + return getLowerBound(); + case AlertsPackage.THRESHOLD_ALERT__UPPER_BOUND: + return getUpperBound(); + case AlertsPackage.THRESHOLD_ALERT__DURATION: + return getDuration(); + case AlertsPackage.THRESHOLD_ALERT__MAX_DELAY: + return getMaxDelay(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case AlertsPackage.THRESHOLD_ALERT__METRIC_NAME: + setMetricName((String)newValue); + return; + case AlertsPackage.THRESHOLD_ALERT__LOWER_BOUND: + setLowerBound((Double)newValue); + return; + case AlertsPackage.THRESHOLD_ALERT__UPPER_BOUND: + setUpperBound((Double)newValue); + return; + case AlertsPackage.THRESHOLD_ALERT__DURATION: + setDuration((String)newValue); + return; + case AlertsPackage.THRESHOLD_ALERT__MAX_DELAY: + setMaxDelay((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case AlertsPackage.THRESHOLD_ALERT__METRIC_NAME: + setMetricName(METRIC_NAME_EDEFAULT); + return; + case AlertsPackage.THRESHOLD_ALERT__LOWER_BOUND: + setLowerBound(LOWER_BOUND_EDEFAULT); + return; + case AlertsPackage.THRESHOLD_ALERT__UPPER_BOUND: + setUpperBound(UPPER_BOUND_EDEFAULT); + return; + case AlertsPackage.THRESHOLD_ALERT__DURATION: + setDuration(DURATION_EDEFAULT); + return; + case AlertsPackage.THRESHOLD_ALERT__MAX_DELAY: + setMaxDelay(MAX_DELAY_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case AlertsPackage.THRESHOLD_ALERT__METRIC_NAME: + return METRIC_NAME_EDEFAULT == null ? metricName != null : !METRIC_NAME_EDEFAULT.equals(metricName); + case AlertsPackage.THRESHOLD_ALERT__LOWER_BOUND: + return LOWER_BOUND_EDEFAULT == null ? lowerBound != null : !LOWER_BOUND_EDEFAULT.equals(lowerBound); + case AlertsPackage.THRESHOLD_ALERT__UPPER_BOUND: + return UPPER_BOUND_EDEFAULT == null ? upperBound != null : !UPPER_BOUND_EDEFAULT.equals(upperBound); + case AlertsPackage.THRESHOLD_ALERT__DURATION: + return DURATION_EDEFAULT == null ? duration != null : !DURATION_EDEFAULT.equals(duration); + case AlertsPackage.THRESHOLD_ALERT__MAX_DELAY: + return MAX_DELAY_EDEFAULT == null ? maxDelay != null : !MAX_DELAY_EDEFAULT.equals(maxDelay); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (metricName: "); + result.append(metricName); + result.append(", lowerBound: "); + result.append(lowerBound); + result.append(", upperBound: "); + result.append(upperBound); + result.append(", duration: "); + result.append(duration); + result.append(", maxDelay: "); + result.append(maxDelay); + result.append(')'); + return result.toString(); + } + +} //ThresholdAlertImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/util/AlertsAdapterFactory.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/util/AlertsAdapterFactory.java new file mode 100644 index 0000000..e4c80ab --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/util/AlertsAdapterFactory.java @@ -0,0 +1,270 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.alerts.util; + +import org.openecomp.ncomp.core.HasOperationalState; +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.alerts.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.ncomp.core.alerts.AlertsPackage + * @generated + */ +public class AlertsAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static AlertsPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public AlertsAdapterFactory() { + if (modelPackage == null) { + modelPackage = AlertsPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected AlertsSwitch modelSwitch = + new AlertsSwitch() { + @Override + public Adapter caseAlert(Alert object) { + return createAlertAdapter(); + } + @Override + public Adapter caseThresholdAlert(ThresholdAlert object) { + return createThresholdAlertAdapter(); + } + @Override + public Adapter caseAlertContainer(AlertContainer object) { + return createAlertContainerAdapter(); + } + @Override + public Adapter caseAlertingTemplate(AlertingTemplate object) { + return createAlertingTemplateAdapter(); + } + @Override + public Adapter caseDampingRule(DampingRule object) { + return createDampingRuleAdapter(); + } + @Override + public Adapter caseMaxAlertPerInterval(MaxAlertPerInterval object) { + return createMaxAlertPerIntervalAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter caseHasOperationalState(HasOperationalState object) { + return createHasOperationalStateAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.alerts.Alert Alert}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.alerts.Alert + * @generated + */ + public Adapter createAlertAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.alerts.ThresholdAlert Threshold Alert}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.alerts.ThresholdAlert + * @generated + */ + public Adapter createThresholdAlertAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.alerts.AlertContainer Alert Container}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.alerts.AlertContainer + * @generated + */ + public Adapter createAlertContainerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.alerts.AlertingTemplate Alerting Template}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.alerts.AlertingTemplate + * @generated + */ + public Adapter createAlertingTemplateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.alerts.DampingRule Damping Rule}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.alerts.DampingRule + * @generated + */ + public Adapter createDampingRuleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.alerts.MaxAlertPerInterval Max Alert Per Interval}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.alerts.MaxAlertPerInterval + * @generated + */ + public Adapter createMaxAlertPerIntervalAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.HasOperationalState Has Operational State}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.HasOperationalState + * @generated + */ + public Adapter createHasOperationalStateAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //AlertsAdapterFactory diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/util/AlertsSwitch.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/util/AlertsSwitch.java new file mode 100644 index 0000000..56d34cf --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/alerts/util/AlertsSwitch.java @@ -0,0 +1,276 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.alerts.util; + +import org.openecomp.ncomp.core.HasOperationalState; +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.alerts.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.ncomp.core.alerts.AlertsPackage + * @generated + */ +public class AlertsSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static AlertsPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public AlertsSwitch() { + if (modelPackage == null) { + modelPackage = AlertsPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case AlertsPackage.ALERT: { + Alert alert = (Alert)theEObject; + T result = caseAlert(alert); + if (result == null) result = caseNamedEntity(alert); + if (result == null) result = caseHasOperationalState(alert); + if (result == null) result = defaultCase(theEObject); + return result; + } + case AlertsPackage.THRESHOLD_ALERT: { + ThresholdAlert thresholdAlert = (ThresholdAlert)theEObject; + T result = caseThresholdAlert(thresholdAlert); + if (result == null) result = caseAlert(thresholdAlert); + if (result == null) result = caseNamedEntity(thresholdAlert); + if (result == null) result = caseHasOperationalState(thresholdAlert); + if (result == null) result = defaultCase(theEObject); + return result; + } + case AlertsPackage.ALERT_CONTAINER: { + AlertContainer alertContainer = (AlertContainer)theEObject; + T result = caseAlertContainer(alertContainer); + if (result == null) result = defaultCase(theEObject); + return result; + } + case AlertsPackage.ALERTING_TEMPLATE: { + AlertingTemplate alertingTemplate = (AlertingTemplate)theEObject; + T result = caseAlertingTemplate(alertingTemplate); + if (result == null) result = caseNamedEntity(alertingTemplate); + if (result == null) result = defaultCase(theEObject); + return result; + } + case AlertsPackage.DAMPING_RULE: { + DampingRule dampingRule = (DampingRule)theEObject; + T result = caseDampingRule(dampingRule); + if (result == null) result = defaultCase(theEObject); + return result; + } + case AlertsPackage.MAX_ALERT_PER_INTERVAL: { + MaxAlertPerInterval maxAlertPerInterval = (MaxAlertPerInterval)theEObject; + T result = caseMaxAlertPerInterval(maxAlertPerInterval); + if (result == null) result = caseDampingRule(maxAlertPerInterval); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Alert'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Alert'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAlert(Alert object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Threshold Alert'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Threshold Alert'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseThresholdAlert(ThresholdAlert object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Alert Container'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Alert Container'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAlertContainer(AlertContainer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Alerting Template'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Alerting Template'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAlertingTemplate(AlertingTemplate object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Damping Rule'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Damping Rule'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDampingRule(DampingRule object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Max Alert Per Interval'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Max Alert Per Interval'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMaxAlertPerInterval(MaxAlertPerInterval object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Has Operational State'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Has Operational State'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseHasOperationalState(HasOperationalState object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //AlertsSwitch diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/.gitignore b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/.gitignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/.gitignore @@ -0,0 +1 @@ + diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/Function.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/Function.java new file mode 100644 index 0000000..f788f94 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/Function.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Function'. + * + * + * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunction() + * @model abstract="true" + * @generated + */ +public interface Function extends NamedEntity { +} // Function diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionAction.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionAction.java new file mode 100644 index 0000000..69a6a3b --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionAction.java @@ -0,0 +1,71 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Action'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.function.FunctionAction#getValue Value}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionAction() + * @model + * @generated + */ +public interface FunctionAction extends EObject { + /** + * Returns the value of the 'Value' attribute. + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(String) + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionAction_Value() + * @model unique="false" + * @generated + */ + String getValue(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.function.FunctionAction#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(String value); + +} // FunctionAction diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionFactory.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionFactory.java new file mode 100644 index 0000000..aeea5a8 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionFactory.java @@ -0,0 +1,153 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.ncomp.core.function.FunctionPackage + * @generated + */ +public interface FunctionFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + FunctionFactory eINSTANCE = org.openecomp.ncomp.core.function.impl.FunctionFactoryImpl.init(); + + /** + * Returns a new object of class 'Iterator Using Function'. + * + * + * @return a new object of class 'Iterator Using Function'. + * @generated + */ + IteratorUsingFunction createIteratorUsingFunction(); + + /** + * Returns a new object of class 'Rule Function'. + * + * + * @return a new object of class 'Rule Function'. + * @generated + */ + RuleFunction createRuleFunction(); + + /** + * Returns a new object of class 'Rule'. + * + * + * @return a new object of class 'Rule'. + * @generated + */ + FunctionRule createFunctionRule(); + + /** + * Returns a new object of class 'Action'. + * + * + * @return a new object of class 'Action'. + * @generated + */ + FunctionAction createFunctionAction(); + + /** + * Returns a new object of class 'Rule Update Function'. + * + * + * @return a new object of class 'Rule Update Function'. + * @generated + */ + RuleUpdateFunction createRuleUpdateFunction(); + + /** + * Returns a new object of class 'Update Rule'. + * + * + * @return a new object of class 'Update Rule'. + * @generated + */ + FunctionUpdateRule createFunctionUpdateRule(); + + /** + * Returns a new object of class 'Update Attribute'. + * + * + * @return a new object of class 'Update Attribute'. + * @generated + */ + FunctionUpdateAttribute createFunctionUpdateAttribute(); + + /** + * Returns a new object of class 'Match Attribute'. + * + * + * @return a new object of class 'Match Attribute'. + * @generated + */ + FunctionMatchAttribute createFunctionMatchAttribute(); + + /** + * Returns a new object of class 'Match Metric'. + * + * + * @return a new object of class 'Match Metric'. + * @generated + */ + FunctionMatchMetric createFunctionMatchMetric(); + + /** + * Returns a new object of class 'Match Instance Of'. + * + * + * @return a new object of class 'Match Instance Of'. + * @generated + */ + FunctionMatchInstanceOf createFunctionMatchInstanceOf(); + + /** + * Returns a new object of class 'String Value Pair'. + * + * + * @return a new object of class 'String Value Pair'. + * @generated + */ + StringValuePair createStringValuePair(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + FunctionPackage getFunctionPackage(); + +} //FunctionFactory diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionMatch.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionMatch.java new file mode 100644 index 0000000..40ba834 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionMatch.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Match'. + * + * + * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionMatch() + * @model abstract="true" + * @generated + */ +public interface FunctionMatch extends EObject { +} // FunctionMatch diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionMatchAttribute.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionMatchAttribute.java new file mode 100644 index 0000000..578e0e7 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionMatchAttribute.java @@ -0,0 +1,124 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function; + + +/** + * + * A representation of the model object 'Match Attribute'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.function.FunctionMatchAttribute#getPath Path}
  • + *
  • {@link org.openecomp.ncomp.core.function.FunctionMatchAttribute#getMatch Match}
  • + *
  • {@link org.openecomp.ncomp.core.function.FunctionMatchAttribute#isNegation Negation}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionMatchAttribute() + * @model + * @generated + */ +public interface FunctionMatchAttribute extends FunctionMatch { + /** + * Returns the value of the 'Path' attribute. + * + *

+ * If the meaning of the 'Path' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Path' attribute. + * @see #setPath(String) + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionMatchAttribute_Path() + * @model unique="false" + * @generated + */ + String getPath(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.function.FunctionMatchAttribute#getPath Path}' attribute. + * + * + * @param value the new value of the 'Path' attribute. + * @see #getPath() + * @generated + */ + void setPath(String value); + + /** + * Returns the value of the 'Match' attribute. + * + *

+ * If the meaning of the 'Match' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Match' attribute. + * @see #setMatch(String) + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionMatchAttribute_Match() + * @model unique="false" + * @generated + */ + String getMatch(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.function.FunctionMatchAttribute#getMatch Match}' attribute. + * + * + * @param value the new value of the 'Match' attribute. + * @see #getMatch() + * @generated + */ + void setMatch(String value); + + /** + * Returns the value of the 'Negation' attribute. + * + *

+ * If the meaning of the 'Negation' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Negation' attribute. + * @see #setNegation(boolean) + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionMatchAttribute_Negation() + * @model unique="false" + * @generated + */ + boolean isNegation(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.function.FunctionMatchAttribute#isNegation Negation}' attribute. + * + * + * @param value the new value of the 'Negation' attribute. + * @see #isNegation() + * @generated + */ + void setNegation(boolean value); + +} // FunctionMatchAttribute diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionMatchInstanceOf.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionMatchInstanceOf.java new file mode 100644 index 0000000..5526d23 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionMatchInstanceOf.java @@ -0,0 +1,97 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function; + + +/** + * + * A representation of the model object 'Match Instance Of'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.function.FunctionMatchInstanceOf#getEPackage EPackage}
  • + *
  • {@link org.openecomp.ncomp.core.function.FunctionMatchInstanceOf#getEName EName}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionMatchInstanceOf() + * @model + * @generated + */ +public interface FunctionMatchInstanceOf extends FunctionMatch { + /** + * Returns the value of the 'EPackage' attribute. + * + *

+ * If the meaning of the 'EPackage' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'EPackage' attribute. + * @see #setEPackage(String) + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionMatchInstanceOf_EPackage() + * @model unique="false" + * @generated + */ + String getEPackage(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.function.FunctionMatchInstanceOf#getEPackage EPackage}' attribute. + * + * + * @param value the new value of the 'EPackage' attribute. + * @see #getEPackage() + * @generated + */ + void setEPackage(String value); + + /** + * Returns the value of the 'EName' attribute. + * + *

+ * If the meaning of the 'EName' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'EName' attribute. + * @see #setEName(String) + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionMatchInstanceOf_EName() + * @model unique="false" + * @generated + */ + String getEName(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.function.FunctionMatchInstanceOf#getEName EName}' attribute. + * + * + * @param value the new value of the 'EName' attribute. + * @see #getEName() + * @generated + */ + void setEName(String value); + +} // FunctionMatchInstanceOf diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionMatchMetric.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionMatchMetric.java new file mode 100644 index 0000000..ff555ff --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionMatchMetric.java @@ -0,0 +1,179 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function; + +import org.openecomp.ncomp.core.metrics.MetricValueOption; + +/** + * + * A representation of the model object 'Match Metric'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.function.FunctionMatchMetric#getPath Path}
  • + *
  • {@link org.openecomp.ncomp.core.function.FunctionMatchMetric#getOption Option}
  • + *
  • {@link org.openecomp.ncomp.core.function.FunctionMatchMetric#getLowerBound Lower Bound}
  • + *
  • {@link org.openecomp.ncomp.core.function.FunctionMatchMetric#getUpperBound Upper Bound}
  • + *
  • {@link org.openecomp.ncomp.core.function.FunctionMatchMetric#isNegation Negation}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionMatchMetric() + * @model + * @generated + */ +public interface FunctionMatchMetric extends FunctionMatch { + /** + * Returns the value of the 'Path' attribute. + * + *

+ * If the meaning of the 'Path' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Path' attribute. + * @see #setPath(String) + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionMatchMetric_Path() + * @model unique="false" + * @generated + */ + String getPath(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.function.FunctionMatchMetric#getPath Path}' attribute. + * + * + * @param value the new value of the 'Path' attribute. + * @see #getPath() + * @generated + */ + void setPath(String value); + + /** + * Returns the value of the 'Option' reference. + * + *

+ * If the meaning of the 'Option' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Option' reference. + * @see #setOption(MetricValueOption) + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionMatchMetric_Option() + * @model + * @generated + */ + MetricValueOption getOption(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.function.FunctionMatchMetric#getOption Option}' reference. + * + * + * @param value the new value of the 'Option' reference. + * @see #getOption() + * @generated + */ + void setOption(MetricValueOption value); + + /** + * Returns the value of the 'Lower Bound' attribute. + * + *

+ * If the meaning of the 'Lower Bound' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Lower Bound' attribute. + * @see #setLowerBound(Double) + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionMatchMetric_LowerBound() + * @model unique="false" + * @generated + */ + Double getLowerBound(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.function.FunctionMatchMetric#getLowerBound Lower Bound}' attribute. + * + * + * @param value the new value of the 'Lower Bound' attribute. + * @see #getLowerBound() + * @generated + */ + void setLowerBound(Double value); + + /** + * Returns the value of the 'Upper Bound' attribute. + * + *

+ * If the meaning of the 'Upper Bound' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Upper Bound' attribute. + * @see #setUpperBound(Double) + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionMatchMetric_UpperBound() + * @model unique="false" + * @generated + */ + Double getUpperBound(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.function.FunctionMatchMetric#getUpperBound Upper Bound}' attribute. + * + * + * @param value the new value of the 'Upper Bound' attribute. + * @see #getUpperBound() + * @generated + */ + void setUpperBound(Double value); + + /** + * Returns the value of the 'Negation' attribute. + * + *

+ * If the meaning of the 'Negation' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Negation' attribute. + * @see #setNegation(boolean) + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionMatchMetric_Negation() + * @model unique="false" + * @generated + */ + boolean isNegation(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.function.FunctionMatchMetric#isNegation Negation}' attribute. + * + * + * @param value the new value of the 'Negation' attribute. + * @see #isNegation() + * @generated + */ + void setNegation(boolean value); + +} // FunctionMatchMetric diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionPackage.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionPackage.java new file mode 100644 index 0000000..e6d93d7 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionPackage.java @@ -0,0 +1,1739 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function; + +import org.openecomp.ncomp.core.CorePackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.ncomp.core.function.FunctionFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/ncomp-core-model/src/main/xcore-gen' basePackage='org.openecomp.ncomp.core'" + * @generated + */ +public interface FunctionPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "function"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.core.function"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "function"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + FunctionPackage eINSTANCE = org.openecomp.ncomp.core.function.impl.FunctionPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.FunctionImpl Function}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.FunctionImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getFunction() + * @generated + */ + int FUNCTION = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int FUNCTION__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int FUNCTION__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int FUNCTION__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int FUNCTION__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The number of structural features of the 'Function' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Function' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.IteratorImpl Iterator}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.IteratorImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getIterator() + * @generated + */ + int ITERATOR = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int ITERATOR__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int ITERATOR__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int ITERATOR__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int ITERATOR__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The number of structural features of the 'Iterator' class. + * + * + * @generated + * @ordered + */ + int ITERATOR_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Iterator' class. + * + * + * @generated + * @ordered + */ + int ITERATOR_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.IteratorUsingFunctionImpl Iterator Using Function}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.IteratorUsingFunctionImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getIteratorUsingFunction() + * @generated + */ + int ITERATOR_USING_FUNCTION = 2; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int ITERATOR_USING_FUNCTION__NAME = ITERATOR__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int ITERATOR_USING_FUNCTION__LAST_POLLED = ITERATOR__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int ITERATOR_USING_FUNCTION__LAST_CHANGED = ITERATOR__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int ITERATOR_USING_FUNCTION__CREATED = ITERATOR__CREATED; + + /** + * The feature id for the 'Paths' attribute list. + * + * + * @generated + * @ordered + */ + int ITERATOR_USING_FUNCTION__PATHS = ITERATOR_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Recursive' attribute. + * + * + * @generated + * @ordered + */ + int ITERATOR_USING_FUNCTION__RECURSIVE = ITERATOR_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Filter' containment reference. + * + * + * @generated + * @ordered + */ + int ITERATOR_USING_FUNCTION__FILTER = ITERATOR_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Iterator Using Function' class. + * + * + * @generated + * @ordered + */ + int ITERATOR_USING_FUNCTION_FEATURE_COUNT = ITERATOR_FEATURE_COUNT + 3; + + /** + * The number of operations of the 'Iterator Using Function' class. + * + * + * @generated + * @ordered + */ + int ITERATOR_USING_FUNCTION_OPERATION_COUNT = ITERATOR_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.RuleFunctionImpl Rule Function}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.RuleFunctionImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getRuleFunction() + * @generated + */ + int RULE_FUNCTION = 3; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int RULE_FUNCTION__NAME = FUNCTION__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int RULE_FUNCTION__LAST_POLLED = FUNCTION__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int RULE_FUNCTION__LAST_CHANGED = FUNCTION__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int RULE_FUNCTION__CREATED = FUNCTION__CREATED; + + /** + * The feature id for the 'Rules' containment reference list. + * + * + * @generated + * @ordered + */ + int RULE_FUNCTION__RULES = FUNCTION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Rule Function' class. + * + * + * @generated + * @ordered + */ + int RULE_FUNCTION_FEATURE_COUNT = FUNCTION_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Rule Function' class. + * + * + * @generated + * @ordered + */ + int RULE_FUNCTION_OPERATION_COUNT = FUNCTION_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.FunctionRuleImpl Rule}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.FunctionRuleImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getFunctionRule() + * @generated + */ + int FUNCTION_RULE = 4; + + /** + * The feature id for the 'Matches' containment reference list. + * + * + * @generated + * @ordered + */ + int FUNCTION_RULE__MATCHES = 0; + + /** + * The feature id for the 'Action' containment reference. + * + * + * @generated + * @ordered + */ + int FUNCTION_RULE__ACTION = 1; + + /** + * The number of structural features of the 'Rule' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_RULE_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Rule' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_RULE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.FunctionActionImpl Action}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.FunctionActionImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getFunctionAction() + * @generated + */ + int FUNCTION_ACTION = 5; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int FUNCTION_ACTION__VALUE = 0; + + /** + * The number of structural features of the 'Action' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_ACTION_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Action' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_ACTION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.RuleUpdateFunctionImpl Rule Update Function}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.RuleUpdateFunctionImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getRuleUpdateFunction() + * @generated + */ + int RULE_UPDATE_FUNCTION = 6; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int RULE_UPDATE_FUNCTION__NAME = FUNCTION__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int RULE_UPDATE_FUNCTION__LAST_POLLED = FUNCTION__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int RULE_UPDATE_FUNCTION__LAST_CHANGED = FUNCTION__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int RULE_UPDATE_FUNCTION__CREATED = FUNCTION__CREATED; + + /** + * The feature id for the 'Rules' containment reference list. + * + * + * @generated + * @ordered + */ + int RULE_UPDATE_FUNCTION__RULES = FUNCTION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Rule Update Function' class. + * + * + * @generated + * @ordered + */ + int RULE_UPDATE_FUNCTION_FEATURE_COUNT = FUNCTION_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Rule Update Function' class. + * + * + * @generated + * @ordered + */ + int RULE_UPDATE_FUNCTION_OPERATION_COUNT = FUNCTION_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.FunctionUpdateRuleImpl Update Rule}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.FunctionUpdateRuleImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getFunctionUpdateRule() + * @generated + */ + int FUNCTION_UPDATE_RULE = 7; + + /** + * The feature id for the 'Matches' containment reference list. + * + * + * @generated + * @ordered + */ + int FUNCTION_UPDATE_RULE__MATCHES = 0; + + /** + * The feature id for the 'Updates' containment reference list. + * + * + * @generated + * @ordered + */ + int FUNCTION_UPDATE_RULE__UPDATES = 1; + + /** + * The number of structural features of the 'Update Rule' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_UPDATE_RULE_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Update Rule' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_UPDATE_RULE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.FunctionUpdateImpl Update}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.FunctionUpdateImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getFunctionUpdate() + * @generated + */ + int FUNCTION_UPDATE = 8; + + /** + * The number of structural features of the 'Update' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_UPDATE_FEATURE_COUNT = 0; + + /** + * The number of operations of the 'Update' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_UPDATE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.FunctionUpdateAttributeImpl Update Attribute}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.FunctionUpdateAttributeImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getFunctionUpdateAttribute() + * @generated + */ + int FUNCTION_UPDATE_ATTRIBUTE = 9; + + /** + * The feature id for the 'Path' attribute. + * + * + * @generated + * @ordered + */ + int FUNCTION_UPDATE_ATTRIBUTE__PATH = FUNCTION_UPDATE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int FUNCTION_UPDATE_ATTRIBUTE__VALUE = FUNCTION_UPDATE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Update Attribute' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_UPDATE_ATTRIBUTE_FEATURE_COUNT = FUNCTION_UPDATE_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Update Attribute' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_UPDATE_ATTRIBUTE_OPERATION_COUNT = FUNCTION_UPDATE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.FunctionMatchImpl Match}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.FunctionMatchImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getFunctionMatch() + * @generated + */ + int FUNCTION_MATCH = 10; + + /** + * The number of structural features of the 'Match' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_MATCH_FEATURE_COUNT = 0; + + /** + * The number of operations of the 'Match' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_MATCH_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.FunctionMatchAttributeImpl Match Attribute}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.FunctionMatchAttributeImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getFunctionMatchAttribute() + * @generated + */ + int FUNCTION_MATCH_ATTRIBUTE = 11; + + /** + * The feature id for the 'Path' attribute. + * + * + * @generated + * @ordered + */ + int FUNCTION_MATCH_ATTRIBUTE__PATH = FUNCTION_MATCH_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Match' attribute. + * + * + * @generated + * @ordered + */ + int FUNCTION_MATCH_ATTRIBUTE__MATCH = FUNCTION_MATCH_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Negation' attribute. + * + * + * @generated + * @ordered + */ + int FUNCTION_MATCH_ATTRIBUTE__NEGATION = FUNCTION_MATCH_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Match Attribute' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_MATCH_ATTRIBUTE_FEATURE_COUNT = FUNCTION_MATCH_FEATURE_COUNT + 3; + + /** + * The number of operations of the 'Match Attribute' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_MATCH_ATTRIBUTE_OPERATION_COUNT = FUNCTION_MATCH_OPERATION_COUNT + 0; + + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.FunctionMatchMetricImpl Match Metric}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.FunctionMatchMetricImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getFunctionMatchMetric() + * @generated + */ + int FUNCTION_MATCH_METRIC = 12; + + /** + * The feature id for the 'Path' attribute. + * + * + * @generated + * @ordered + */ + int FUNCTION_MATCH_METRIC__PATH = FUNCTION_MATCH_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Option' reference. + * + * + * @generated + * @ordered + */ + int FUNCTION_MATCH_METRIC__OPTION = FUNCTION_MATCH_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Lower Bound' attribute. + * + * + * @generated + * @ordered + */ + int FUNCTION_MATCH_METRIC__LOWER_BOUND = FUNCTION_MATCH_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Upper Bound' attribute. + * + * + * @generated + * @ordered + */ + int FUNCTION_MATCH_METRIC__UPPER_BOUND = FUNCTION_MATCH_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Negation' attribute. + * + * + * @generated + * @ordered + */ + int FUNCTION_MATCH_METRIC__NEGATION = FUNCTION_MATCH_FEATURE_COUNT + 4; + + /** + * The number of structural features of the 'Match Metric' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_MATCH_METRIC_FEATURE_COUNT = FUNCTION_MATCH_FEATURE_COUNT + 5; + + /** + * The number of operations of the 'Match Metric' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_MATCH_METRIC_OPERATION_COUNT = FUNCTION_MATCH_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.FunctionMatchInstanceOfImpl Match Instance Of}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.FunctionMatchInstanceOfImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getFunctionMatchInstanceOf() + * @generated + */ + int FUNCTION_MATCH_INSTANCE_OF = 13; + + /** + * The feature id for the 'EPackage' attribute. + * + * + * @generated + * @ordered + */ + int FUNCTION_MATCH_INSTANCE_OF__EPACKAGE = FUNCTION_MATCH_FEATURE_COUNT + 0; + + /** + * The feature id for the 'EName' attribute. + * + * + * @generated + * @ordered + */ + int FUNCTION_MATCH_INSTANCE_OF__ENAME = FUNCTION_MATCH_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Match Instance Of' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_MATCH_INSTANCE_OF_FEATURE_COUNT = FUNCTION_MATCH_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Match Instance Of' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_MATCH_INSTANCE_OF_OPERATION_COUNT = FUNCTION_MATCH_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.ValuePairImpl Value Pair}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.ValuePairImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getValuePair() + * @generated + */ + int VALUE_PAIR = 14; + + /** + * The feature id for the 'Path' attribute. + * + * + * @generated + * @ordered + */ + int VALUE_PAIR__PATH = 0; + + /** + * The number of structural features of the 'Value Pair' class. + * + * + * @generated + * @ordered + */ + int VALUE_PAIR_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Value Pair' class. + * + * + * @generated + * @ordered + */ + int VALUE_PAIR_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.StringValuePairImpl String Value Pair}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.StringValuePairImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getStringValuePair() + * @generated + */ + int STRING_VALUE_PAIR = 15; + + /** + * The feature id for the 'Path' attribute. + * + * + * @generated + * @ordered + */ + int STRING_VALUE_PAIR__PATH = VALUE_PAIR__PATH; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int STRING_VALUE_PAIR__VALUE = VALUE_PAIR_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'String Value Pair' class. + * + * + * @generated + * @ordered + */ + int STRING_VALUE_PAIR_FEATURE_COUNT = VALUE_PAIR_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'String Value Pair' class. + * + * + * @generated + * @ordered + */ + int STRING_VALUE_PAIR_OPERATION_COUNT = VALUE_PAIR_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.function.Function Function}'. + * + * + * @return the meta object for class 'Function'. + * @see org.openecomp.ncomp.core.function.Function + * @generated + */ + EClass getFunction(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.function.Iterator Iterator}'. + * + * + * @return the meta object for class 'Iterator'. + * @see org.openecomp.ncomp.core.function.Iterator + * @generated + */ + EClass getIterator(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.function.IteratorUsingFunction Iterator Using Function}'. + * + * + * @return the meta object for class 'Iterator Using Function'. + * @see org.openecomp.ncomp.core.function.IteratorUsingFunction + * @generated + */ + EClass getIteratorUsingFunction(); + + /** + * Returns the meta object for the attribute list '{@link org.openecomp.ncomp.core.function.IteratorUsingFunction#getPaths Paths}'. + * + * + * @return the meta object for the attribute list 'Paths'. + * @see org.openecomp.ncomp.core.function.IteratorUsingFunction#getPaths() + * @see #getIteratorUsingFunction() + * @generated + */ + EAttribute getIteratorUsingFunction_Paths(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.function.IteratorUsingFunction#isRecursive Recursive}'. + * + * + * @return the meta object for the attribute 'Recursive'. + * @see org.openecomp.ncomp.core.function.IteratorUsingFunction#isRecursive() + * @see #getIteratorUsingFunction() + * @generated + */ + EAttribute getIteratorUsingFunction_Recursive(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.core.function.IteratorUsingFunction#getFilter Filter}'. + * + * + * @return the meta object for the containment reference 'Filter'. + * @see org.openecomp.ncomp.core.function.IteratorUsingFunction#getFilter() + * @see #getIteratorUsingFunction() + * @generated + */ + EReference getIteratorUsingFunction_Filter(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.function.RuleFunction Rule Function}'. + * + * + * @return the meta object for class 'Rule Function'. + * @see org.openecomp.ncomp.core.function.RuleFunction + * @generated + */ + EClass getRuleFunction(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.core.function.RuleFunction#getRules Rules}'. + * + * + * @return the meta object for the containment reference list 'Rules'. + * @see org.openecomp.ncomp.core.function.RuleFunction#getRules() + * @see #getRuleFunction() + * @generated + */ + EReference getRuleFunction_Rules(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.function.FunctionRule Rule}'. + * + * + * @return the meta object for class 'Rule'. + * @see org.openecomp.ncomp.core.function.FunctionRule + * @generated + */ + EClass getFunctionRule(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.core.function.FunctionRule#getMatches Matches}'. + * + * + * @return the meta object for the containment reference list 'Matches'. + * @see org.openecomp.ncomp.core.function.FunctionRule#getMatches() + * @see #getFunctionRule() + * @generated + */ + EReference getFunctionRule_Matches(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.core.function.FunctionRule#getAction Action}'. + * + * + * @return the meta object for the containment reference 'Action'. + * @see org.openecomp.ncomp.core.function.FunctionRule#getAction() + * @see #getFunctionRule() + * @generated + */ + EReference getFunctionRule_Action(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.function.FunctionAction Action}'. + * + * + * @return the meta object for class 'Action'. + * @see org.openecomp.ncomp.core.function.FunctionAction + * @generated + */ + EClass getFunctionAction(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.function.FunctionAction#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.openecomp.ncomp.core.function.FunctionAction#getValue() + * @see #getFunctionAction() + * @generated + */ + EAttribute getFunctionAction_Value(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.function.RuleUpdateFunction Rule Update Function}'. + * + * + * @return the meta object for class 'Rule Update Function'. + * @see org.openecomp.ncomp.core.function.RuleUpdateFunction + * @generated + */ + EClass getRuleUpdateFunction(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.core.function.RuleUpdateFunction#getRules Rules}'. + * + * + * @return the meta object for the containment reference list 'Rules'. + * @see org.openecomp.ncomp.core.function.RuleUpdateFunction#getRules() + * @see #getRuleUpdateFunction() + * @generated + */ + EReference getRuleUpdateFunction_Rules(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.function.FunctionUpdateRule Update Rule}'. + * + * + * @return the meta object for class 'Update Rule'. + * @see org.openecomp.ncomp.core.function.FunctionUpdateRule + * @generated + */ + EClass getFunctionUpdateRule(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.core.function.FunctionUpdateRule#getMatches Matches}'. + * + * + * @return the meta object for the containment reference list 'Matches'. + * @see org.openecomp.ncomp.core.function.FunctionUpdateRule#getMatches() + * @see #getFunctionUpdateRule() + * @generated + */ + EReference getFunctionUpdateRule_Matches(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.core.function.FunctionUpdateRule#getUpdates Updates}'. + * + * + * @return the meta object for the containment reference list 'Updates'. + * @see org.openecomp.ncomp.core.function.FunctionUpdateRule#getUpdates() + * @see #getFunctionUpdateRule() + * @generated + */ + EReference getFunctionUpdateRule_Updates(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.function.FunctionUpdate Update}'. + * + * + * @return the meta object for class 'Update'. + * @see org.openecomp.ncomp.core.function.FunctionUpdate + * @generated + */ + EClass getFunctionUpdate(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.function.FunctionUpdateAttribute Update Attribute}'. + * + * + * @return the meta object for class 'Update Attribute'. + * @see org.openecomp.ncomp.core.function.FunctionUpdateAttribute + * @generated + */ + EClass getFunctionUpdateAttribute(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.function.FunctionUpdateAttribute#getPath Path}'. + * + * + * @return the meta object for the attribute 'Path'. + * @see org.openecomp.ncomp.core.function.FunctionUpdateAttribute#getPath() + * @see #getFunctionUpdateAttribute() + * @generated + */ + EAttribute getFunctionUpdateAttribute_Path(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.function.FunctionUpdateAttribute#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.openecomp.ncomp.core.function.FunctionUpdateAttribute#getValue() + * @see #getFunctionUpdateAttribute() + * @generated + */ + EAttribute getFunctionUpdateAttribute_Value(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.function.FunctionMatch Match}'. + * + * + * @return the meta object for class 'Match'. + * @see org.openecomp.ncomp.core.function.FunctionMatch + * @generated + */ + EClass getFunctionMatch(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.function.FunctionMatchAttribute Match Attribute}'. + * + * + * @return the meta object for class 'Match Attribute'. + * @see org.openecomp.ncomp.core.function.FunctionMatchAttribute + * @generated + */ + EClass getFunctionMatchAttribute(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.function.FunctionMatchAttribute#getPath Path}'. + * + * + * @return the meta object for the attribute 'Path'. + * @see org.openecomp.ncomp.core.function.FunctionMatchAttribute#getPath() + * @see #getFunctionMatchAttribute() + * @generated + */ + EAttribute getFunctionMatchAttribute_Path(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.function.FunctionMatchAttribute#getMatch Match}'. + * + * + * @return the meta object for the attribute 'Match'. + * @see org.openecomp.ncomp.core.function.FunctionMatchAttribute#getMatch() + * @see #getFunctionMatchAttribute() + * @generated + */ + EAttribute getFunctionMatchAttribute_Match(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.function.FunctionMatchAttribute#isNegation Negation}'. + * + * + * @return the meta object for the attribute 'Negation'. + * @see org.openecomp.ncomp.core.function.FunctionMatchAttribute#isNegation() + * @see #getFunctionMatchAttribute() + * @generated + */ + EAttribute getFunctionMatchAttribute_Negation(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.function.FunctionMatchMetric Match Metric}'. + * + * + * @return the meta object for class 'Match Metric'. + * @see org.openecomp.ncomp.core.function.FunctionMatchMetric + * @generated + */ + EClass getFunctionMatchMetric(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.function.FunctionMatchMetric#getPath Path}'. + * + * + * @return the meta object for the attribute 'Path'. + * @see org.openecomp.ncomp.core.function.FunctionMatchMetric#getPath() + * @see #getFunctionMatchMetric() + * @generated + */ + EAttribute getFunctionMatchMetric_Path(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.ncomp.core.function.FunctionMatchMetric#getOption Option}'. + * + * + * @return the meta object for the reference 'Option'. + * @see org.openecomp.ncomp.core.function.FunctionMatchMetric#getOption() + * @see #getFunctionMatchMetric() + * @generated + */ + EReference getFunctionMatchMetric_Option(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.function.FunctionMatchMetric#getLowerBound Lower Bound}'. + * + * + * @return the meta object for the attribute 'Lower Bound'. + * @see org.openecomp.ncomp.core.function.FunctionMatchMetric#getLowerBound() + * @see #getFunctionMatchMetric() + * @generated + */ + EAttribute getFunctionMatchMetric_LowerBound(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.function.FunctionMatchMetric#getUpperBound Upper Bound}'. + * + * + * @return the meta object for the attribute 'Upper Bound'. + * @see org.openecomp.ncomp.core.function.FunctionMatchMetric#getUpperBound() + * @see #getFunctionMatchMetric() + * @generated + */ + EAttribute getFunctionMatchMetric_UpperBound(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.function.FunctionMatchMetric#isNegation Negation}'. + * + * + * @return the meta object for the attribute 'Negation'. + * @see org.openecomp.ncomp.core.function.FunctionMatchMetric#isNegation() + * @see #getFunctionMatchMetric() + * @generated + */ + EAttribute getFunctionMatchMetric_Negation(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.function.FunctionMatchInstanceOf Match Instance Of}'. + * + * + * @return the meta object for class 'Match Instance Of'. + * @see org.openecomp.ncomp.core.function.FunctionMatchInstanceOf + * @generated + */ + EClass getFunctionMatchInstanceOf(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.function.FunctionMatchInstanceOf#getEPackage EPackage}'. + * + * + * @return the meta object for the attribute 'EPackage'. + * @see org.openecomp.ncomp.core.function.FunctionMatchInstanceOf#getEPackage() + * @see #getFunctionMatchInstanceOf() + * @generated + */ + EAttribute getFunctionMatchInstanceOf_EPackage(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.function.FunctionMatchInstanceOf#getEName EName}'. + * + * + * @return the meta object for the attribute 'EName'. + * @see org.openecomp.ncomp.core.function.FunctionMatchInstanceOf#getEName() + * @see #getFunctionMatchInstanceOf() + * @generated + */ + EAttribute getFunctionMatchInstanceOf_EName(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.function.ValuePair Value Pair}'. + * + * + * @return the meta object for class 'Value Pair'. + * @see org.openecomp.ncomp.core.function.ValuePair + * @generated + */ + EClass getValuePair(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.function.ValuePair#getPath Path}'. + * + * + * @return the meta object for the attribute 'Path'. + * @see org.openecomp.ncomp.core.function.ValuePair#getPath() + * @see #getValuePair() + * @generated + */ + EAttribute getValuePair_Path(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.function.StringValuePair String Value Pair}'. + * + * + * @return the meta object for class 'String Value Pair'. + * @see org.openecomp.ncomp.core.function.StringValuePair + * @generated + */ + EClass getStringValuePair(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.function.StringValuePair#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.openecomp.ncomp.core.function.StringValuePair#getValue() + * @see #getStringValuePair() + * @generated + */ + EAttribute getStringValuePair_Value(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + FunctionFactory getFunctionFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.FunctionImpl Function}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.FunctionImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getFunction() + * @generated + */ + EClass FUNCTION = eINSTANCE.getFunction(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.IteratorImpl Iterator}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.IteratorImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getIterator() + * @generated + */ + EClass ITERATOR = eINSTANCE.getIterator(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.IteratorUsingFunctionImpl Iterator Using Function}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.IteratorUsingFunctionImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getIteratorUsingFunction() + * @generated + */ + EClass ITERATOR_USING_FUNCTION = eINSTANCE.getIteratorUsingFunction(); + + /** + * The meta object literal for the 'Paths' attribute list feature. + * + * + * @generated + */ + EAttribute ITERATOR_USING_FUNCTION__PATHS = eINSTANCE.getIteratorUsingFunction_Paths(); + + /** + * The meta object literal for the 'Recursive' attribute feature. + * + * + * @generated + */ + EAttribute ITERATOR_USING_FUNCTION__RECURSIVE = eINSTANCE.getIteratorUsingFunction_Recursive(); + + /** + * The meta object literal for the 'Filter' containment reference feature. + * + * + * @generated + */ + EReference ITERATOR_USING_FUNCTION__FILTER = eINSTANCE.getIteratorUsingFunction_Filter(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.RuleFunctionImpl Rule Function}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.RuleFunctionImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getRuleFunction() + * @generated + */ + EClass RULE_FUNCTION = eINSTANCE.getRuleFunction(); + + /** + * The meta object literal for the 'Rules' containment reference list feature. + * + * + * @generated + */ + EReference RULE_FUNCTION__RULES = eINSTANCE.getRuleFunction_Rules(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.FunctionRuleImpl Rule}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.FunctionRuleImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getFunctionRule() + * @generated + */ + EClass FUNCTION_RULE = eINSTANCE.getFunctionRule(); + + /** + * The meta object literal for the 'Matches' containment reference list feature. + * + * + * @generated + */ + EReference FUNCTION_RULE__MATCHES = eINSTANCE.getFunctionRule_Matches(); + + /** + * The meta object literal for the 'Action' containment reference feature. + * + * + * @generated + */ + EReference FUNCTION_RULE__ACTION = eINSTANCE.getFunctionRule_Action(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.FunctionActionImpl Action}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.FunctionActionImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getFunctionAction() + * @generated + */ + EClass FUNCTION_ACTION = eINSTANCE.getFunctionAction(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute FUNCTION_ACTION__VALUE = eINSTANCE.getFunctionAction_Value(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.RuleUpdateFunctionImpl Rule Update Function}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.RuleUpdateFunctionImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getRuleUpdateFunction() + * @generated + */ + EClass RULE_UPDATE_FUNCTION = eINSTANCE.getRuleUpdateFunction(); + + /** + * The meta object literal for the 'Rules' containment reference list feature. + * + * + * @generated + */ + EReference RULE_UPDATE_FUNCTION__RULES = eINSTANCE.getRuleUpdateFunction_Rules(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.FunctionUpdateRuleImpl Update Rule}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.FunctionUpdateRuleImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getFunctionUpdateRule() + * @generated + */ + EClass FUNCTION_UPDATE_RULE = eINSTANCE.getFunctionUpdateRule(); + + /** + * The meta object literal for the 'Matches' containment reference list feature. + * + * + * @generated + */ + EReference FUNCTION_UPDATE_RULE__MATCHES = eINSTANCE.getFunctionUpdateRule_Matches(); + + /** + * The meta object literal for the 'Updates' containment reference list feature. + * + * + * @generated + */ + EReference FUNCTION_UPDATE_RULE__UPDATES = eINSTANCE.getFunctionUpdateRule_Updates(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.FunctionUpdateImpl Update}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.FunctionUpdateImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getFunctionUpdate() + * @generated + */ + EClass FUNCTION_UPDATE = eINSTANCE.getFunctionUpdate(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.FunctionUpdateAttributeImpl Update Attribute}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.FunctionUpdateAttributeImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getFunctionUpdateAttribute() + * @generated + */ + EClass FUNCTION_UPDATE_ATTRIBUTE = eINSTANCE.getFunctionUpdateAttribute(); + + /** + * The meta object literal for the 'Path' attribute feature. + * + * + * @generated + */ + EAttribute FUNCTION_UPDATE_ATTRIBUTE__PATH = eINSTANCE.getFunctionUpdateAttribute_Path(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute FUNCTION_UPDATE_ATTRIBUTE__VALUE = eINSTANCE.getFunctionUpdateAttribute_Value(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.FunctionMatchImpl Match}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.FunctionMatchImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getFunctionMatch() + * @generated + */ + EClass FUNCTION_MATCH = eINSTANCE.getFunctionMatch(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.FunctionMatchAttributeImpl Match Attribute}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.FunctionMatchAttributeImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getFunctionMatchAttribute() + * @generated + */ + EClass FUNCTION_MATCH_ATTRIBUTE = eINSTANCE.getFunctionMatchAttribute(); + + /** + * The meta object literal for the 'Path' attribute feature. + * + * + * @generated + */ + EAttribute FUNCTION_MATCH_ATTRIBUTE__PATH = eINSTANCE.getFunctionMatchAttribute_Path(); + + /** + * The meta object literal for the 'Match' attribute feature. + * + * + * @generated + */ + EAttribute FUNCTION_MATCH_ATTRIBUTE__MATCH = eINSTANCE.getFunctionMatchAttribute_Match(); + + /** + * The meta object literal for the 'Negation' attribute feature. + * + * + * @generated + */ + EAttribute FUNCTION_MATCH_ATTRIBUTE__NEGATION = eINSTANCE.getFunctionMatchAttribute_Negation(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.FunctionMatchMetricImpl Match Metric}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.FunctionMatchMetricImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getFunctionMatchMetric() + * @generated + */ + EClass FUNCTION_MATCH_METRIC = eINSTANCE.getFunctionMatchMetric(); + + /** + * The meta object literal for the 'Path' attribute feature. + * + * + * @generated + */ + EAttribute FUNCTION_MATCH_METRIC__PATH = eINSTANCE.getFunctionMatchMetric_Path(); + + /** + * The meta object literal for the 'Option' reference feature. + * + * + * @generated + */ + EReference FUNCTION_MATCH_METRIC__OPTION = eINSTANCE.getFunctionMatchMetric_Option(); + + /** + * The meta object literal for the 'Lower Bound' attribute feature. + * + * + * @generated + */ + EAttribute FUNCTION_MATCH_METRIC__LOWER_BOUND = eINSTANCE.getFunctionMatchMetric_LowerBound(); + + /** + * The meta object literal for the 'Upper Bound' attribute feature. + * + * + * @generated + */ + EAttribute FUNCTION_MATCH_METRIC__UPPER_BOUND = eINSTANCE.getFunctionMatchMetric_UpperBound(); + + /** + * The meta object literal for the 'Negation' attribute feature. + * + * + * @generated + */ + EAttribute FUNCTION_MATCH_METRIC__NEGATION = eINSTANCE.getFunctionMatchMetric_Negation(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.FunctionMatchInstanceOfImpl Match Instance Of}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.FunctionMatchInstanceOfImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getFunctionMatchInstanceOf() + * @generated + */ + EClass FUNCTION_MATCH_INSTANCE_OF = eINSTANCE.getFunctionMatchInstanceOf(); + + /** + * The meta object literal for the 'EPackage' attribute feature. + * + * + * @generated + */ + EAttribute FUNCTION_MATCH_INSTANCE_OF__EPACKAGE = eINSTANCE.getFunctionMatchInstanceOf_EPackage(); + + /** + * The meta object literal for the 'EName' attribute feature. + * + * + * @generated + */ + EAttribute FUNCTION_MATCH_INSTANCE_OF__ENAME = eINSTANCE.getFunctionMatchInstanceOf_EName(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.ValuePairImpl Value Pair}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.ValuePairImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getValuePair() + * @generated + */ + EClass VALUE_PAIR = eINSTANCE.getValuePair(); + + /** + * The meta object literal for the 'Path' attribute feature. + * + * + * @generated + */ + EAttribute VALUE_PAIR__PATH = eINSTANCE.getValuePair_Path(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.StringValuePairImpl String Value Pair}' class. + * + * + * @see org.openecomp.ncomp.core.function.impl.StringValuePairImpl + * @see org.openecomp.ncomp.core.function.impl.FunctionPackageImpl#getStringValuePair() + * @generated + */ + EClass STRING_VALUE_PAIR = eINSTANCE.getStringValuePair(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute STRING_VALUE_PAIR__VALUE = eINSTANCE.getStringValuePair_Value(); + + } + +} //FunctionPackage diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionRule.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionRule.java new file mode 100644 index 0000000..117b32a --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionRule.java @@ -0,0 +1,90 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Rule'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.function.FunctionRule#getMatches Matches}
  • + *
  • {@link org.openecomp.ncomp.core.function.FunctionRule#getAction Action}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionRule() + * @model + * @generated + */ +public interface FunctionRule extends EObject { + /** + * Returns the value of the 'Matches' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.function.FunctionMatch}. + * + *

+ * If the meaning of the 'Matches' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Matches' containment reference list. + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionRule_Matches() + * @model containment="true" + * @generated + */ + EList getMatches(); + + /** + * Returns the value of the 'Action' containment reference. + * + *

+ * If the meaning of the 'Action' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Action' containment reference. + * @see #setAction(FunctionAction) + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionRule_Action() + * @model containment="true" + * @generated + */ + FunctionAction getAction(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.function.FunctionRule#getAction Action}' containment reference. + * + * + * @param value the new value of the 'Action' containment reference. + * @see #getAction() + * @generated + */ + void setAction(FunctionAction value); + +} // FunctionRule diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionUpdate.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionUpdate.java new file mode 100644 index 0000000..77f72f9 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionUpdate.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Update'. + * + * + * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionUpdate() + * @model abstract="true" + * @generated + */ +public interface FunctionUpdate extends EObject { +} // FunctionUpdate diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionUpdateAttribute.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionUpdateAttribute.java new file mode 100644 index 0000000..3c37e23 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionUpdateAttribute.java @@ -0,0 +1,97 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function; + + +/** + * + * A representation of the model object 'Update Attribute'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.function.FunctionUpdateAttribute#getPath Path}
  • + *
  • {@link org.openecomp.ncomp.core.function.FunctionUpdateAttribute#getValue Value}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionUpdateAttribute() + * @model + * @generated + */ +public interface FunctionUpdateAttribute extends FunctionUpdate { + /** + * Returns the value of the 'Path' attribute. + * + *

+ * If the meaning of the 'Path' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Path' attribute. + * @see #setPath(String) + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionUpdateAttribute_Path() + * @model unique="false" + * @generated + */ + String getPath(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.function.FunctionUpdateAttribute#getPath Path}' attribute. + * + * + * @param value the new value of the 'Path' attribute. + * @see #getPath() + * @generated + */ + void setPath(String value); + + /** + * Returns the value of the 'Value' attribute. + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(String) + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionUpdateAttribute_Value() + * @model unique="false" + * @generated + */ + String getValue(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.function.FunctionUpdateAttribute#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(String value); + +} // FunctionUpdateAttribute diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionUpdateRule.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionUpdateRule.java new file mode 100644 index 0000000..a3f135e --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/FunctionUpdateRule.java @@ -0,0 +1,80 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Update Rule'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.function.FunctionUpdateRule#getMatches Matches}
  • + *
  • {@link org.openecomp.ncomp.core.function.FunctionUpdateRule#getUpdates Updates}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionUpdateRule() + * @model + * @generated + */ +public interface FunctionUpdateRule extends EObject { + /** + * Returns the value of the 'Matches' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.function.FunctionMatch}. + * + *

+ * If the meaning of the 'Matches' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Matches' containment reference list. + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionUpdateRule_Matches() + * @model containment="true" + * @generated + */ + EList getMatches(); + + /** + * Returns the value of the 'Updates' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.function.FunctionUpdate}. + * + *

+ * If the meaning of the 'Updates' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Updates' containment reference list. + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionUpdateRule_Updates() + * @model containment="true" + * @generated + */ + EList getUpdates(); + +} // FunctionUpdateRule diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/Iterator.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/Iterator.java new file mode 100644 index 0000000..244b99e --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/Iterator.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Iterator'. + * + * + * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getIterator() + * @model abstract="true" + * @generated + */ +public interface Iterator extends NamedEntity { +} // Iterator diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/IteratorUsingFunction.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/IteratorUsingFunction.java new file mode 100644 index 0000000..1ed3665 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/IteratorUsingFunction.java @@ -0,0 +1,115 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Iterator Using Function'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.function.IteratorUsingFunction#getPaths Paths}
  • + *
  • {@link org.openecomp.ncomp.core.function.IteratorUsingFunction#isRecursive Recursive}
  • + *
  • {@link org.openecomp.ncomp.core.function.IteratorUsingFunction#getFilter Filter}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getIteratorUsingFunction() + * @model + * @generated + */ +public interface IteratorUsingFunction extends Iterator { + /** + * Returns the value of the 'Paths' attribute list. + * The list contents are of type {@link java.lang.String}. + * + *

+ * If the meaning of the 'Paths' attribute list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Paths' attribute list. + * @see org.openecomp.ncomp.core.function.FunctionPackage#getIteratorUsingFunction_Paths() + * @model unique="false" + * @generated + */ + EList getPaths(); + + /** + * Returns the value of the 'Recursive' attribute. + * + *

+ * If the meaning of the 'Recursive' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Recursive' attribute. + * @see #setRecursive(boolean) + * @see org.openecomp.ncomp.core.function.FunctionPackage#getIteratorUsingFunction_Recursive() + * @model unique="false" + * @generated + */ + boolean isRecursive(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.function.IteratorUsingFunction#isRecursive Recursive}' attribute. + * + * + * @param value the new value of the 'Recursive' attribute. + * @see #isRecursive() + * @generated + */ + void setRecursive(boolean value); + + /** + * Returns the value of the 'Filter' containment reference. + * + *

+ * If the meaning of the 'Filter' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Filter' containment reference. + * @see #setFilter(Function) + * @see org.openecomp.ncomp.core.function.FunctionPackage#getIteratorUsingFunction_Filter() + * @model containment="true" + * @generated + */ + Function getFilter(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.function.IteratorUsingFunction#getFilter Filter}' containment reference. + * + * + * @param value the new value of the 'Filter' containment reference. + * @see #getFilter() + * @generated + */ + void setFilter(Function value); + +} // IteratorUsingFunction diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/RuleFunction.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/RuleFunction.java new file mode 100644 index 0000000..a6ff522 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/RuleFunction.java @@ -0,0 +1,61 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Rule Function'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.function.RuleFunction#getRules Rules}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getRuleFunction() + * @model + * @generated + */ +public interface RuleFunction extends Function { + /** + * Returns the value of the 'Rules' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.function.FunctionRule}. + * + *

+ * If the meaning of the 'Rules' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Rules' containment reference list. + * @see org.openecomp.ncomp.core.function.FunctionPackage#getRuleFunction_Rules() + * @model containment="true" + * @generated + */ + EList getRules(); + +} // RuleFunction diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/RuleUpdateFunction.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/RuleUpdateFunction.java new file mode 100644 index 0000000..8a68a2b --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/RuleUpdateFunction.java @@ -0,0 +1,61 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Rule Update Function'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.function.RuleUpdateFunction#getRules Rules}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getRuleUpdateFunction() + * @model + * @generated + */ +public interface RuleUpdateFunction extends Function { + /** + * Returns the value of the 'Rules' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.function.FunctionUpdateRule}. + * + *

+ * If the meaning of the 'Rules' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Rules' containment reference list. + * @see org.openecomp.ncomp.core.function.FunctionPackage#getRuleUpdateFunction_Rules() + * @model containment="true" + * @generated + */ + EList getRules(); + +} // RuleUpdateFunction diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/StringValuePair.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/StringValuePair.java new file mode 100644 index 0000000..021b281 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/StringValuePair.java @@ -0,0 +1,70 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function; + + +/** + * + * A representation of the model object 'String Value Pair'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.function.StringValuePair#getValue Value}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getStringValuePair() + * @model + * @generated + */ +public interface StringValuePair extends ValuePair { + /** + * Returns the value of the 'Value' attribute. + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(String) + * @see org.openecomp.ncomp.core.function.FunctionPackage#getStringValuePair_Value() + * @model unique="false" + * @generated + */ + String getValue(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.function.StringValuePair#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(String value); + +} // StringValuePair diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/ValuePair.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/ValuePair.java new file mode 100644 index 0000000..b58e19e --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/ValuePair.java @@ -0,0 +1,71 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Value Pair'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.function.ValuePair#getPath Path}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getValuePair() + * @model abstract="true" + * @generated + */ +public interface ValuePair extends EObject { + /** + * Returns the value of the 'Path' attribute. + * + *

+ * If the meaning of the 'Path' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Path' attribute. + * @see #setPath(String) + * @see org.openecomp.ncomp.core.function.FunctionPackage#getValuePair_Path() + * @model unique="false" + * @generated + */ + String getPath(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.function.ValuePair#getPath Path}' attribute. + * + * + * @param value the new value of the 'Path' attribute. + * @see #getPath() + * @generated + */ + void setPath(String value); + +} // ValuePair diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/.gitignore b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/.gitignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/.gitignore @@ -0,0 +1 @@ + diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionActionImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionActionImpl.java new file mode 100644 index 0000000..9ef32e8 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionActionImpl.java @@ -0,0 +1,184 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function.impl; + +import org.openecomp.ncomp.core.function.FunctionAction; +import org.openecomp.ncomp.core.function.FunctionPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Action'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.function.impl.FunctionActionImpl#getValue Value}
  • + *
+ *

+ * + * @generated + */ +public class FunctionActionImpl extends MinimalEObjectImpl.Container implements FunctionAction { + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected FunctionActionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.FUNCTION_ACTION; + } + + /** + * + * + * @generated + */ + public String getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(String newValue) { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionPackage.FUNCTION_ACTION__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionPackage.FUNCTION_ACTION__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionPackage.FUNCTION_ACTION__VALUE: + setValue((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionPackage.FUNCTION_ACTION__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionPackage.FUNCTION_ACTION__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //FunctionActionImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionFactoryImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionFactoryImpl.java new file mode 100644 index 0000000..b204796 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionFactoryImpl.java @@ -0,0 +1,226 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function.impl; + +import org.openecomp.ncomp.core.function.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class FunctionFactoryImpl extends EFactoryImpl implements FunctionFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static FunctionFactory init() { + try { + FunctionFactory theFunctionFactory = (FunctionFactory)EPackage.Registry.INSTANCE.getEFactory(FunctionPackage.eNS_URI); + if (theFunctionFactory != null) { + return theFunctionFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new FunctionFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public FunctionFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case FunctionPackage.ITERATOR_USING_FUNCTION: return createIteratorUsingFunction(); + case FunctionPackage.RULE_FUNCTION: return createRuleFunction(); + case FunctionPackage.FUNCTION_RULE: return createFunctionRule(); + case FunctionPackage.FUNCTION_ACTION: return createFunctionAction(); + case FunctionPackage.RULE_UPDATE_FUNCTION: return createRuleUpdateFunction(); + case FunctionPackage.FUNCTION_UPDATE_RULE: return createFunctionUpdateRule(); + case FunctionPackage.FUNCTION_UPDATE_ATTRIBUTE: return createFunctionUpdateAttribute(); + case FunctionPackage.FUNCTION_MATCH_ATTRIBUTE: return createFunctionMatchAttribute(); + case FunctionPackage.FUNCTION_MATCH_METRIC: return createFunctionMatchMetric(); + case FunctionPackage.FUNCTION_MATCH_INSTANCE_OF: return createFunctionMatchInstanceOf(); + case FunctionPackage.STRING_VALUE_PAIR: return createStringValuePair(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public IteratorUsingFunction createIteratorUsingFunction() { + IteratorUsingFunctionImpl iteratorUsingFunction = new IteratorUsingFunctionImpl(); + return iteratorUsingFunction; + } + + /** + * + * + * @generated + */ + public RuleFunction createRuleFunction() { + RuleFunctionImpl ruleFunction = new RuleFunctionImpl(); + return ruleFunction; + } + + /** + * + * + * @generated + */ + public FunctionRule createFunctionRule() { + FunctionRuleImpl functionRule = new FunctionRuleImpl(); + return functionRule; + } + + /** + * + * + * @generated + */ + public FunctionAction createFunctionAction() { + FunctionActionImpl functionAction = new FunctionActionImpl(); + return functionAction; + } + + /** + * + * + * @generated + */ + public RuleUpdateFunction createRuleUpdateFunction() { + RuleUpdateFunctionImpl ruleUpdateFunction = new RuleUpdateFunctionImpl(); + return ruleUpdateFunction; + } + + /** + * + * + * @generated + */ + public FunctionUpdateRule createFunctionUpdateRule() { + FunctionUpdateRuleImpl functionUpdateRule = new FunctionUpdateRuleImpl(); + return functionUpdateRule; + } + + /** + * + * + * @generated + */ + public FunctionUpdateAttribute createFunctionUpdateAttribute() { + FunctionUpdateAttributeImpl functionUpdateAttribute = new FunctionUpdateAttributeImpl(); + return functionUpdateAttribute; + } + + /** + * + * + * @generated + */ + public FunctionMatchAttribute createFunctionMatchAttribute() { + FunctionMatchAttributeImpl functionMatchAttribute = new FunctionMatchAttributeImpl(); + return functionMatchAttribute; + } + + /** + * + * + * @generated + */ + public FunctionMatchMetric createFunctionMatchMetric() { + FunctionMatchMetricImpl functionMatchMetric = new FunctionMatchMetricImpl(); + return functionMatchMetric; + } + + /** + * + * + * @generated + */ + public FunctionMatchInstanceOf createFunctionMatchInstanceOf() { + FunctionMatchInstanceOfImpl functionMatchInstanceOf = new FunctionMatchInstanceOfImpl(); + return functionMatchInstanceOf; + } + + /** + * + * + * @generated + */ + public StringValuePair createStringValuePair() { + StringValuePairImpl stringValuePair = new StringValuePairImpl(); + return stringValuePair; + } + + /** + * + * + * @generated + */ + public FunctionPackage getFunctionPackage() { + return (FunctionPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static FunctionPackage getPackage() { + return FunctionPackage.eINSTANCE; + } + +} //FunctionFactoryImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionImpl.java new file mode 100644 index 0000000..e2dff1c --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function.impl; + +import org.openecomp.ncomp.core.function.Function; +import org.openecomp.ncomp.core.function.FunctionPackage; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Function'. + * + *

+ *

+ * + * @generated + */ +public abstract class FunctionImpl extends NamedEntityImpl implements Function { + /** + * + * + * @generated + */ + protected FunctionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.FUNCTION; + } + +} //FunctionImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionMatchAttributeImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionMatchAttributeImpl.java new file mode 100644 index 0000000..bf475fe --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionMatchAttributeImpl.java @@ -0,0 +1,291 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function.impl; + +import org.openecomp.ncomp.core.function.FunctionMatchAttribute; +import org.openecomp.ncomp.core.function.FunctionPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Match Attribute'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.function.impl.FunctionMatchAttributeImpl#getPath Path}
  • + *
  • {@link org.openecomp.ncomp.core.function.impl.FunctionMatchAttributeImpl#getMatch Match}
  • + *
  • {@link org.openecomp.ncomp.core.function.impl.FunctionMatchAttributeImpl#isNegation Negation}
  • + *
+ *

+ * + * @generated + */ +public class FunctionMatchAttributeImpl extends FunctionMatchImpl implements FunctionMatchAttribute { + /** + * The default value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected static final String PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected String path = PATH_EDEFAULT; + + /** + * The default value of the '{@link #getMatch() Match}' attribute. + * + * + * @see #getMatch() + * @generated + * @ordered + */ + protected static final String MATCH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMatch() Match}' attribute. + * + * + * @see #getMatch() + * @generated + * @ordered + */ + protected String match = MATCH_EDEFAULT; + + /** + * The default value of the '{@link #isNegation() Negation}' attribute. + * + * + * @see #isNegation() + * @generated + * @ordered + */ + protected static final boolean NEGATION_EDEFAULT = false; + + /** + * The cached value of the '{@link #isNegation() Negation}' attribute. + * + * + * @see #isNegation() + * @generated + * @ordered + */ + protected boolean negation = NEGATION_EDEFAULT; + + /** + * + * + * @generated + */ + protected FunctionMatchAttributeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.FUNCTION_MATCH_ATTRIBUTE; + } + + /** + * + * + * @generated + */ + public String getPath() { + return path; + } + + /** + * + * + * @generated + */ + public void setPath(String newPath) { + String oldPath = path; + path = newPath; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionPackage.FUNCTION_MATCH_ATTRIBUTE__PATH, oldPath, path)); + } + + /** + * + * + * @generated + */ + public String getMatch() { + return match; + } + + /** + * + * + * @generated + */ + public void setMatch(String newMatch) { + String oldMatch = match; + match = newMatch; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionPackage.FUNCTION_MATCH_ATTRIBUTE__MATCH, oldMatch, match)); + } + + /** + * + * + * @generated + */ + public boolean isNegation() { + return negation; + } + + /** + * + * + * @generated + */ + public void setNegation(boolean newNegation) { + boolean oldNegation = negation; + negation = newNegation; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionPackage.FUNCTION_MATCH_ATTRIBUTE__NEGATION, oldNegation, negation)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionPackage.FUNCTION_MATCH_ATTRIBUTE__PATH: + return getPath(); + case FunctionPackage.FUNCTION_MATCH_ATTRIBUTE__MATCH: + return getMatch(); + case FunctionPackage.FUNCTION_MATCH_ATTRIBUTE__NEGATION: + return isNegation(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionPackage.FUNCTION_MATCH_ATTRIBUTE__PATH: + setPath((String)newValue); + return; + case FunctionPackage.FUNCTION_MATCH_ATTRIBUTE__MATCH: + setMatch((String)newValue); + return; + case FunctionPackage.FUNCTION_MATCH_ATTRIBUTE__NEGATION: + setNegation((Boolean)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionPackage.FUNCTION_MATCH_ATTRIBUTE__PATH: + setPath(PATH_EDEFAULT); + return; + case FunctionPackage.FUNCTION_MATCH_ATTRIBUTE__MATCH: + setMatch(MATCH_EDEFAULT); + return; + case FunctionPackage.FUNCTION_MATCH_ATTRIBUTE__NEGATION: + setNegation(NEGATION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionPackage.FUNCTION_MATCH_ATTRIBUTE__PATH: + return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path); + case FunctionPackage.FUNCTION_MATCH_ATTRIBUTE__MATCH: + return MATCH_EDEFAULT == null ? match != null : !MATCH_EDEFAULT.equals(match); + case FunctionPackage.FUNCTION_MATCH_ATTRIBUTE__NEGATION: + return negation != NEGATION_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (path: "); + result.append(path); + result.append(", match: "); + result.append(match); + result.append(", negation: "); + result.append(negation); + result.append(')'); + return result.toString(); + } + +} //FunctionMatchAttributeImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionMatchImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionMatchImpl.java new file mode 100644 index 0000000..717ed99 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionMatchImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function.impl; + +import org.openecomp.ncomp.core.function.FunctionMatch; +import org.openecomp.ncomp.core.function.FunctionPackage; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Match'. + * + *

+ *

+ * + * @generated + */ +public abstract class FunctionMatchImpl extends MinimalEObjectImpl.Container implements FunctionMatch { + /** + * + * + * @generated + */ + protected FunctionMatchImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.FUNCTION_MATCH; + } + +} //FunctionMatchImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionMatchInstanceOfImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionMatchInstanceOfImpl.java new file mode 100644 index 0000000..c722e58 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionMatchInstanceOfImpl.java @@ -0,0 +1,237 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function.impl; + +import org.openecomp.ncomp.core.function.FunctionMatchInstanceOf; +import org.openecomp.ncomp.core.function.FunctionPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Match Instance Of'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.function.impl.FunctionMatchInstanceOfImpl#getEPackage EPackage}
  • + *
  • {@link org.openecomp.ncomp.core.function.impl.FunctionMatchInstanceOfImpl#getEName EName}
  • + *
+ *

+ * + * @generated + */ +public class FunctionMatchInstanceOfImpl extends FunctionMatchImpl implements FunctionMatchInstanceOf { + /** + * The default value of the '{@link #getEPackage() EPackage}' attribute. + * + * + * @see #getEPackage() + * @generated + * @ordered + */ + protected static final String EPACKAGE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getEPackage() EPackage}' attribute. + * + * + * @see #getEPackage() + * @generated + * @ordered + */ + protected String ePackage = EPACKAGE_EDEFAULT; + + /** + * The default value of the '{@link #getEName() EName}' attribute. + * + * + * @see #getEName() + * @generated + * @ordered + */ + protected static final String ENAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getEName() EName}' attribute. + * + * + * @see #getEName() + * @generated + * @ordered + */ + protected String eName = ENAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected FunctionMatchInstanceOfImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.FUNCTION_MATCH_INSTANCE_OF; + } + + /** + * + * + * @generated + */ + public String getEPackage() { + return ePackage; + } + + /** + * + * + * @generated + */ + public void setEPackage(String newEPackage) { + String oldEPackage = ePackage; + ePackage = newEPackage; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionPackage.FUNCTION_MATCH_INSTANCE_OF__EPACKAGE, oldEPackage, ePackage)); + } + + /** + * + * + * @generated + */ + public String getEName() { + return eName; + } + + /** + * + * + * @generated + */ + public void setEName(String newEName) { + String oldEName = eName; + eName = newEName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionPackage.FUNCTION_MATCH_INSTANCE_OF__ENAME, oldEName, eName)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionPackage.FUNCTION_MATCH_INSTANCE_OF__EPACKAGE: + return getEPackage(); + case FunctionPackage.FUNCTION_MATCH_INSTANCE_OF__ENAME: + return getEName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionPackage.FUNCTION_MATCH_INSTANCE_OF__EPACKAGE: + setEPackage((String)newValue); + return; + case FunctionPackage.FUNCTION_MATCH_INSTANCE_OF__ENAME: + setEName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionPackage.FUNCTION_MATCH_INSTANCE_OF__EPACKAGE: + setEPackage(EPACKAGE_EDEFAULT); + return; + case FunctionPackage.FUNCTION_MATCH_INSTANCE_OF__ENAME: + setEName(ENAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionPackage.FUNCTION_MATCH_INSTANCE_OF__EPACKAGE: + return EPACKAGE_EDEFAULT == null ? ePackage != null : !EPACKAGE_EDEFAULT.equals(ePackage); + case FunctionPackage.FUNCTION_MATCH_INSTANCE_OF__ENAME: + return ENAME_EDEFAULT == null ? eName != null : !ENAME_EDEFAULT.equals(eName); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (ePackage: "); + result.append(ePackage); + result.append(", eName: "); + result.append(eName); + result.append(')'); + return result.toString(); + } + +} //FunctionMatchInstanceOfImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionMatchMetricImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionMatchMetricImpl.java new file mode 100644 index 0000000..5438c5f --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionMatchMetricImpl.java @@ -0,0 +1,408 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function.impl; + +import org.openecomp.ncomp.core.function.FunctionMatchMetric; +import org.openecomp.ncomp.core.function.FunctionPackage; + +import org.openecomp.ncomp.core.metrics.MetricValueOption; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Match Metric'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.function.impl.FunctionMatchMetricImpl#getPath Path}
  • + *
  • {@link org.openecomp.ncomp.core.function.impl.FunctionMatchMetricImpl#getOption Option}
  • + *
  • {@link org.openecomp.ncomp.core.function.impl.FunctionMatchMetricImpl#getLowerBound Lower Bound}
  • + *
  • {@link org.openecomp.ncomp.core.function.impl.FunctionMatchMetricImpl#getUpperBound Upper Bound}
  • + *
  • {@link org.openecomp.ncomp.core.function.impl.FunctionMatchMetricImpl#isNegation Negation}
  • + *
+ *

+ * + * @generated + */ +public class FunctionMatchMetricImpl extends FunctionMatchImpl implements FunctionMatchMetric { + /** + * The default value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected static final String PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected String path = PATH_EDEFAULT; + + /** + * The cached value of the '{@link #getOption() Option}' reference. + * + * + * @see #getOption() + * @generated + * @ordered + */ + protected MetricValueOption option; + + /** + * The default value of the '{@link #getLowerBound() Lower Bound}' attribute. + * + * + * @see #getLowerBound() + * @generated + * @ordered + */ + protected static final Double LOWER_BOUND_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLowerBound() Lower Bound}' attribute. + * + * + * @see #getLowerBound() + * @generated + * @ordered + */ + protected Double lowerBound = LOWER_BOUND_EDEFAULT; + + /** + * The default value of the '{@link #getUpperBound() Upper Bound}' attribute. + * + * + * @see #getUpperBound() + * @generated + * @ordered + */ + protected static final Double UPPER_BOUND_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUpperBound() Upper Bound}' attribute. + * + * + * @see #getUpperBound() + * @generated + * @ordered + */ + protected Double upperBound = UPPER_BOUND_EDEFAULT; + + /** + * The default value of the '{@link #isNegation() Negation}' attribute. + * + * + * @see #isNegation() + * @generated + * @ordered + */ + protected static final boolean NEGATION_EDEFAULT = false; + + /** + * The cached value of the '{@link #isNegation() Negation}' attribute. + * + * + * @see #isNegation() + * @generated + * @ordered + */ + protected boolean negation = NEGATION_EDEFAULT; + + /** + * + * + * @generated + */ + protected FunctionMatchMetricImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.FUNCTION_MATCH_METRIC; + } + + /** + * + * + * @generated + */ + public String getPath() { + return path; + } + + /** + * + * + * @generated + */ + public void setPath(String newPath) { + String oldPath = path; + path = newPath; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionPackage.FUNCTION_MATCH_METRIC__PATH, oldPath, path)); + } + + /** + * + * + * @generated + */ + public MetricValueOption getOption() { + if (option != null && option.eIsProxy()) { + InternalEObject oldOption = (InternalEObject)option; + option = (MetricValueOption)eResolveProxy(oldOption); + if (option != oldOption) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, FunctionPackage.FUNCTION_MATCH_METRIC__OPTION, oldOption, option)); + } + } + return option; + } + + /** + * + * + * @generated + */ + public MetricValueOption basicGetOption() { + return option; + } + + /** + * + * + * @generated + */ + public void setOption(MetricValueOption newOption) { + MetricValueOption oldOption = option; + option = newOption; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionPackage.FUNCTION_MATCH_METRIC__OPTION, oldOption, option)); + } + + /** + * + * + * @generated + */ + public Double getLowerBound() { + return lowerBound; + } + + /** + * + * + * @generated + */ + public void setLowerBound(Double newLowerBound) { + Double oldLowerBound = lowerBound; + lowerBound = newLowerBound; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionPackage.FUNCTION_MATCH_METRIC__LOWER_BOUND, oldLowerBound, lowerBound)); + } + + /** + * + * + * @generated + */ + public Double getUpperBound() { + return upperBound; + } + + /** + * + * + * @generated + */ + public void setUpperBound(Double newUpperBound) { + Double oldUpperBound = upperBound; + upperBound = newUpperBound; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionPackage.FUNCTION_MATCH_METRIC__UPPER_BOUND, oldUpperBound, upperBound)); + } + + /** + * + * + * @generated + */ + public boolean isNegation() { + return negation; + } + + /** + * + * + * @generated + */ + public void setNegation(boolean newNegation) { + boolean oldNegation = negation; + negation = newNegation; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionPackage.FUNCTION_MATCH_METRIC__NEGATION, oldNegation, negation)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionPackage.FUNCTION_MATCH_METRIC__PATH: + return getPath(); + case FunctionPackage.FUNCTION_MATCH_METRIC__OPTION: + if (resolve) return getOption(); + return basicGetOption(); + case FunctionPackage.FUNCTION_MATCH_METRIC__LOWER_BOUND: + return getLowerBound(); + case FunctionPackage.FUNCTION_MATCH_METRIC__UPPER_BOUND: + return getUpperBound(); + case FunctionPackage.FUNCTION_MATCH_METRIC__NEGATION: + return isNegation(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionPackage.FUNCTION_MATCH_METRIC__PATH: + setPath((String)newValue); + return; + case FunctionPackage.FUNCTION_MATCH_METRIC__OPTION: + setOption((MetricValueOption)newValue); + return; + case FunctionPackage.FUNCTION_MATCH_METRIC__LOWER_BOUND: + setLowerBound((Double)newValue); + return; + case FunctionPackage.FUNCTION_MATCH_METRIC__UPPER_BOUND: + setUpperBound((Double)newValue); + return; + case FunctionPackage.FUNCTION_MATCH_METRIC__NEGATION: + setNegation((Boolean)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionPackage.FUNCTION_MATCH_METRIC__PATH: + setPath(PATH_EDEFAULT); + return; + case FunctionPackage.FUNCTION_MATCH_METRIC__OPTION: + setOption((MetricValueOption)null); + return; + case FunctionPackage.FUNCTION_MATCH_METRIC__LOWER_BOUND: + setLowerBound(LOWER_BOUND_EDEFAULT); + return; + case FunctionPackage.FUNCTION_MATCH_METRIC__UPPER_BOUND: + setUpperBound(UPPER_BOUND_EDEFAULT); + return; + case FunctionPackage.FUNCTION_MATCH_METRIC__NEGATION: + setNegation(NEGATION_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionPackage.FUNCTION_MATCH_METRIC__PATH: + return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path); + case FunctionPackage.FUNCTION_MATCH_METRIC__OPTION: + return option != null; + case FunctionPackage.FUNCTION_MATCH_METRIC__LOWER_BOUND: + return LOWER_BOUND_EDEFAULT == null ? lowerBound != null : !LOWER_BOUND_EDEFAULT.equals(lowerBound); + case FunctionPackage.FUNCTION_MATCH_METRIC__UPPER_BOUND: + return UPPER_BOUND_EDEFAULT == null ? upperBound != null : !UPPER_BOUND_EDEFAULT.equals(upperBound); + case FunctionPackage.FUNCTION_MATCH_METRIC__NEGATION: + return negation != NEGATION_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (path: "); + result.append(path); + result.append(", lowerBound: "); + result.append(lowerBound); + result.append(", upperBound: "); + result.append(upperBound); + result.append(", negation: "); + result.append(negation); + result.append(')'); + return result.toString(); + } + +} //FunctionMatchMetricImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionPackageImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionPackageImpl.java new file mode 100644 index 0000000..e944e70 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionPackageImpl.java @@ -0,0 +1,789 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function.impl; + +import org.openecomp.ncomp.core.CorePackage; + +import org.openecomp.ncomp.core.function.Function; +import org.openecomp.ncomp.core.function.FunctionAction; +import org.openecomp.ncomp.core.function.FunctionFactory; +import org.openecomp.ncomp.core.function.FunctionMatch; +import org.openecomp.ncomp.core.function.FunctionMatchAttribute; +import org.openecomp.ncomp.core.function.FunctionMatchInstanceOf; +import org.openecomp.ncomp.core.function.FunctionMatchMetric; +import org.openecomp.ncomp.core.function.FunctionPackage; +import org.openecomp.ncomp.core.function.FunctionRule; +import org.openecomp.ncomp.core.function.FunctionUpdate; +import org.openecomp.ncomp.core.function.FunctionUpdateAttribute; +import org.openecomp.ncomp.core.function.FunctionUpdateRule; +import org.openecomp.ncomp.core.function.Iterator; +import org.openecomp.ncomp.core.function.IteratorUsingFunction; +import org.openecomp.ncomp.core.function.RuleFunction; + +import org.openecomp.ncomp.core.function.RuleUpdateFunction; +import org.openecomp.ncomp.core.function.StringValuePair; +import org.openecomp.ncomp.core.function.ValuePair; +import org.openecomp.ncomp.core.metrics.MetricsPackage; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class FunctionPackageImpl extends EPackageImpl implements FunctionPackage { + /** + * + * + * @generated + */ + private EClass functionEClass = null; + + /** + * + * + * @generated + */ + private EClass iteratorEClass = null; + + /** + * + * + * @generated + */ + private EClass iteratorUsingFunctionEClass = null; + + /** + * + * + * @generated + */ + private EClass ruleFunctionEClass = null; + + /** + * + * + * @generated + */ + private EClass functionRuleEClass = null; + + /** + * + * + * @generated + */ + private EClass functionActionEClass = null; + + /** + * + * + * @generated + */ + private EClass ruleUpdateFunctionEClass = null; + + /** + * + * + * @generated + */ + private EClass functionUpdateRuleEClass = null; + + /** + * + * + * @generated + */ + private EClass functionUpdateEClass = null; + + /** + * + * + * @generated + */ + private EClass functionUpdateAttributeEClass = null; + + /** + * + * + * @generated + */ + private EClass functionMatchEClass = null; + + /** + * + * + * @generated + */ + private EClass functionMatchAttributeEClass = null; + + /** + * + * + * @generated + */ + private EClass functionMatchMetricEClass = null; + + /** + * + * + * @generated + */ + private EClass functionMatchInstanceOfEClass = null; + + /** + * + * + * @generated + */ + private EClass valuePairEClass = null; + + /** + * + * + * @generated + */ + private EClass stringValuePairEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.ncomp.core.function.FunctionPackage#eNS_URI + * @see #init() + * @generated + */ + private FunctionPackageImpl() { + super(eNS_URI, FunctionFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link FunctionPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static FunctionPackage init() { + if (isInited) return (FunctionPackage)EPackage.Registry.INSTANCE.getEPackage(FunctionPackage.eNS_URI); + + // Obtain or create and register package + FunctionPackageImpl theFunctionPackage = (FunctionPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FunctionPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FunctionPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + MetricsPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theFunctionPackage.createPackageContents(); + + // Initialize created meta-data + theFunctionPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theFunctionPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(FunctionPackage.eNS_URI, theFunctionPackage); + return theFunctionPackage; + } + + /** + * + * + * @generated + */ + public EClass getFunction() { + return functionEClass; + } + + /** + * + * + * @generated + */ + public EClass getIterator() { + return iteratorEClass; + } + + /** + * + * + * @generated + */ + public EClass getIteratorUsingFunction() { + return iteratorUsingFunctionEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getIteratorUsingFunction_Paths() { + return (EAttribute)iteratorUsingFunctionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getIteratorUsingFunction_Recursive() { + return (EAttribute)iteratorUsingFunctionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getIteratorUsingFunction_Filter() { + return (EReference)iteratorUsingFunctionEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getRuleFunction() { + return ruleFunctionEClass; + } + + /** + * + * + * @generated + */ + public EReference getRuleFunction_Rules() { + return (EReference)ruleFunctionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getFunctionRule() { + return functionRuleEClass; + } + + /** + * + * + * @generated + */ + public EReference getFunctionRule_Matches() { + return (EReference)functionRuleEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getFunctionRule_Action() { + return (EReference)functionRuleEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getFunctionAction() { + return functionActionEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getFunctionAction_Value() { + return (EAttribute)functionActionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getRuleUpdateFunction() { + return ruleUpdateFunctionEClass; + } + + /** + * + * + * @generated + */ + public EReference getRuleUpdateFunction_Rules() { + return (EReference)ruleUpdateFunctionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getFunctionUpdateRule() { + return functionUpdateRuleEClass; + } + + /** + * + * + * @generated + */ + public EReference getFunctionUpdateRule_Matches() { + return (EReference)functionUpdateRuleEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getFunctionUpdateRule_Updates() { + return (EReference)functionUpdateRuleEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getFunctionUpdate() { + return functionUpdateEClass; + } + + /** + * + * + * @generated + */ + public EClass getFunctionUpdateAttribute() { + return functionUpdateAttributeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getFunctionUpdateAttribute_Path() { + return (EAttribute)functionUpdateAttributeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getFunctionUpdateAttribute_Value() { + return (EAttribute)functionUpdateAttributeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getFunctionMatch() { + return functionMatchEClass; + } + + /** + * + * + * @generated + */ + public EClass getFunctionMatchAttribute() { + return functionMatchAttributeEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getFunctionMatchAttribute_Path() { + return (EAttribute)functionMatchAttributeEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getFunctionMatchAttribute_Match() { + return (EAttribute)functionMatchAttributeEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getFunctionMatchAttribute_Negation() { + return (EAttribute)functionMatchAttributeEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getFunctionMatchMetric() { + return functionMatchMetricEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getFunctionMatchMetric_Path() { + return (EAttribute)functionMatchMetricEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getFunctionMatchMetric_Option() { + return (EReference)functionMatchMetricEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getFunctionMatchMetric_LowerBound() { + return (EAttribute)functionMatchMetricEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getFunctionMatchMetric_UpperBound() { + return (EAttribute)functionMatchMetricEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getFunctionMatchMetric_Negation() { + return (EAttribute)functionMatchMetricEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EClass getFunctionMatchInstanceOf() { + return functionMatchInstanceOfEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getFunctionMatchInstanceOf_EPackage() { + return (EAttribute)functionMatchInstanceOfEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getFunctionMatchInstanceOf_EName() { + return (EAttribute)functionMatchInstanceOfEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getValuePair() { + return valuePairEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getValuePair_Path() { + return (EAttribute)valuePairEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getStringValuePair() { + return stringValuePairEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getStringValuePair_Value() { + return (EAttribute)stringValuePairEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public FunctionFactory getFunctionFactory() { + return (FunctionFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + functionEClass = createEClass(FUNCTION); + + iteratorEClass = createEClass(ITERATOR); + + iteratorUsingFunctionEClass = createEClass(ITERATOR_USING_FUNCTION); + createEAttribute(iteratorUsingFunctionEClass, ITERATOR_USING_FUNCTION__PATHS); + createEAttribute(iteratorUsingFunctionEClass, ITERATOR_USING_FUNCTION__RECURSIVE); + createEReference(iteratorUsingFunctionEClass, ITERATOR_USING_FUNCTION__FILTER); + + ruleFunctionEClass = createEClass(RULE_FUNCTION); + createEReference(ruleFunctionEClass, RULE_FUNCTION__RULES); + + functionRuleEClass = createEClass(FUNCTION_RULE); + createEReference(functionRuleEClass, FUNCTION_RULE__MATCHES); + createEReference(functionRuleEClass, FUNCTION_RULE__ACTION); + + functionActionEClass = createEClass(FUNCTION_ACTION); + createEAttribute(functionActionEClass, FUNCTION_ACTION__VALUE); + + ruleUpdateFunctionEClass = createEClass(RULE_UPDATE_FUNCTION); + createEReference(ruleUpdateFunctionEClass, RULE_UPDATE_FUNCTION__RULES); + + functionUpdateRuleEClass = createEClass(FUNCTION_UPDATE_RULE); + createEReference(functionUpdateRuleEClass, FUNCTION_UPDATE_RULE__MATCHES); + createEReference(functionUpdateRuleEClass, FUNCTION_UPDATE_RULE__UPDATES); + + functionUpdateEClass = createEClass(FUNCTION_UPDATE); + + functionUpdateAttributeEClass = createEClass(FUNCTION_UPDATE_ATTRIBUTE); + createEAttribute(functionUpdateAttributeEClass, FUNCTION_UPDATE_ATTRIBUTE__PATH); + createEAttribute(functionUpdateAttributeEClass, FUNCTION_UPDATE_ATTRIBUTE__VALUE); + + functionMatchEClass = createEClass(FUNCTION_MATCH); + + functionMatchAttributeEClass = createEClass(FUNCTION_MATCH_ATTRIBUTE); + createEAttribute(functionMatchAttributeEClass, FUNCTION_MATCH_ATTRIBUTE__PATH); + createEAttribute(functionMatchAttributeEClass, FUNCTION_MATCH_ATTRIBUTE__MATCH); + createEAttribute(functionMatchAttributeEClass, FUNCTION_MATCH_ATTRIBUTE__NEGATION); + + functionMatchMetricEClass = createEClass(FUNCTION_MATCH_METRIC); + createEAttribute(functionMatchMetricEClass, FUNCTION_MATCH_METRIC__PATH); + createEReference(functionMatchMetricEClass, FUNCTION_MATCH_METRIC__OPTION); + createEAttribute(functionMatchMetricEClass, FUNCTION_MATCH_METRIC__LOWER_BOUND); + createEAttribute(functionMatchMetricEClass, FUNCTION_MATCH_METRIC__UPPER_BOUND); + createEAttribute(functionMatchMetricEClass, FUNCTION_MATCH_METRIC__NEGATION); + + functionMatchInstanceOfEClass = createEClass(FUNCTION_MATCH_INSTANCE_OF); + createEAttribute(functionMatchInstanceOfEClass, FUNCTION_MATCH_INSTANCE_OF__EPACKAGE); + createEAttribute(functionMatchInstanceOfEClass, FUNCTION_MATCH_INSTANCE_OF__ENAME); + + valuePairEClass = createEClass(VALUE_PAIR); + createEAttribute(valuePairEClass, VALUE_PAIR__PATH); + + stringValuePairEClass = createEClass(STRING_VALUE_PAIR); + createEAttribute(stringValuePairEClass, STRING_VALUE_PAIR__VALUE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + MetricsPackage theMetricsPackage = (MetricsPackage)EPackage.Registry.INSTANCE.getEPackage(MetricsPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + functionEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + iteratorEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + iteratorUsingFunctionEClass.getESuperTypes().add(this.getIterator()); + ruleFunctionEClass.getESuperTypes().add(this.getFunction()); + ruleUpdateFunctionEClass.getESuperTypes().add(this.getFunction()); + functionUpdateAttributeEClass.getESuperTypes().add(this.getFunctionUpdate()); + functionMatchAttributeEClass.getESuperTypes().add(this.getFunctionMatch()); + functionMatchMetricEClass.getESuperTypes().add(this.getFunctionMatch()); + functionMatchInstanceOfEClass.getESuperTypes().add(this.getFunctionMatch()); + stringValuePairEClass.getESuperTypes().add(this.getValuePair()); + + // Initialize classes, features, and operations; add parameters + initEClass(functionEClass, Function.class, "Function", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(iteratorEClass, Iterator.class, "Iterator", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(iteratorUsingFunctionEClass, IteratorUsingFunction.class, "IteratorUsingFunction", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getIteratorUsingFunction_Paths(), theEcorePackage.getEString(), "paths", null, 0, -1, IteratorUsingFunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getIteratorUsingFunction_Recursive(), theEcorePackage.getEBoolean(), "recursive", null, 0, 1, IteratorUsingFunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getIteratorUsingFunction_Filter(), this.getFunction(), null, "filter", null, 0, 1, IteratorUsingFunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(ruleFunctionEClass, RuleFunction.class, "RuleFunction", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getRuleFunction_Rules(), this.getFunctionRule(), null, "rules", null, 0, -1, RuleFunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(functionRuleEClass, FunctionRule.class, "FunctionRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFunctionRule_Matches(), this.getFunctionMatch(), null, "matches", null, 0, -1, FunctionRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getFunctionRule_Action(), this.getFunctionAction(), null, "action", null, 0, 1, FunctionRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(functionActionEClass, FunctionAction.class, "FunctionAction", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getFunctionAction_Value(), theEcorePackage.getEString(), "value", null, 0, 1, FunctionAction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(ruleUpdateFunctionEClass, RuleUpdateFunction.class, "RuleUpdateFunction", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getRuleUpdateFunction_Rules(), this.getFunctionUpdateRule(), null, "rules", null, 0, -1, RuleUpdateFunction.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(functionUpdateRuleEClass, FunctionUpdateRule.class, "FunctionUpdateRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFunctionUpdateRule_Matches(), this.getFunctionMatch(), null, "matches", null, 0, -1, FunctionUpdateRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getFunctionUpdateRule_Updates(), this.getFunctionUpdate(), null, "updates", null, 0, -1, FunctionUpdateRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(functionUpdateEClass, FunctionUpdate.class, "FunctionUpdate", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(functionUpdateAttributeEClass, FunctionUpdateAttribute.class, "FunctionUpdateAttribute", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getFunctionUpdateAttribute_Path(), theEcorePackage.getEString(), "path", null, 0, 1, FunctionUpdateAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFunctionUpdateAttribute_Value(), theEcorePackage.getEString(), "value", null, 0, 1, FunctionUpdateAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(functionMatchEClass, FunctionMatch.class, "FunctionMatch", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(functionMatchAttributeEClass, FunctionMatchAttribute.class, "FunctionMatchAttribute", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getFunctionMatchAttribute_Path(), theEcorePackage.getEString(), "path", null, 0, 1, FunctionMatchAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFunctionMatchAttribute_Match(), theEcorePackage.getEString(), "match", null, 0, 1, FunctionMatchAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFunctionMatchAttribute_Negation(), theEcorePackage.getEBoolean(), "negation", null, 0, 1, FunctionMatchAttribute.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(functionMatchMetricEClass, FunctionMatchMetric.class, "FunctionMatchMetric", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getFunctionMatchMetric_Path(), theEcorePackage.getEString(), "path", null, 0, 1, FunctionMatchMetric.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getFunctionMatchMetric_Option(), theMetricsPackage.getMetricValueOption(), null, "option", null, 0, 1, FunctionMatchMetric.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFunctionMatchMetric_LowerBound(), theEcorePackage.getEDoubleObject(), "lowerBound", null, 0, 1, FunctionMatchMetric.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFunctionMatchMetric_UpperBound(), theEcorePackage.getEDoubleObject(), "upperBound", null, 0, 1, FunctionMatchMetric.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFunctionMatchMetric_Negation(), theEcorePackage.getEBoolean(), "negation", null, 0, 1, FunctionMatchMetric.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(functionMatchInstanceOfEClass, FunctionMatchInstanceOf.class, "FunctionMatchInstanceOf", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getFunctionMatchInstanceOf_EPackage(), theEcorePackage.getEString(), "ePackage", null, 0, 1, FunctionMatchInstanceOf.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFunctionMatchInstanceOf_EName(), theEcorePackage.getEString(), "eName", null, 0, 1, FunctionMatchInstanceOf.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(valuePairEClass, ValuePair.class, "ValuePair", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getValuePair_Path(), theEcorePackage.getEString(), "path", null, 0, 1, ValuePair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(stringValuePairEClass, StringValuePair.class, "StringValuePair", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getStringValuePair_Value(), theEcorePackage.getEString(), "value", null, 0, 1, StringValuePair.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + } + +} //FunctionPackageImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionRuleImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionRuleImpl.java new file mode 100644 index 0000000..0680329 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionRuleImpl.java @@ -0,0 +1,242 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function.impl; + +import org.openecomp.ncomp.core.function.FunctionAction; +import org.openecomp.ncomp.core.function.FunctionMatch; +import org.openecomp.ncomp.core.function.FunctionPackage; +import org.openecomp.ncomp.core.function.FunctionRule; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Rule'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.function.impl.FunctionRuleImpl#getMatches Matches}
  • + *
  • {@link org.openecomp.ncomp.core.function.impl.FunctionRuleImpl#getAction Action}
  • + *
+ *

+ * + * @generated + */ +public class FunctionRuleImpl extends MinimalEObjectImpl.Container implements FunctionRule { + /** + * The cached value of the '{@link #getMatches() Matches}' containment reference list. + * + * + * @see #getMatches() + * @generated + * @ordered + */ + protected EList matches; + + /** + * The cached value of the '{@link #getAction() Action}' containment reference. + * + * + * @see #getAction() + * @generated + * @ordered + */ + protected FunctionAction action; + + /** + * + * + * @generated + */ + protected FunctionRuleImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.FUNCTION_RULE; + } + + /** + * + * + * @generated + */ + public EList getMatches() { + if (matches == null) { + matches = new EObjectContainmentEList(FunctionMatch.class, this, FunctionPackage.FUNCTION_RULE__MATCHES); + } + return matches; + } + + /** + * + * + * @generated + */ + public FunctionAction getAction() { + return action; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetAction(FunctionAction newAction, NotificationChain msgs) { + FunctionAction oldAction = action; + action = newAction; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FunctionPackage.FUNCTION_RULE__ACTION, oldAction, newAction); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setAction(FunctionAction newAction) { + if (newAction != action) { + NotificationChain msgs = null; + if (action != null) + msgs = ((InternalEObject)action).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FunctionPackage.FUNCTION_RULE__ACTION, null, msgs); + if (newAction != null) + msgs = ((InternalEObject)newAction).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FunctionPackage.FUNCTION_RULE__ACTION, null, msgs); + msgs = basicSetAction(newAction, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionPackage.FUNCTION_RULE__ACTION, newAction, newAction)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionPackage.FUNCTION_RULE__MATCHES: + return ((InternalEList)getMatches()).basicRemove(otherEnd, msgs); + case FunctionPackage.FUNCTION_RULE__ACTION: + return basicSetAction(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionPackage.FUNCTION_RULE__MATCHES: + return getMatches(); + case FunctionPackage.FUNCTION_RULE__ACTION: + return getAction(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionPackage.FUNCTION_RULE__MATCHES: + getMatches().clear(); + getMatches().addAll((Collection)newValue); + return; + case FunctionPackage.FUNCTION_RULE__ACTION: + setAction((FunctionAction)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionPackage.FUNCTION_RULE__MATCHES: + getMatches().clear(); + return; + case FunctionPackage.FUNCTION_RULE__ACTION: + setAction((FunctionAction)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionPackage.FUNCTION_RULE__MATCHES: + return matches != null && !matches.isEmpty(); + case FunctionPackage.FUNCTION_RULE__ACTION: + return action != null; + } + return super.eIsSet(featureID); + } + +} //FunctionRuleImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionUpdateAttributeImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionUpdateAttributeImpl.java new file mode 100644 index 0000000..62fe257 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionUpdateAttributeImpl.java @@ -0,0 +1,237 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function.impl; + +import org.openecomp.ncomp.core.function.FunctionPackage; +import org.openecomp.ncomp.core.function.FunctionUpdateAttribute; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Update Attribute'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.function.impl.FunctionUpdateAttributeImpl#getPath Path}
  • + *
  • {@link org.openecomp.ncomp.core.function.impl.FunctionUpdateAttributeImpl#getValue Value}
  • + *
+ *

+ * + * @generated + */ +public class FunctionUpdateAttributeImpl extends FunctionUpdateImpl implements FunctionUpdateAttribute { + /** + * The default value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected static final String PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected String path = PATH_EDEFAULT; + + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected FunctionUpdateAttributeImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.FUNCTION_UPDATE_ATTRIBUTE; + } + + /** + * + * + * @generated + */ + public String getPath() { + return path; + } + + /** + * + * + * @generated + */ + public void setPath(String newPath) { + String oldPath = path; + path = newPath; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionPackage.FUNCTION_UPDATE_ATTRIBUTE__PATH, oldPath, path)); + } + + /** + * + * + * @generated + */ + public String getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(String newValue) { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionPackage.FUNCTION_UPDATE_ATTRIBUTE__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionPackage.FUNCTION_UPDATE_ATTRIBUTE__PATH: + return getPath(); + case FunctionPackage.FUNCTION_UPDATE_ATTRIBUTE__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionPackage.FUNCTION_UPDATE_ATTRIBUTE__PATH: + setPath((String)newValue); + return; + case FunctionPackage.FUNCTION_UPDATE_ATTRIBUTE__VALUE: + setValue((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionPackage.FUNCTION_UPDATE_ATTRIBUTE__PATH: + setPath(PATH_EDEFAULT); + return; + case FunctionPackage.FUNCTION_UPDATE_ATTRIBUTE__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionPackage.FUNCTION_UPDATE_ATTRIBUTE__PATH: + return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path); + case FunctionPackage.FUNCTION_UPDATE_ATTRIBUTE__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (path: "); + result.append(path); + result.append(", value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //FunctionUpdateAttributeImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionUpdateImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionUpdateImpl.java new file mode 100644 index 0000000..b79bc88 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionUpdateImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function.impl; + +import org.openecomp.ncomp.core.function.FunctionPackage; +import org.openecomp.ncomp.core.function.FunctionUpdate; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Update'. + * + *

+ *

+ * + * @generated + */ +public abstract class FunctionUpdateImpl extends MinimalEObjectImpl.Container implements FunctionUpdate { + /** + * + * + * @generated + */ + protected FunctionUpdateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.FUNCTION_UPDATE; + } + +} //FunctionUpdateImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionUpdateRuleImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionUpdateRuleImpl.java new file mode 100644 index 0000000..84eda29 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/FunctionUpdateRuleImpl.java @@ -0,0 +1,210 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function.impl; + +import org.openecomp.ncomp.core.function.FunctionMatch; +import org.openecomp.ncomp.core.function.FunctionPackage; +import org.openecomp.ncomp.core.function.FunctionUpdate; +import org.openecomp.ncomp.core.function.FunctionUpdateRule; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Update Rule'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.function.impl.FunctionUpdateRuleImpl#getMatches Matches}
  • + *
  • {@link org.openecomp.ncomp.core.function.impl.FunctionUpdateRuleImpl#getUpdates Updates}
  • + *
+ *

+ * + * @generated + */ +public class FunctionUpdateRuleImpl extends MinimalEObjectImpl.Container implements FunctionUpdateRule { + /** + * The cached value of the '{@link #getMatches() Matches}' containment reference list. + * + * + * @see #getMatches() + * @generated + * @ordered + */ + protected EList matches; + + /** + * The cached value of the '{@link #getUpdates() Updates}' containment reference list. + * + * + * @see #getUpdates() + * @generated + * @ordered + */ + protected EList updates; + + /** + * + * + * @generated + */ + protected FunctionUpdateRuleImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.FUNCTION_UPDATE_RULE; + } + + /** + * + * + * @generated + */ + public EList getMatches() { + if (matches == null) { + matches = new EObjectContainmentEList(FunctionMatch.class, this, FunctionPackage.FUNCTION_UPDATE_RULE__MATCHES); + } + return matches; + } + + /** + * + * + * @generated + */ + public EList getUpdates() { + if (updates == null) { + updates = new EObjectContainmentEList(FunctionUpdate.class, this, FunctionPackage.FUNCTION_UPDATE_RULE__UPDATES); + } + return updates; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionPackage.FUNCTION_UPDATE_RULE__MATCHES: + return ((InternalEList)getMatches()).basicRemove(otherEnd, msgs); + case FunctionPackage.FUNCTION_UPDATE_RULE__UPDATES: + return ((InternalEList)getUpdates()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionPackage.FUNCTION_UPDATE_RULE__MATCHES: + return getMatches(); + case FunctionPackage.FUNCTION_UPDATE_RULE__UPDATES: + return getUpdates(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionPackage.FUNCTION_UPDATE_RULE__MATCHES: + getMatches().clear(); + getMatches().addAll((Collection)newValue); + return; + case FunctionPackage.FUNCTION_UPDATE_RULE__UPDATES: + getUpdates().clear(); + getUpdates().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionPackage.FUNCTION_UPDATE_RULE__MATCHES: + getMatches().clear(); + return; + case FunctionPackage.FUNCTION_UPDATE_RULE__UPDATES: + getUpdates().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionPackage.FUNCTION_UPDATE_RULE__MATCHES: + return matches != null && !matches.isEmpty(); + case FunctionPackage.FUNCTION_UPDATE_RULE__UPDATES: + return updates != null && !updates.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //FunctionUpdateRuleImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/IteratorImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/IteratorImpl.java new file mode 100644 index 0000000..f7efce7 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/IteratorImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function.impl; + +import org.openecomp.ncomp.core.function.FunctionPackage; +import org.openecomp.ncomp.core.function.Iterator; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Iterator'. + * + *

+ *

+ * + * @generated + */ +public abstract class IteratorImpl extends NamedEntityImpl implements Iterator { + /** + * + * + * @generated + */ + protected IteratorImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.ITERATOR; + } + +} //IteratorImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/IteratorUsingFunctionImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/IteratorUsingFunctionImpl.java new file mode 100644 index 0000000..df5ed3c --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/IteratorUsingFunctionImpl.java @@ -0,0 +1,307 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function.impl; + +import org.openecomp.ncomp.core.function.Function; +import org.openecomp.ncomp.core.function.FunctionPackage; +import org.openecomp.ncomp.core.function.IteratorUsingFunction; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +import org.eclipse.emf.ecore.util.EDataTypeEList; + +/** + * + * An implementation of the model object 'Iterator Using Function'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.function.impl.IteratorUsingFunctionImpl#getPaths Paths}
  • + *
  • {@link org.openecomp.ncomp.core.function.impl.IteratorUsingFunctionImpl#isRecursive Recursive}
  • + *
  • {@link org.openecomp.ncomp.core.function.impl.IteratorUsingFunctionImpl#getFilter Filter}
  • + *
+ *

+ * + * @generated + */ +public class IteratorUsingFunctionImpl extends IteratorImpl implements IteratorUsingFunction { + /** + * The cached value of the '{@link #getPaths() Paths}' attribute list. + * + * + * @see #getPaths() + * @generated + * @ordered + */ + protected EList paths; + + /** + * The default value of the '{@link #isRecursive() Recursive}' attribute. + * + * + * @see #isRecursive() + * @generated + * @ordered + */ + protected static final boolean RECURSIVE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isRecursive() Recursive}' attribute. + * + * + * @see #isRecursive() + * @generated + * @ordered + */ + protected boolean recursive = RECURSIVE_EDEFAULT; + + /** + * The cached value of the '{@link #getFilter() Filter}' containment reference. + * + * + * @see #getFilter() + * @generated + * @ordered + */ + protected Function filter; + + /** + * + * + * @generated + */ + protected IteratorUsingFunctionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.ITERATOR_USING_FUNCTION; + } + + /** + * + * + * @generated + */ + public EList getPaths() { + if (paths == null) { + paths = new EDataTypeEList(String.class, this, FunctionPackage.ITERATOR_USING_FUNCTION__PATHS); + } + return paths; + } + + /** + * + * + * @generated + */ + public boolean isRecursive() { + return recursive; + } + + /** + * + * + * @generated + */ + public void setRecursive(boolean newRecursive) { + boolean oldRecursive = recursive; + recursive = newRecursive; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionPackage.ITERATOR_USING_FUNCTION__RECURSIVE, oldRecursive, recursive)); + } + + /** + * + * + * @generated + */ + public Function getFilter() { + return filter; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetFilter(Function newFilter, NotificationChain msgs) { + Function oldFilter = filter; + filter = newFilter; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FunctionPackage.ITERATOR_USING_FUNCTION__FILTER, oldFilter, newFilter); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setFilter(Function newFilter) { + if (newFilter != filter) { + NotificationChain msgs = null; + if (filter != null) + msgs = ((InternalEObject)filter).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FunctionPackage.ITERATOR_USING_FUNCTION__FILTER, null, msgs); + if (newFilter != null) + msgs = ((InternalEObject)newFilter).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - FunctionPackage.ITERATOR_USING_FUNCTION__FILTER, null, msgs); + msgs = basicSetFilter(newFilter, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionPackage.ITERATOR_USING_FUNCTION__FILTER, newFilter, newFilter)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionPackage.ITERATOR_USING_FUNCTION__FILTER: + return basicSetFilter(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionPackage.ITERATOR_USING_FUNCTION__PATHS: + return getPaths(); + case FunctionPackage.ITERATOR_USING_FUNCTION__RECURSIVE: + return isRecursive(); + case FunctionPackage.ITERATOR_USING_FUNCTION__FILTER: + return getFilter(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionPackage.ITERATOR_USING_FUNCTION__PATHS: + getPaths().clear(); + getPaths().addAll((Collection)newValue); + return; + case FunctionPackage.ITERATOR_USING_FUNCTION__RECURSIVE: + setRecursive((Boolean)newValue); + return; + case FunctionPackage.ITERATOR_USING_FUNCTION__FILTER: + setFilter((Function)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionPackage.ITERATOR_USING_FUNCTION__PATHS: + getPaths().clear(); + return; + case FunctionPackage.ITERATOR_USING_FUNCTION__RECURSIVE: + setRecursive(RECURSIVE_EDEFAULT); + return; + case FunctionPackage.ITERATOR_USING_FUNCTION__FILTER: + setFilter((Function)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionPackage.ITERATOR_USING_FUNCTION__PATHS: + return paths != null && !paths.isEmpty(); + case FunctionPackage.ITERATOR_USING_FUNCTION__RECURSIVE: + return recursive != RECURSIVE_EDEFAULT; + case FunctionPackage.ITERATOR_USING_FUNCTION__FILTER: + return filter != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (paths: "); + result.append(paths); + result.append(", recursive: "); + result.append(recursive); + result.append(')'); + return result.toString(); + } + +} //IteratorUsingFunctionImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/RuleFunctionImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/RuleFunctionImpl.java new file mode 100644 index 0000000..1d399e6 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/RuleFunctionImpl.java @@ -0,0 +1,171 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function.impl; + +import org.openecomp.ncomp.core.function.FunctionPackage; +import org.openecomp.ncomp.core.function.FunctionRule; +import org.openecomp.ncomp.core.function.RuleFunction; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Rule Function'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.function.impl.RuleFunctionImpl#getRules Rules}
  • + *
+ *

+ * + * @generated + */ +public class RuleFunctionImpl extends FunctionImpl implements RuleFunction { + /** + * The cached value of the '{@link #getRules() Rules}' containment reference list. + * + * + * @see #getRules() + * @generated + * @ordered + */ + protected EList rules; + + /** + * + * + * @generated + */ + protected RuleFunctionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.RULE_FUNCTION; + } + + /** + * + * + * @generated + */ + public EList getRules() { + if (rules == null) { + rules = new EObjectContainmentEList(FunctionRule.class, this, FunctionPackage.RULE_FUNCTION__RULES); + } + return rules; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionPackage.RULE_FUNCTION__RULES: + return ((InternalEList)getRules()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionPackage.RULE_FUNCTION__RULES: + return getRules(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionPackage.RULE_FUNCTION__RULES: + getRules().clear(); + getRules().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionPackage.RULE_FUNCTION__RULES: + getRules().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionPackage.RULE_FUNCTION__RULES: + return rules != null && !rules.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //RuleFunctionImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/RuleUpdateFunctionImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/RuleUpdateFunctionImpl.java new file mode 100644 index 0000000..97e03c8 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/RuleUpdateFunctionImpl.java @@ -0,0 +1,171 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function.impl; + +import org.openecomp.ncomp.core.function.FunctionPackage; +import org.openecomp.ncomp.core.function.FunctionUpdateRule; +import org.openecomp.ncomp.core.function.RuleUpdateFunction; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Rule Update Function'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.function.impl.RuleUpdateFunctionImpl#getRules Rules}
  • + *
+ *

+ * + * @generated + */ +public class RuleUpdateFunctionImpl extends FunctionImpl implements RuleUpdateFunction { + /** + * The cached value of the '{@link #getRules() Rules}' containment reference list. + * + * + * @see #getRules() + * @generated + * @ordered + */ + protected EList rules; + + /** + * + * + * @generated + */ + protected RuleUpdateFunctionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.RULE_UPDATE_FUNCTION; + } + + /** + * + * + * @generated + */ + public EList getRules() { + if (rules == null) { + rules = new EObjectContainmentEList(FunctionUpdateRule.class, this, FunctionPackage.RULE_UPDATE_FUNCTION__RULES); + } + return rules; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case FunctionPackage.RULE_UPDATE_FUNCTION__RULES: + return ((InternalEList)getRules()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionPackage.RULE_UPDATE_FUNCTION__RULES: + return getRules(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionPackage.RULE_UPDATE_FUNCTION__RULES: + getRules().clear(); + getRules().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionPackage.RULE_UPDATE_FUNCTION__RULES: + getRules().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionPackage.RULE_UPDATE_FUNCTION__RULES: + return rules != null && !rules.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //RuleUpdateFunctionImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/StringValuePairImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/StringValuePairImpl.java new file mode 100644 index 0000000..72c4b55 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/StringValuePairImpl.java @@ -0,0 +1,183 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function.impl; + +import org.openecomp.ncomp.core.function.FunctionPackage; +import org.openecomp.ncomp.core.function.StringValuePair; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'String Value Pair'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.function.impl.StringValuePairImpl#getValue Value}
  • + *
+ *

+ * + * @generated + */ +public class StringValuePairImpl extends ValuePairImpl implements StringValuePair { + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected StringValuePairImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.STRING_VALUE_PAIR; + } + + /** + * + * + * @generated + */ + public String getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(String newValue) { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionPackage.STRING_VALUE_PAIR__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionPackage.STRING_VALUE_PAIR__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionPackage.STRING_VALUE_PAIR__VALUE: + setValue((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionPackage.STRING_VALUE_PAIR__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionPackage.STRING_VALUE_PAIR__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //StringValuePairImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/ValuePairImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/ValuePairImpl.java new file mode 100644 index 0000000..b0eb67c --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/impl/ValuePairImpl.java @@ -0,0 +1,184 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function.impl; + +import org.openecomp.ncomp.core.function.FunctionPackage; +import org.openecomp.ncomp.core.function.ValuePair; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Value Pair'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.function.impl.ValuePairImpl#getPath Path}
  • + *
+ *

+ * + * @generated + */ +public abstract class ValuePairImpl extends MinimalEObjectImpl.Container implements ValuePair { + /** + * The default value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected static final String PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected String path = PATH_EDEFAULT; + + /** + * + * + * @generated + */ + protected ValuePairImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.VALUE_PAIR; + } + + /** + * + * + * @generated + */ + public String getPath() { + return path; + } + + /** + * + * + * @generated + */ + public void setPath(String newPath) { + String oldPath = path; + path = newPath; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionPackage.VALUE_PAIR__PATH, oldPath, path)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FunctionPackage.VALUE_PAIR__PATH: + return getPath(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionPackage.VALUE_PAIR__PATH: + setPath((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionPackage.VALUE_PAIR__PATH: + setPath(PATH_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FunctionPackage.VALUE_PAIR__PATH: + return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (path: "); + result.append(path); + result.append(')'); + return result.toString(); + } + +} //ValuePairImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/util/.gitignore b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/util/.gitignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/util/.gitignore @@ -0,0 +1 @@ + diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/util/FunctionAdapterFactory.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/util/FunctionAdapterFactory.java new file mode 100644 index 0000000..1ac3abc --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/util/FunctionAdapterFactory.java @@ -0,0 +1,431 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function.util; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.function.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.ncomp.core.function.FunctionPackage + * @generated + */ +public class FunctionAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static FunctionPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public FunctionAdapterFactory() { + if (modelPackage == null) { + modelPackage = FunctionPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected FunctionSwitch modelSwitch = + new FunctionSwitch() { + @Override + public Adapter caseFunction(Function object) { + return createFunctionAdapter(); + } + @Override + public Adapter caseIterator(Iterator object) { + return createIteratorAdapter(); + } + @Override + public Adapter caseIteratorUsingFunction(IteratorUsingFunction object) { + return createIteratorUsingFunctionAdapter(); + } + @Override + public Adapter caseRuleFunction(RuleFunction object) { + return createRuleFunctionAdapter(); + } + @Override + public Adapter caseFunctionRule(FunctionRule object) { + return createFunctionRuleAdapter(); + } + @Override + public Adapter caseFunctionAction(FunctionAction object) { + return createFunctionActionAdapter(); + } + @Override + public Adapter caseRuleUpdateFunction(RuleUpdateFunction object) { + return createRuleUpdateFunctionAdapter(); + } + @Override + public Adapter caseFunctionUpdateRule(FunctionUpdateRule object) { + return createFunctionUpdateRuleAdapter(); + } + @Override + public Adapter caseFunctionUpdate(FunctionUpdate object) { + return createFunctionUpdateAdapter(); + } + @Override + public Adapter caseFunctionUpdateAttribute(FunctionUpdateAttribute object) { + return createFunctionUpdateAttributeAdapter(); + } + @Override + public Adapter caseFunctionMatch(FunctionMatch object) { + return createFunctionMatchAdapter(); + } + @Override + public Adapter caseFunctionMatchAttribute(FunctionMatchAttribute object) { + return createFunctionMatchAttributeAdapter(); + } + @Override + public Adapter caseFunctionMatchMetric(FunctionMatchMetric object) { + return createFunctionMatchMetricAdapter(); + } + @Override + public Adapter caseFunctionMatchInstanceOf(FunctionMatchInstanceOf object) { + return createFunctionMatchInstanceOfAdapter(); + } + @Override + public Adapter caseValuePair(ValuePair object) { + return createValuePairAdapter(); + } + @Override + public Adapter caseStringValuePair(StringValuePair object) { + return createStringValuePairAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.function.Function Function}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.function.Function + * @generated + */ + public Adapter createFunctionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.function.Iterator Iterator}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.function.Iterator + * @generated + */ + public Adapter createIteratorAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.function.IteratorUsingFunction Iterator Using Function}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.function.IteratorUsingFunction + * @generated + */ + public Adapter createIteratorUsingFunctionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.function.RuleFunction Rule Function}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.function.RuleFunction + * @generated + */ + public Adapter createRuleFunctionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.function.FunctionRule Rule}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.function.FunctionRule + * @generated + */ + public Adapter createFunctionRuleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.function.FunctionAction Action}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.function.FunctionAction + * @generated + */ + public Adapter createFunctionActionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.function.RuleUpdateFunction Rule Update Function}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.function.RuleUpdateFunction + * @generated + */ + public Adapter createRuleUpdateFunctionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.function.FunctionUpdateRule Update Rule}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.function.FunctionUpdateRule + * @generated + */ + public Adapter createFunctionUpdateRuleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.function.FunctionUpdate Update}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.function.FunctionUpdate + * @generated + */ + public Adapter createFunctionUpdateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.function.FunctionUpdateAttribute Update Attribute}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.function.FunctionUpdateAttribute + * @generated + */ + public Adapter createFunctionUpdateAttributeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.function.FunctionMatch Match}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.function.FunctionMatch + * @generated + */ + public Adapter createFunctionMatchAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.function.FunctionMatchAttribute Match Attribute}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.function.FunctionMatchAttribute + * @generated + */ + public Adapter createFunctionMatchAttributeAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.function.FunctionMatchMetric Match Metric}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.function.FunctionMatchMetric + * @generated + */ + public Adapter createFunctionMatchMetricAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.function.FunctionMatchInstanceOf Match Instance Of}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.function.FunctionMatchInstanceOf + * @generated + */ + public Adapter createFunctionMatchInstanceOfAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.function.ValuePair Value Pair}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.function.ValuePair + * @generated + */ + public Adapter createValuePairAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.function.StringValuePair String Value Pair}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.function.StringValuePair + * @generated + */ + public Adapter createStringValuePairAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //FunctionAdapterFactory diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/util/FunctionSwitch.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/util/FunctionSwitch.java new file mode 100644 index 0000000..5b6dd4c --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/function/util/FunctionSwitch.java @@ -0,0 +1,476 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.function.util; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.function.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.ncomp.core.function.FunctionPackage + * @generated + */ +public class FunctionSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static FunctionPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public FunctionSwitch() { + if (modelPackage == null) { + modelPackage = FunctionPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case FunctionPackage.FUNCTION: { + Function function = (Function)theEObject; + T result = caseFunction(function); + if (result == null) result = caseNamedEntity(function); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionPackage.ITERATOR: { + Iterator iterator = (Iterator)theEObject; + T result = caseIterator(iterator); + if (result == null) result = caseNamedEntity(iterator); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionPackage.ITERATOR_USING_FUNCTION: { + IteratorUsingFunction iteratorUsingFunction = (IteratorUsingFunction)theEObject; + T result = caseIteratorUsingFunction(iteratorUsingFunction); + if (result == null) result = caseIterator(iteratorUsingFunction); + if (result == null) result = caseNamedEntity(iteratorUsingFunction); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionPackage.RULE_FUNCTION: { + RuleFunction ruleFunction = (RuleFunction)theEObject; + T result = caseRuleFunction(ruleFunction); + if (result == null) result = caseFunction(ruleFunction); + if (result == null) result = caseNamedEntity(ruleFunction); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionPackage.FUNCTION_RULE: { + FunctionRule functionRule = (FunctionRule)theEObject; + T result = caseFunctionRule(functionRule); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionPackage.FUNCTION_ACTION: { + FunctionAction functionAction = (FunctionAction)theEObject; + T result = caseFunctionAction(functionAction); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionPackage.RULE_UPDATE_FUNCTION: { + RuleUpdateFunction ruleUpdateFunction = (RuleUpdateFunction)theEObject; + T result = caseRuleUpdateFunction(ruleUpdateFunction); + if (result == null) result = caseFunction(ruleUpdateFunction); + if (result == null) result = caseNamedEntity(ruleUpdateFunction); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionPackage.FUNCTION_UPDATE_RULE: { + FunctionUpdateRule functionUpdateRule = (FunctionUpdateRule)theEObject; + T result = caseFunctionUpdateRule(functionUpdateRule); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionPackage.FUNCTION_UPDATE: { + FunctionUpdate functionUpdate = (FunctionUpdate)theEObject; + T result = caseFunctionUpdate(functionUpdate); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionPackage.FUNCTION_UPDATE_ATTRIBUTE: { + FunctionUpdateAttribute functionUpdateAttribute = (FunctionUpdateAttribute)theEObject; + T result = caseFunctionUpdateAttribute(functionUpdateAttribute); + if (result == null) result = caseFunctionUpdate(functionUpdateAttribute); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionPackage.FUNCTION_MATCH: { + FunctionMatch functionMatch = (FunctionMatch)theEObject; + T result = caseFunctionMatch(functionMatch); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionPackage.FUNCTION_MATCH_ATTRIBUTE: { + FunctionMatchAttribute functionMatchAttribute = (FunctionMatchAttribute)theEObject; + T result = caseFunctionMatchAttribute(functionMatchAttribute); + if (result == null) result = caseFunctionMatch(functionMatchAttribute); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionPackage.FUNCTION_MATCH_METRIC: { + FunctionMatchMetric functionMatchMetric = (FunctionMatchMetric)theEObject; + T result = caseFunctionMatchMetric(functionMatchMetric); + if (result == null) result = caseFunctionMatch(functionMatchMetric); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionPackage.FUNCTION_MATCH_INSTANCE_OF: { + FunctionMatchInstanceOf functionMatchInstanceOf = (FunctionMatchInstanceOf)theEObject; + T result = caseFunctionMatchInstanceOf(functionMatchInstanceOf); + if (result == null) result = caseFunctionMatch(functionMatchInstanceOf); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionPackage.VALUE_PAIR: { + ValuePair valuePair = (ValuePair)theEObject; + T result = caseValuePair(valuePair); + if (result == null) result = defaultCase(theEObject); + return result; + } + case FunctionPackage.STRING_VALUE_PAIR: { + StringValuePair stringValuePair = (StringValuePair)theEObject; + T result = caseStringValuePair(stringValuePair); + if (result == null) result = caseValuePair(stringValuePair); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Function'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Function'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunction(Function object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Iterator'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Iterator'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseIterator(Iterator object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Iterator Using Function'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Iterator Using Function'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseIteratorUsingFunction(IteratorUsingFunction object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Rule Function'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Rule Function'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRuleFunction(RuleFunction object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Rule'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Rule'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionRule(FunctionRule object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Action'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Action'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionAction(FunctionAction object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Rule Update Function'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Rule Update Function'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRuleUpdateFunction(RuleUpdateFunction object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Update Rule'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Update Rule'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionUpdateRule(FunctionUpdateRule object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Update'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Update'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionUpdate(FunctionUpdate object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Update Attribute'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Update Attribute'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionUpdateAttribute(FunctionUpdateAttribute object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Match'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Match'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionMatch(FunctionMatch object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Match Attribute'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Match Attribute'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionMatchAttribute(FunctionMatchAttribute object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Match Metric'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Match Metric'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionMatchMetric(FunctionMatchMetric object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Match Instance Of'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Match Instance Of'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionMatchInstanceOf(FunctionMatchInstanceOf object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Value Pair'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Value Pair'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseValuePair(ValuePair object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'String Value Pair'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'String Value Pair'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseStringValuePair(StringValuePair object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //FunctionSwitch diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/.gitignore b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/.gitignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/.gitignore @@ -0,0 +1 @@ + diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/CoreFactoryImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/CoreFactoryImpl.java new file mode 100644 index 0000000..ada1cd8 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/CoreFactoryImpl.java @@ -0,0 +1,509 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.impl; + +import org.openecomp.ncomp.core.*; + +import org.openecomp.ncomp.core.types.metrics.DateMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.DoubleMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.LongMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.StringMetricAttribute; + +import com.google.common.base.Objects; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import org.eclipse.xtext.xbase.lib.Exceptions; +import org.json.JSONObject; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class CoreFactoryImpl extends EFactoryImpl implements CoreFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static CoreFactory init() { + try { + CoreFactory theCoreFactory = (CoreFactory)EPackage.Registry.INSTANCE.getEFactory(CorePackage.eNS_URI); + if (theCoreFactory != null) { + return theCoreFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new CoreFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public CoreFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case CorePackage.USER: return createUser(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case CorePackage.OPERATIONAL_STATE: + return createOperationalStateFromString(eDataType, initialValue); + case CorePackage.DEPLOYMENT_STATUS: + return createDeploymentStatusFromString(eDataType, initialValue); + case CorePackage.JSON_OBJECT: + return createJsonObjectFromString(eDataType, initialValue); + case CorePackage.REMOTE_CONTEXT: + return createRemoteContextFromString(eDataType, initialValue); + case CorePackage.INCREASING_ULONG_METRIC_ATTRIBUTE: + return createIncreasingULongMetricAttributeFromString(eDataType, initialValue); + case CorePackage.LONG_METRIC_ATTRIBUTE: + return createLongMetricAttributeFromString(eDataType, initialValue); + case CorePackage.DOUBLE_METRIC_ATTRIBUTE: + return createDoubleMetricAttributeFromString(eDataType, initialValue); + case CorePackage.STRING_METRIC_ATTRIBUTE: + return createStringMetricAttributeFromString(eDataType, initialValue); + case CorePackage.DATE_METRIC_ATTRIBUTE: + return createDateMetricAttributeFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case CorePackage.OPERATIONAL_STATE: + return convertOperationalStateToString(eDataType, instanceValue); + case CorePackage.DEPLOYMENT_STATUS: + return convertDeploymentStatusToString(eDataType, instanceValue); + case CorePackage.JSON_OBJECT: + return convertJsonObjectToString(eDataType, instanceValue); + case CorePackage.REMOTE_CONTEXT: + return convertRemoteContextToString(eDataType, instanceValue); + case CorePackage.INCREASING_ULONG_METRIC_ATTRIBUTE: + return convertIncreasingULongMetricAttributeToString(eDataType, instanceValue); + case CorePackage.LONG_METRIC_ATTRIBUTE: + return convertLongMetricAttributeToString(eDataType, instanceValue); + case CorePackage.DOUBLE_METRIC_ATTRIBUTE: + return convertDoubleMetricAttributeToString(eDataType, instanceValue); + case CorePackage.STRING_METRIC_ATTRIBUTE: + return convertStringMetricAttributeToString(eDataType, instanceValue); + case CorePackage.DATE_METRIC_ATTRIBUTE: + return convertDateMetricAttributeToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public User createUser() { + UserImpl user = new UserImpl(); + return user; + } + + /** + * + * + * @generated + */ + public OperationalState createOperationalStateFromString(EDataType eDataType, String initialValue) { + OperationalState result = OperationalState.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertOperationalStateToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public DeploymentStatus createDeploymentStatusFromString(EDataType eDataType, String initialValue) { + DeploymentStatus result = DeploymentStatus.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertDeploymentStatusToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public JSONObject createJsonObject(final String it) { + JSONObject _xtrycatchfinallyexpression = null; + try { + JSONObject _xifexpression = null; + boolean _notEquals = (!Objects.equal(it, null)); + if (_notEquals) { + _xifexpression = new JSONObject(it); + } + _xtrycatchfinallyexpression = _xifexpression; + } + catch (final Throwable _t) { + if (_t instanceof Exception) { + final Exception e = (Exception)_t; + throw new RuntimeException(((("Bad JSON String: " + it) + " ") + e)); + } + else { + throw Exceptions.sneakyThrow(_t); + } + } + return _xtrycatchfinallyexpression; + } + + /** + * + * + * @generated + */ + public JSONObject createJsonObjectFromString(EDataType eDataType, String initialValue) { + return createJsonObject(initialValue); + } + + /** + * + * + * @generated + */ + public String convertJsonObjectToString(EDataType eDataType, Object instanceValue) { + return super.convertToString(eDataType, instanceValue); + } + + /** + * + * + * @generated + */ + public JSONObject createRemoteContext(final String it) { + JSONObject _xtrycatchfinallyexpression = null; + try { + JSONObject _xifexpression = null; + boolean _notEquals = (!Objects.equal(it, null)); + if (_notEquals) { + _xifexpression = new JSONObject(it); + } + _xtrycatchfinallyexpression = _xifexpression; + } + catch (final Throwable _t) { + if (_t instanceof Exception) { + final Exception e = (Exception)_t; + throw new RuntimeException(((("Bad JSON String: " + it) + " ") + e)); + } + else { + throw Exceptions.sneakyThrow(_t); + } + } + return _xtrycatchfinallyexpression; + } + + /** + * + * + * @generated + */ + public JSONObject createRemoteContextFromString(EDataType eDataType, String initialValue) { + return createRemoteContext(initialValue); + } + + /** + * + * + * @generated + */ + public String convertRemoteContextToString(EDataType eDataType, Object instanceValue) { + return super.convertToString(eDataType, instanceValue); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute createIncreasingULongMetricAttributeFromString(EDataType eDataType, String initialValue) { + return (IncreasingULongMetricAttribute)super.createFromString(eDataType, initialValue); + } + + /** + * + * + * @generated + */ + public String convertIncreasingULongMetricAttribute(IncreasingULongMetricAttribute it) { + try { + return it.toStringValue(); + } + catch (final Throwable _t) { + if (_t instanceof Exception) { + final Exception e = (Exception)_t; + return null; + } + else { + throw Exceptions.sneakyThrow(_t); + } + } + } + + /** + * + * + * @generated + */ + public String convertIncreasingULongMetricAttributeToString(EDataType eDataType, Object instanceValue) { + return convertIncreasingULongMetricAttribute((IncreasingULongMetricAttribute)instanceValue); + } + + /** + * + * + * @generated + */ + public LongMetricAttribute createLongMetricAttributeFromString(EDataType eDataType, String initialValue) { + return (LongMetricAttribute)super.createFromString(eDataType, initialValue); + } + + /** + * + * + * @generated + */ + public String convertLongMetricAttribute(LongMetricAttribute it) { + try { + return it.toStringValue(); + } + catch (final Throwable _t) { + if (_t instanceof Exception) { + final Exception e = (Exception)_t; + return null; + } + else { + throw Exceptions.sneakyThrow(_t); + } + } + } + + /** + * + * + * @generated + */ + public String convertLongMetricAttributeToString(EDataType eDataType, Object instanceValue) { + return convertLongMetricAttribute((LongMetricAttribute)instanceValue); + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute createDoubleMetricAttributeFromString(EDataType eDataType, String initialValue) { + return (DoubleMetricAttribute)super.createFromString(eDataType, initialValue); + } + + /** + * + * + * @generated + */ + public String convertDoubleMetricAttribute(DoubleMetricAttribute it) { + try { + return it.toStringValue(); + } + catch (final Throwable _t) { + if (_t instanceof Exception) { + final Exception e = (Exception)_t; + return null; + } + else { + throw Exceptions.sneakyThrow(_t); + } + } + } + + /** + * + * + * @generated + */ + public String convertDoubleMetricAttributeToString(EDataType eDataType, Object instanceValue) { + return convertDoubleMetricAttribute((DoubleMetricAttribute)instanceValue); + } + + /** + * + * + * @generated + */ + public StringMetricAttribute createStringMetricAttributeFromString(EDataType eDataType, String initialValue) { + return (StringMetricAttribute)super.createFromString(eDataType, initialValue); + } + + /** + * + * + * @generated + */ + public String convertStringMetricAttribute(StringMetricAttribute it) { + try { + return it.toStringValue(); + } + catch (final Throwable _t) { + if (_t instanceof Exception) { + final Exception e = (Exception)_t; + return null; + } + else { + throw Exceptions.sneakyThrow(_t); + } + } + } + + /** + * + * + * @generated + */ + public String convertStringMetricAttributeToString(EDataType eDataType, Object instanceValue) { + return convertStringMetricAttribute((StringMetricAttribute)instanceValue); + } + + /** + * + * + * @generated + */ + public DateMetricAttribute createDateMetricAttributeFromString(EDataType eDataType, String initialValue) { + return (DateMetricAttribute)super.createFromString(eDataType, initialValue); + } + + /** + * + * + * @generated + */ + public String convertDateMetricAttribute(DateMetricAttribute it) { + try { + return it.toStringValue(); + } + catch (final Throwable _t) { + if (_t instanceof Exception) { + final Exception e = (Exception)_t; + return null; + } + else { + throw Exceptions.sneakyThrow(_t); + } + } + } + + /** + * + * + * @generated + */ + public String convertDateMetricAttributeToString(EDataType eDataType, Object instanceValue) { + return convertDateMetricAttribute((DateMetricAttribute)instanceValue); + } + + /** + * + * + * @generated + */ + public CorePackage getCorePackage() { + return (CorePackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static CorePackage getPackage() { + return CorePackage.eINSTANCE; + } + +} //CoreFactoryImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/CorePackageImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/CorePackageImpl.java new file mode 100644 index 0000000..f97ef6e --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/CorePackageImpl.java @@ -0,0 +1,561 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.impl; + +import org.openecomp.ncomp.core.CoreFactory; +import org.openecomp.ncomp.core.CorePackage; +import org.openecomp.ncomp.core.DeploymentStatus; +import org.openecomp.ncomp.core.Event; +import org.openecomp.ncomp.core.HasOperationalState; +import org.openecomp.ncomp.core.NamedEntity; +import org.openecomp.ncomp.core.OperationalState; + +import org.openecomp.ncomp.core.User; +import org.openecomp.ncomp.core.types.metrics.DateMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.DoubleMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.LongMetricAttribute; +import org.openecomp.ncomp.core.types.metrics.StringMetricAttribute; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EcorePackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; +import org.json.JSONObject; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class CorePackageImpl extends EPackageImpl implements CorePackage { + /** + * + * + * @generated + */ + private EClass namedEntityEClass = null; + + /** + * + * + * @generated + */ + private EClass eventEClass = null; + + /** + * + * + * @generated + */ + private EClass hasOperationalStateEClass = null; + + /** + * + * + * @generated + */ + private EClass userEClass = null; + + /** + * + * + * @generated + */ + private EEnum operationalStateEEnum = null; + + /** + * + * + * @generated + */ + private EEnum deploymentStatusEEnum = null; + + /** + * + * + * @generated + */ + private EDataType jsonObjectEDataType = null; + + /** + * + * + * @generated + */ + private EDataType remoteContextEDataType = null; + + /** + * + * + * @generated + */ + private EDataType increasingULongMetricAttributeEDataType = null; + + /** + * + * + * @generated + */ + private EDataType longMetricAttributeEDataType = null; + + /** + * + * + * @generated + */ + private EDataType doubleMetricAttributeEDataType = null; + + /** + * + * + * @generated + */ + private EDataType stringMetricAttributeEDataType = null; + + /** + * + * + * @generated + */ + private EDataType dateMetricAttributeEDataType = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.ncomp.core.CorePackage#eNS_URI + * @see #init() + * @generated + */ + private CorePackageImpl() { + super(eNS_URI, CoreFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link CorePackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static CorePackage init() { + if (isInited) return (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + + // Obtain or create and register package + CorePackageImpl theCorePackage = (CorePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof CorePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new CorePackageImpl()); + + isInited = true; + + // Initialize simple dependencies + EcorePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theCorePackage.createPackageContents(); + + // Initialize created meta-data + theCorePackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theCorePackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(CorePackage.eNS_URI, theCorePackage); + return theCorePackage; + } + + /** + * + * + * @generated + */ + public EClass getNamedEntity() { + return namedEntityEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getNamedEntity_Name() { + return (EAttribute)namedEntityEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getNamedEntity_LastPolled() { + return (EAttribute)namedEntityEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getNamedEntity_LastChanged() { + return (EAttribute)namedEntityEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getNamedEntity_Created() { + return (EAttribute)namedEntityEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EClass getEvent() { + return eventEClass; + } + + /** + * + * + * @generated + */ + public EClass getHasOperationalState() { + return hasOperationalStateEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getHasOperationalState_OperationalState() { + return (EAttribute)hasOperationalStateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getUser() { + return userEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getUser_PublicKey() { + return (EAttribute)userEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getUser_DeploymentStatus() { + return (EAttribute)userEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EEnum getOperationalState() { + return operationalStateEEnum; + } + + /** + * + * + * @generated + */ + public EEnum getDeploymentStatus() { + return deploymentStatusEEnum; + } + + /** + * + * + * @generated + */ + public EDataType getJsonObject() { + return jsonObjectEDataType; + } + + /** + * + * + * @generated + */ + public EDataType getRemoteContext() { + return remoteContextEDataType; + } + + /** + * + * + * @generated + */ + public EDataType getIncreasingULongMetricAttribute() { + return increasingULongMetricAttributeEDataType; + } + + /** + * + * + * @generated + */ + public EDataType getLongMetricAttribute() { + return longMetricAttributeEDataType; + } + + /** + * + * + * @generated + */ + public EDataType getDoubleMetricAttribute() { + return doubleMetricAttributeEDataType; + } + + /** + * + * + * @generated + */ + public EDataType getStringMetricAttribute() { + return stringMetricAttributeEDataType; + } + + /** + * + * + * @generated + */ + public EDataType getDateMetricAttribute() { + return dateMetricAttributeEDataType; + } + + /** + * + * + * @generated + */ + public CoreFactory getCoreFactory() { + return (CoreFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + namedEntityEClass = createEClass(NAMED_ENTITY); + createEAttribute(namedEntityEClass, NAMED_ENTITY__NAME); + createEAttribute(namedEntityEClass, NAMED_ENTITY__LAST_POLLED); + createEAttribute(namedEntityEClass, NAMED_ENTITY__LAST_CHANGED); + createEAttribute(namedEntityEClass, NAMED_ENTITY__CREATED); + + eventEClass = createEClass(EVENT); + + hasOperationalStateEClass = createEClass(HAS_OPERATIONAL_STATE); + createEAttribute(hasOperationalStateEClass, HAS_OPERATIONAL_STATE__OPERATIONAL_STATE); + + userEClass = createEClass(USER); + createEAttribute(userEClass, USER__PUBLIC_KEY); + createEAttribute(userEClass, USER__DEPLOYMENT_STATUS); + + // Create enums + operationalStateEEnum = createEEnum(OPERATIONAL_STATE); + deploymentStatusEEnum = createEEnum(DEPLOYMENT_STATUS); + + // Create data types + jsonObjectEDataType = createEDataType(JSON_OBJECT); + remoteContextEDataType = createEDataType(REMOTE_CONTEXT); + increasingULongMetricAttributeEDataType = createEDataType(INCREASING_ULONG_METRIC_ATTRIBUTE); + longMetricAttributeEDataType = createEDataType(LONG_METRIC_ATTRIBUTE); + doubleMetricAttributeEDataType = createEDataType(DOUBLE_METRIC_ATTRIBUTE); + stringMetricAttributeEDataType = createEDataType(STRING_METRIC_ATTRIBUTE); + dateMetricAttributeEDataType = createEDataType(DATE_METRIC_ATTRIBUTE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + userEClass.getESuperTypes().add(this.getNamedEntity()); + + // Initialize classes, features, and operations; add parameters + initEClass(namedEntityEClass, NamedEntity.class, "NamedEntity", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getNamedEntity_Name(), theEcorePackage.getEString(), "name", null, 0, 1, NamedEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getNamedEntity_LastPolled(), theEcorePackage.getEDate(), "lastPolled", null, 0, 1, NamedEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getNamedEntity_LastChanged(), theEcorePackage.getEDate(), "lastChanged", null, 0, 1, NamedEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getNamedEntity_Created(), theEcorePackage.getEDate(), "created", null, 0, 1, NamedEntity.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(eventEClass, Event.class, "Event", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(hasOperationalStateEClass, HasOperationalState.class, "HasOperationalState", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getHasOperationalState_OperationalState(), this.getOperationalState(), "operationalState", null, 0, 1, HasOperationalState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(userEClass, User.class, "User", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getUser_PublicKey(), theEcorePackage.getEString(), "publicKey", null, 0, 1, User.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getUser_DeploymentStatus(), this.getDeploymentStatus(), "deploymentStatus", null, 0, 1, User.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(operationalStateEEnum, OperationalState.class, "OperationalState"); + addEEnumLiteral(operationalStateEEnum, OperationalState.OPERATIONAL); + addEEnumLiteral(operationalStateEEnum, OperationalState.SUSPENDED); + + initEEnum(deploymentStatusEEnum, DeploymentStatus.class, "DeploymentStatus"); + addEEnumLiteral(deploymentStatusEEnum, DeploymentStatus.UNDEPLOYED); + addEEnumLiteral(deploymentStatusEEnum, DeploymentStatus.DEPLOYED); + addEEnumLiteral(deploymentStatusEEnum, DeploymentStatus.DEPLOYED_PARTIALLY); + addEEnumLiteral(deploymentStatusEEnum, DeploymentStatus.DEPLOYED_ERRORS); + + // Initialize data types + initEDataType(jsonObjectEDataType, JSONObject.class, "JsonObject", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); + initEDataType(remoteContextEDataType, JSONObject.class, "RemoteContext", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); + initEDataType(increasingULongMetricAttributeEDataType, IncreasingULongMetricAttribute.class, "IncreasingULongMetricAttribute", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); + initEDataType(longMetricAttributeEDataType, LongMetricAttribute.class, "LongMetricAttribute", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); + initEDataType(doubleMetricAttributeEDataType, DoubleMetricAttribute.class, "DoubleMetricAttribute", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); + initEDataType(stringMetricAttributeEDataType, StringMetricAttribute.class, "StringMetricAttribute", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); + initEDataType(dateMetricAttributeEDataType, DateMetricAttribute.class, "DateMetricAttribute", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2011/Xcore + createXcoreAnnotations(); + // http://openecomp.org + createEcompAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2011/Xcore. + * + * + * @generated + */ + protected void createXcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2011/Xcore"; + addAnnotation + (this, + source, + new String[] { + "ecomp", "http://openecomp.org" + }); + } + + /** + * Initializes the annotations for http://openecomp.org. + * + * + * @generated + */ + protected void createEcompAnnotations() { + String source = "http://openecomp.org"; + addAnnotation + (getNamedEntity_Name(), + source, + new String[] { + "type", "configuration" + }); + } + +} //CorePackageImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/EventImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/EventImpl.java new file mode 100644 index 0000000..fa8e2f6 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/EventImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.impl; + +import org.openecomp.ncomp.core.CorePackage; +import org.openecomp.ncomp.core.Event; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Event'. + * + *

+ *

+ * + * @generated + */ +public abstract class EventImpl extends MinimalEObjectImpl.Container implements Event { + /** + * + * + * @generated + */ + protected EventImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CorePackage.Literals.EVENT; + } + +} //EventImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/HasOperationalStateImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/HasOperationalStateImpl.java new file mode 100644 index 0000000..69ef8b0 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/HasOperationalStateImpl.java @@ -0,0 +1,185 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.impl; + +import org.openecomp.ncomp.core.CorePackage; +import org.openecomp.ncomp.core.HasOperationalState; +import org.openecomp.ncomp.core.OperationalState; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Has Operational State'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.impl.HasOperationalStateImpl#getOperationalState Operational State}
  • + *
+ *

+ * + * @generated + */ +public abstract class HasOperationalStateImpl extends MinimalEObjectImpl.Container implements HasOperationalState { + /** + * The default value of the '{@link #getOperationalState() Operational State}' attribute. + * + * + * @see #getOperationalState() + * @generated + * @ordered + */ + protected static final OperationalState OPERATIONAL_STATE_EDEFAULT = OperationalState.OPERATIONAL; + + /** + * The cached value of the '{@link #getOperationalState() Operational State}' attribute. + * + * + * @see #getOperationalState() + * @generated + * @ordered + */ + protected OperationalState operationalState = OPERATIONAL_STATE_EDEFAULT; + + /** + * + * + * @generated + */ + protected HasOperationalStateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CorePackage.Literals.HAS_OPERATIONAL_STATE; + } + + /** + * + * + * @generated + */ + public OperationalState getOperationalState() { + return operationalState; + } + + /** + * + * + * @generated + */ + public void setOperationalState(OperationalState newOperationalState) { + OperationalState oldOperationalState = operationalState; + operationalState = newOperationalState == null ? OPERATIONAL_STATE_EDEFAULT : newOperationalState; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.HAS_OPERATIONAL_STATE__OPERATIONAL_STATE, oldOperationalState, operationalState)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CorePackage.HAS_OPERATIONAL_STATE__OPERATIONAL_STATE: + return getOperationalState(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CorePackage.HAS_OPERATIONAL_STATE__OPERATIONAL_STATE: + setOperationalState((OperationalState)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CorePackage.HAS_OPERATIONAL_STATE__OPERATIONAL_STATE: + setOperationalState(OPERATIONAL_STATE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CorePackage.HAS_OPERATIONAL_STATE__OPERATIONAL_STATE: + return operationalState != OPERATIONAL_STATE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (operationalState: "); + result.append(operationalState); + result.append(')'); + return result.toString(); + } + +} //HasOperationalStateImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/NamedEntityImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/NamedEntityImpl.java new file mode 100644 index 0000000..271e5ce --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/NamedEntityImpl.java @@ -0,0 +1,348 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.impl; + +import org.openecomp.ncomp.core.CorePackage; +import org.openecomp.ncomp.core.NamedEntity; + +import java.util.Date; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Named Entity'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.impl.NamedEntityImpl#getName Name}
  • + *
  • {@link org.openecomp.ncomp.core.impl.NamedEntityImpl#getLastPolled Last Polled}
  • + *
  • {@link org.openecomp.ncomp.core.impl.NamedEntityImpl#getLastChanged Last Changed}
  • + *
  • {@link org.openecomp.ncomp.core.impl.NamedEntityImpl#getCreated Created}
  • + *
+ *

+ * + * @generated + */ +public abstract class NamedEntityImpl extends MinimalEObjectImpl.Container implements NamedEntity { + /** + * The default value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() Name}' attribute. + * + * + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The default value of the '{@link #getLastPolled() Last Polled}' attribute. + * + * + * @see #getLastPolled() + * @generated + * @ordered + */ + protected static final Date LAST_POLLED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLastPolled() Last Polled}' attribute. + * + * + * @see #getLastPolled() + * @generated + * @ordered + */ + protected Date lastPolled = LAST_POLLED_EDEFAULT; + + /** + * The default value of the '{@link #getLastChanged() Last Changed}' attribute. + * + * + * @see #getLastChanged() + * @generated + * @ordered + */ + protected static final Date LAST_CHANGED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLastChanged() Last Changed}' attribute. + * + * + * @see #getLastChanged() + * @generated + * @ordered + */ + protected Date lastChanged = LAST_CHANGED_EDEFAULT; + + /** + * The default value of the '{@link #getCreated() Created}' attribute. + * + * + * @see #getCreated() + * @generated + * @ordered + */ + protected static final Date CREATED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCreated() Created}' attribute. + * + * + * @see #getCreated() + * @generated + * @ordered + */ + protected Date created = CREATED_EDEFAULT; + + /** + * + * + * @generated + */ + protected NamedEntityImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CorePackage.Literals.NAMED_ENTITY; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public void setName(String newName) { + String oldName = name; + name = newName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.NAMED_ENTITY__NAME, oldName, name)); + } + + /** + * + * + * @generated + */ + public Date getLastPolled() { + return lastPolled; + } + + /** + * + * + * @generated + */ + public void setLastPolled(Date newLastPolled) { + Date oldLastPolled = lastPolled; + lastPolled = newLastPolled; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.NAMED_ENTITY__LAST_POLLED, oldLastPolled, lastPolled)); + } + + /** + * + * + * @generated + */ + public Date getLastChanged() { + return lastChanged; + } + + /** + * + * + * @generated + */ + public void setLastChanged(Date newLastChanged) { + Date oldLastChanged = lastChanged; + lastChanged = newLastChanged; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.NAMED_ENTITY__LAST_CHANGED, oldLastChanged, lastChanged)); + } + + /** + * + * + * @generated + */ + public Date getCreated() { + return created; + } + + /** + * + * + * @generated + */ + public void setCreated(Date newCreated) { + Date oldCreated = created; + created = newCreated; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.NAMED_ENTITY__CREATED, oldCreated, created)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CorePackage.NAMED_ENTITY__NAME: + return getName(); + case CorePackage.NAMED_ENTITY__LAST_POLLED: + return getLastPolled(); + case CorePackage.NAMED_ENTITY__LAST_CHANGED: + return getLastChanged(); + case CorePackage.NAMED_ENTITY__CREATED: + return getCreated(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CorePackage.NAMED_ENTITY__NAME: + setName((String)newValue); + return; + case CorePackage.NAMED_ENTITY__LAST_POLLED: + setLastPolled((Date)newValue); + return; + case CorePackage.NAMED_ENTITY__LAST_CHANGED: + setLastChanged((Date)newValue); + return; + case CorePackage.NAMED_ENTITY__CREATED: + setCreated((Date)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CorePackage.NAMED_ENTITY__NAME: + setName(NAME_EDEFAULT); + return; + case CorePackage.NAMED_ENTITY__LAST_POLLED: + setLastPolled(LAST_POLLED_EDEFAULT); + return; + case CorePackage.NAMED_ENTITY__LAST_CHANGED: + setLastChanged(LAST_CHANGED_EDEFAULT); + return; + case CorePackage.NAMED_ENTITY__CREATED: + setCreated(CREATED_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CorePackage.NAMED_ENTITY__NAME: + return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); + case CorePackage.NAMED_ENTITY__LAST_POLLED: + return LAST_POLLED_EDEFAULT == null ? lastPolled != null : !LAST_POLLED_EDEFAULT.equals(lastPolled); + case CorePackage.NAMED_ENTITY__LAST_CHANGED: + return LAST_CHANGED_EDEFAULT == null ? lastChanged != null : !LAST_CHANGED_EDEFAULT.equals(lastChanged); + case CorePackage.NAMED_ENTITY__CREATED: + return CREATED_EDEFAULT == null ? created != null : !CREATED_EDEFAULT.equals(created); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (name: "); + result.append(name); + result.append(", lastPolled: "); + result.append(lastPolled); + result.append(", lastChanged: "); + result.append(lastChanged); + result.append(", created: "); + result.append(created); + result.append(')'); + return result.toString(); + } + +} //NamedEntityImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/UserImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/UserImpl.java new file mode 100644 index 0000000..c34cca9 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/impl/UserImpl.java @@ -0,0 +1,238 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.impl; + +import org.openecomp.ncomp.core.CorePackage; +import org.openecomp.ncomp.core.DeploymentStatus; +import org.openecomp.ncomp.core.User; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'User'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.impl.UserImpl#getPublicKey Public Key}
  • + *
  • {@link org.openecomp.ncomp.core.impl.UserImpl#getDeploymentStatus Deployment Status}
  • + *
+ *

+ * + * @generated + */ +public class UserImpl extends NamedEntityImpl implements User { + /** + * The default value of the '{@link #getPublicKey() Public Key}' attribute. + * + * + * @see #getPublicKey() + * @generated + * @ordered + */ + protected static final String PUBLIC_KEY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPublicKey() Public Key}' attribute. + * + * + * @see #getPublicKey() + * @generated + * @ordered + */ + protected String publicKey = PUBLIC_KEY_EDEFAULT; + + /** + * The default value of the '{@link #getDeploymentStatus() Deployment Status}' attribute. + * + * + * @see #getDeploymentStatus() + * @generated + * @ordered + */ + protected static final DeploymentStatus DEPLOYMENT_STATUS_EDEFAULT = DeploymentStatus.UNDEPLOYED; + + /** + * The cached value of the '{@link #getDeploymentStatus() Deployment Status}' attribute. + * + * + * @see #getDeploymentStatus() + * @generated + * @ordered + */ + protected DeploymentStatus deploymentStatus = DEPLOYMENT_STATUS_EDEFAULT; + + /** + * + * + * @generated + */ + protected UserImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return CorePackage.Literals.USER; + } + + /** + * + * + * @generated + */ + public String getPublicKey() { + return publicKey; + } + + /** + * + * + * @generated + */ + public void setPublicKey(String newPublicKey) { + String oldPublicKey = publicKey; + publicKey = newPublicKey; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.USER__PUBLIC_KEY, oldPublicKey, publicKey)); + } + + /** + * + * + * @generated + */ + public DeploymentStatus getDeploymentStatus() { + return deploymentStatus; + } + + /** + * + * + * @generated + */ + public void setDeploymentStatus(DeploymentStatus newDeploymentStatus) { + DeploymentStatus oldDeploymentStatus = deploymentStatus; + deploymentStatus = newDeploymentStatus == null ? DEPLOYMENT_STATUS_EDEFAULT : newDeploymentStatus; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, CorePackage.USER__DEPLOYMENT_STATUS, oldDeploymentStatus, deploymentStatus)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case CorePackage.USER__PUBLIC_KEY: + return getPublicKey(); + case CorePackage.USER__DEPLOYMENT_STATUS: + return getDeploymentStatus(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case CorePackage.USER__PUBLIC_KEY: + setPublicKey((String)newValue); + return; + case CorePackage.USER__DEPLOYMENT_STATUS: + setDeploymentStatus((DeploymentStatus)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CorePackage.USER__PUBLIC_KEY: + setPublicKey(PUBLIC_KEY_EDEFAULT); + return; + case CorePackage.USER__DEPLOYMENT_STATUS: + setDeploymentStatus(DEPLOYMENT_STATUS_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case CorePackage.USER__PUBLIC_KEY: + return PUBLIC_KEY_EDEFAULT == null ? publicKey != null : !PUBLIC_KEY_EDEFAULT.equals(publicKey); + case CorePackage.USER__DEPLOYMENT_STATUS: + return deploymentStatus != DEPLOYMENT_STATUS_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (publicKey: "); + result.append(publicKey); + result.append(", deploymentStatus: "); + result.append(deploymentStatus); + result.append(')'); + return result.toString(); + } + +} //UserImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogConfiguration.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogConfiguration.java new file mode 100644 index 0000000..67a6ba4 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogConfiguration.java @@ -0,0 +1,63 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Log Configuration'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.logs.LogConfiguration#getFiles Files}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogConfiguration() + * @model + * @generated + */ +public interface LogConfiguration extends EObject { + /** + * Returns the value of the 'Files' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.logs.LogFile}. + * + *

+ * If the meaning of the 'Files' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Files' containment reference list. + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogConfiguration_Files() + * @model containment="true" + * @generated + */ + EList getFiles(); + +} // LogConfiguration diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogFile.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogFile.java new file mode 100644 index 0000000..ac6f9a2 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogFile.java @@ -0,0 +1,90 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Log File'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.logs.LogFile#getFilename Filename}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogFile#getPatterns Patterns}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogFile() + * @model + * @generated + */ +public interface LogFile extends EObject { + /** + * Returns the value of the 'Filename' attribute. + * + *

+ * If the meaning of the 'Filename' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Filename' attribute. + * @see #setFilename(String) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogFile_Filename() + * @model unique="false" + * @generated + */ + String getFilename(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogFile#getFilename Filename}' attribute. + * + * + * @param value the new value of the 'Filename' attribute. + * @see #getFilename() + * @generated + */ + void setFilename(String value); + + /** + * Returns the value of the 'Patterns' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.logs.LogPattern}. + * + *

+ * If the meaning of the 'Patterns' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Patterns' containment reference list. + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogFile_Patterns() + * @model containment="true" + * @generated + */ + EList getPatterns(); + +} // LogFile diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogLevel.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogLevel.java new file mode 100644 index 0000000..4869f6b --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogLevel.java @@ -0,0 +1,358 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Log Level', + * and utility methods for working with them. + * + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogLevel() + * @model + * @generated + */ +public enum LogLevel implements Enumerator { + /** + * The 'UNKNOWN' literal object. + * + * + * @see #UNKNOWN_VALUE + * @generated + * @ordered + */ + UNKNOWN(0, "UNKNOWN", "UNKNOWN"), + + /** + * The 'TRACE' literal object. + * + * + * @see #TRACE_VALUE + * @generated + * @ordered + */ + TRACE(0, "TRACE", "TRACE"), + + /** + * The 'DEBUG' literal object. + * + * + * @see #DEBUG_VALUE + * @generated + * @ordered + */ + DEBUG(0, "DEBUG", "DEBUG"), + + /** + * The 'INFO' literal object. + * + * + * @see #INFO_VALUE + * @generated + * @ordered + */ + INFO(0, "INFO", "INFO"), + + /** + * The 'WARN' literal object. + * + * + * @see #WARN_VALUE + * @generated + * @ordered + */ + WARN(0, "WARN", "WARN"), + + /** + * The 'ERROR' literal object. + * + * + * @see #ERROR_VALUE + * @generated + * @ordered + */ + ERROR(0, "ERROR", "ERROR"), + + /** + * The 'FATAL' literal object. + * + * + * @see #FATAL_VALUE + * @generated + * @ordered + */ + FATAL(0, "FATAL", "FATAL"); + + /** + * The 'UNKNOWN' literal value. + * + *

+ * If the meaning of 'UNKNOWN' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #UNKNOWN + * @model + * @generated + * @ordered + */ + public static final int UNKNOWN_VALUE = 0; + + /** + * The 'TRACE' literal value. + * + *

+ * If the meaning of 'TRACE' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #TRACE + * @model + * @generated + * @ordered + */ + public static final int TRACE_VALUE = 0; + + /** + * The 'DEBUG' literal value. + * + *

+ * If the meaning of 'DEBUG' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #DEBUG + * @model + * @generated + * @ordered + */ + public static final int DEBUG_VALUE = 0; + + /** + * The 'INFO' literal value. + * + *

+ * If the meaning of 'INFO' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #INFO + * @model + * @generated + * @ordered + */ + public static final int INFO_VALUE = 0; + + /** + * The 'WARN' literal value. + * + *

+ * If the meaning of 'WARN' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #WARN + * @model + * @generated + * @ordered + */ + public static final int WARN_VALUE = 0; + + /** + * The 'ERROR' literal value. + * + *

+ * If the meaning of 'ERROR' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #ERROR + * @model + * @generated + * @ordered + */ + public static final int ERROR_VALUE = 0; + + /** + * The 'FATAL' literal value. + * + *

+ * If the meaning of 'FATAL' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #FATAL + * @model + * @generated + * @ordered + */ + public static final int FATAL_VALUE = 0; + + /** + * An array of all the 'Log Level' enumerators. + * + * + * @generated + */ + private static final LogLevel[] VALUES_ARRAY = + new LogLevel[] { + UNKNOWN, + TRACE, + DEBUG, + INFO, + WARN, + ERROR, + FATAL, + }; + + /** + * A public read-only list of all the 'Log Level' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Log Level' literal with the specified literal value. + * + * + * @generated + */ + public static LogLevel get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + LogLevel result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Log Level' literal with the specified name. + * + * + * @generated + */ + public static LogLevel getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + LogLevel result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Log Level' literal with the specified integer value. + * + * + * @generated + */ + public static LogLevel get(int value) { + switch (value) { + case UNKNOWN_VALUE: return UNKNOWN; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private LogLevel(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //LogLevel diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessage.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessage.java new file mode 100644 index 0000000..2f6ee0d --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessage.java @@ -0,0 +1,267 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Log Message'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.logs.LogMessage#getTime Time}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessage#getResourceName Resource Name}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessage#getSeverity Severity}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessage#getLevel Level}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessage#getMessage Message}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessage#getCategory Category}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessage#getNumberOfSuppressed Number Of Suppressed}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessage#getSuppressedStartTime Suppressed Start Time}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessage() + * @model + * @generated + */ +public interface LogMessage extends EObject { + /** + * Returns the value of the 'Time' attribute. + * + *

+ * If the meaning of the 'Time' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Time' attribute. + * @see #setTime(long) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessage_Time() + * @model unique="false" + * @generated + */ + long getTime(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessage#getTime Time}' attribute. + * + * + * @param value the new value of the 'Time' attribute. + * @see #getTime() + * @generated + */ + void setTime(long value); + + /** + * Returns the value of the 'Resource Name' attribute. + * + *

+ * If the meaning of the 'Resource Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Resource Name' attribute. + * @see #setResourceName(String) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessage_ResourceName() + * @model unique="false" + * @generated + */ + String getResourceName(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessage#getResourceName Resource Name}' attribute. + * + * + * @param value the new value of the 'Resource Name' attribute. + * @see #getResourceName() + * @generated + */ + void setResourceName(String value); + + /** + * Returns the value of the 'Severity' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.logs.LogSeverity}. + * + *

+ * If the meaning of the 'Severity' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Severity' attribute. + * @see org.openecomp.ncomp.core.logs.LogSeverity + * @see #setSeverity(LogSeverity) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessage_Severity() + * @model unique="false" + * @generated + */ + LogSeverity getSeverity(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessage#getSeverity Severity}' attribute. + * + * + * @param value the new value of the 'Severity' attribute. + * @see org.openecomp.ncomp.core.logs.LogSeverity + * @see #getSeverity() + * @generated + */ + void setSeverity(LogSeverity value); + + /** + * Returns the value of the 'Level' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.logs.LogLevel}. + * + *

+ * If the meaning of the 'Level' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Level' attribute. + * @see org.openecomp.ncomp.core.logs.LogLevel + * @see #setLevel(LogLevel) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessage_Level() + * @model unique="false" + * @generated + */ + LogLevel getLevel(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessage#getLevel Level}' attribute. + * + * + * @param value the new value of the 'Level' attribute. + * @see org.openecomp.ncomp.core.logs.LogLevel + * @see #getLevel() + * @generated + */ + void setLevel(LogLevel value); + + /** + * Returns the value of the 'Message' attribute. + * + *

+ * If the meaning of the 'Message' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Message' attribute. + * @see #setMessage(String) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessage_Message() + * @model unique="false" + * @generated + */ + String getMessage(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessage#getMessage Message}' attribute. + * + * + * @param value the new value of the 'Message' attribute. + * @see #getMessage() + * @generated + */ + void setMessage(String value); + + /** + * Returns the value of the 'Category' attribute. + * + *

+ * If the meaning of the 'Category' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Category' attribute. + * @see #setCategory(String) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessage_Category() + * @model unique="false" + * @generated + */ + String getCategory(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessage#getCategory Category}' attribute. + * + * + * @param value the new value of the 'Category' attribute. + * @see #getCategory() + * @generated + */ + void setCategory(String value); + + /** + * Returns the value of the 'Number Of Suppressed' attribute. + * The default value is "0". + * + *

+ * If the meaning of the 'Number Of Suppressed' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Number Of Suppressed' attribute. + * @see #setNumberOfSuppressed(int) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessage_NumberOfSuppressed() + * @model default="0" unique="false" + * @generated + */ + int getNumberOfSuppressed(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessage#getNumberOfSuppressed Number Of Suppressed}' attribute. + * + * + * @param value the new value of the 'Number Of Suppressed' attribute. + * @see #getNumberOfSuppressed() + * @generated + */ + void setNumberOfSuppressed(int value); + + /** + * Returns the value of the 'Suppressed Start Time' attribute. + * + *

+ * If the meaning of the 'Suppressed Start Time' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Suppressed Start Time' attribute. + * @see #setSuppressedStartTime(Long) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessage_SuppressedStartTime() + * @model unique="false" + * @generated + */ + Long getSuppressedStartTime(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessage#getSuppressedStartTime Suppressed Start Time}' attribute. + * + * + * @param value the new value of the 'Suppressed Start Time' attribute. + * @see #getSuppressedStartTime() + * @generated + */ + void setSuppressedStartTime(Long value); + +} // LogMessage diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageCategory.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageCategory.java new file mode 100644 index 0000000..ed8fe41 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageCategory.java @@ -0,0 +1,63 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Log Message Category'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.logs.LogMessageCategory#getStats Stats}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageCategory() + * @model + * @generated + */ +public interface LogMessageCategory extends NamedEntity { + /** + * Returns the value of the 'Stats' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.logs.LogMessageStats}. + * + *

+ * If the meaning of the 'Stats' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Stats' containment reference list. + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageCategory_Stats() + * @model containment="true" + * @generated + */ + EList getStats(); + +} // LogMessageCategory diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageContainer.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageContainer.java new file mode 100644 index 0000000..4a36e67 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageContainer.java @@ -0,0 +1,107 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Log Message Container'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.logs.LogMessageContainer#getLogMessageConfiguration Log Message Configuration}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessageContainer#getLogMessageCategories Log Message Categories}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessageContainer#getLogMessageStats Log Message Stats}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageContainer() + * @model abstract="true" + * @generated + */ +public interface LogMessageContainer extends EObject { + /** + * Returns the value of the 'Log Message Configuration' containment reference. + * + *

+ * If the meaning of the 'Log Message Configuration' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Log Message Configuration' containment reference. + * @see #setLogMessageConfiguration(LogMessageContainerConfiguration) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageContainer_LogMessageConfiguration() + * @model containment="true" + * @generated + */ + LogMessageContainerConfiguration getLogMessageConfiguration(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessageContainer#getLogMessageConfiguration Log Message Configuration}' containment reference. + * + * + * @param value the new value of the 'Log Message Configuration' containment reference. + * @see #getLogMessageConfiguration() + * @generated + */ + void setLogMessageConfiguration(LogMessageContainerConfiguration value); + + /** + * Returns the value of the 'Log Message Categories' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.logs.LogMessageCategory}. + * + *

+ * If the meaning of the 'Log Message Categories' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Log Message Categories' containment reference list. + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageContainer_LogMessageCategories() + * @model containment="true" + * @generated + */ + EList getLogMessageCategories(); + + /** + * Returns the value of the 'Log Message Stats' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.logs.LogMessageStats}. + * + *

+ * If the meaning of the 'Log Message Stats' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Log Message Stats' containment reference list. + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageContainer_LogMessageStats() + * @model containment="true" + * @generated + */ + EList getLogMessageStats(); + +} // LogMessageContainer diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageContainerConfiguration.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageContainerConfiguration.java new file mode 100644 index 0000000..2e958ea --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageContainerConfiguration.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Log Message Container Configuration'. + * + * + * + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageContainerConfiguration() + * @model + * @generated + */ +public interface LogMessageContainerConfiguration extends EObject { +} // LogMessageContainerConfiguration diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageRule.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageRule.java new file mode 100644 index 0000000..9b3a87e --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageRule.java @@ -0,0 +1,329 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.function.Function; + +/** + * + * A representation of the model object 'Log Message Rule'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.logs.LogMessageRule#getDescription Description}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessageRule#getMessageFilter Message Filter}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessageRule#getResourcePathFilter Resource Path Filter}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessageRule#getLevel Level}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessageRule#getSeverity Severity}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessageRule#getNewLevel New Level}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessageRule#getNewSeverity New Severity}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessageRule#getNewCategory New Category}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessageRule#isDisabled Disabled}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessageRule#getUpdateFunction Update Function}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageRule() + * @model + * @generated + */ +public interface LogMessageRule extends NamedEntity { + /** + * Returns the value of the 'Description' attribute. + * + *

+ * If the meaning of the 'Description' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Description' attribute. + * @see #setDescription(String) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageRule_Description() + * @model unique="false" + * @generated + */ + String getDescription(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessageRule#getDescription Description}' attribute. + * + * + * @param value the new value of the 'Description' attribute. + * @see #getDescription() + * @generated + */ + void setDescription(String value); + + /** + * Returns the value of the 'Message Filter' attribute. + * + *

+ * If the meaning of the 'Message Filter' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Message Filter' attribute. + * @see #setMessageFilter(String) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageRule_MessageFilter() + * @model unique="false" + * @generated + */ + String getMessageFilter(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessageRule#getMessageFilter Message Filter}' attribute. + * + * + * @param value the new value of the 'Message Filter' attribute. + * @see #getMessageFilter() + * @generated + */ + void setMessageFilter(String value); + + /** + * Returns the value of the 'Resource Path Filter' attribute. + * + *

+ * If the meaning of the 'Resource Path Filter' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Resource Path Filter' attribute. + * @see #setResourcePathFilter(String) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageRule_ResourcePathFilter() + * @model unique="false" + * @generated + */ + String getResourcePathFilter(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessageRule#getResourcePathFilter Resource Path Filter}' attribute. + * + * + * @param value the new value of the 'Resource Path Filter' attribute. + * @see #getResourcePathFilter() + * @generated + */ + void setResourcePathFilter(String value); + + /** + * Returns the value of the 'Level' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.logs.LogLevel}. + * + *

+ * If the meaning of the 'Level' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Level' attribute. + * @see org.openecomp.ncomp.core.logs.LogLevel + * @see #setLevel(LogLevel) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageRule_Level() + * @model unique="false" + * @generated + */ + LogLevel getLevel(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessageRule#getLevel Level}' attribute. + * + * + * @param value the new value of the 'Level' attribute. + * @see org.openecomp.ncomp.core.logs.LogLevel + * @see #getLevel() + * @generated + */ + void setLevel(LogLevel value); + + /** + * Returns the value of the 'Severity' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.logs.LogSeverity}. + * + *

+ * If the meaning of the 'Severity' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Severity' attribute. + * @see org.openecomp.ncomp.core.logs.LogSeverity + * @see #setSeverity(LogSeverity) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageRule_Severity() + * @model unique="false" + * @generated + */ + LogSeverity getSeverity(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessageRule#getSeverity Severity}' attribute. + * + * + * @param value the new value of the 'Severity' attribute. + * @see org.openecomp.ncomp.core.logs.LogSeverity + * @see #getSeverity() + * @generated + */ + void setSeverity(LogSeverity value); + + /** + * Returns the value of the 'New Level' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.logs.LogLevel}. + * + *

+ * If the meaning of the 'New Level' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'New Level' attribute. + * @see org.openecomp.ncomp.core.logs.LogLevel + * @see #setNewLevel(LogLevel) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageRule_NewLevel() + * @model unique="false" + * @generated + */ + LogLevel getNewLevel(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessageRule#getNewLevel New Level}' attribute. + * + * + * @param value the new value of the 'New Level' attribute. + * @see org.openecomp.ncomp.core.logs.LogLevel + * @see #getNewLevel() + * @generated + */ + void setNewLevel(LogLevel value); + + /** + * Returns the value of the 'New Severity' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.logs.LogSeverity}. + * + *

+ * If the meaning of the 'New Severity' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'New Severity' attribute. + * @see org.openecomp.ncomp.core.logs.LogSeverity + * @see #setNewSeverity(LogSeverity) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageRule_NewSeverity() + * @model unique="false" + * @generated + */ + LogSeverity getNewSeverity(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessageRule#getNewSeverity New Severity}' attribute. + * + * + * @param value the new value of the 'New Severity' attribute. + * @see org.openecomp.ncomp.core.logs.LogSeverity + * @see #getNewSeverity() + * @generated + */ + void setNewSeverity(LogSeverity value); + + /** + * Returns the value of the 'New Category' attribute. + * + *

+ * If the meaning of the 'New Category' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'New Category' attribute. + * @see #setNewCategory(String) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageRule_NewCategory() + * @model unique="false" + * @generated + */ + String getNewCategory(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessageRule#getNewCategory New Category}' attribute. + * + * + * @param value the new value of the 'New Category' attribute. + * @see #getNewCategory() + * @generated + */ + void setNewCategory(String value); + + /** + * Returns the value of the 'Disabled' attribute. + * The default value is "false". + * + *

+ * If the meaning of the 'Disabled' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Disabled' attribute. + * @see #setDisabled(boolean) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageRule_Disabled() + * @model default="false" unique="false" + * @generated + */ + boolean isDisabled(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessageRule#isDisabled Disabled}' attribute. + * + * + * @param value the new value of the 'Disabled' attribute. + * @see #isDisabled() + * @generated + */ + void setDisabled(boolean value); + + /** + * Returns the value of the 'Update Function' reference. + * + *

+ * If the meaning of the 'Update Function' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Update Function' reference. + * @see #setUpdateFunction(Function) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageRule_UpdateFunction() + * @model + * @generated + */ + Function getUpdateFunction(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessageRule#getUpdateFunction Update Function}' reference. + * + * + * @param value the new value of the 'Update Function' reference. + * @see #getUpdateFunction() + * @generated + */ + void setUpdateFunction(Function value); + +} // LogMessageRule diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageState.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageState.java new file mode 100644 index 0000000..f529d45 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageState.java @@ -0,0 +1,125 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Log Message State'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.logs.LogMessageState#isSuspended Suspended}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessageState#getLog Log}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessageState#getCategory Category}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageState() + * @model + * @generated + */ +public interface LogMessageState extends EObject { + /** + * Returns the value of the 'Suspended' attribute. + * + *

+ * If the meaning of the 'Suspended' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Suspended' attribute. + * @see #setSuspended(boolean) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageState_Suspended() + * @model unique="false" + * @generated + */ + boolean isSuspended(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessageState#isSuspended Suspended}' attribute. + * + * + * @param value the new value of the 'Suspended' attribute. + * @see #isSuspended() + * @generated + */ + void setSuspended(boolean value); + + /** + * Returns the value of the 'Log' reference. + * + *

+ * If the meaning of the 'Log' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Log' reference. + * @see #setLog(LogMessage) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageState_Log() + * @model + * @generated + */ + LogMessage getLog(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessageState#getLog Log}' reference. + * + * + * @param value the new value of the 'Log' reference. + * @see #getLog() + * @generated + */ + void setLog(LogMessage value); + + /** + * Returns the value of the 'Category' reference. + * + *

+ * If the meaning of the 'Category' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Category' reference. + * @see #setCategory(LogMessageCategory) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageState_Category() + * @model + * @generated + */ + LogMessageCategory getCategory(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessageState#getCategory Category}' reference. + * + * + * @param value the new value of the 'Category' reference. + * @see #getCategory() + * @generated + */ + void setCategory(LogMessageCategory value); + +} // LogMessageState diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageStats.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageStats.java new file mode 100644 index 0000000..c1d2e65 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogMessageStats.java @@ -0,0 +1,132 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs; + +import org.openecomp.ncomp.core.NamedEntity; +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +/** + * + * A representation of the model object 'Log Message Stats'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.logs.LogMessageStats#getLevel Level}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessageStats#getSeverity Severity}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogMessageStats#getCount Count}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageStats() + * @model + * @generated + */ +public interface LogMessageStats extends NamedEntity { + /** + * Returns the value of the 'Level' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.logs.LogLevel}. + * + *

+ * If the meaning of the 'Level' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Level' attribute. + * @see org.openecomp.ncomp.core.logs.LogLevel + * @see #setLevel(LogLevel) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageStats_Level() + * @model unique="false" + * @generated + */ + LogLevel getLevel(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessageStats#getLevel Level}' attribute. + * + * + * @param value the new value of the 'Level' attribute. + * @see org.openecomp.ncomp.core.logs.LogLevel + * @see #getLevel() + * @generated + */ + void setLevel(LogLevel value); + + /** + * Returns the value of the 'Severity' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.logs.LogSeverity}. + * + *

+ * If the meaning of the 'Severity' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Severity' attribute. + * @see org.openecomp.ncomp.core.logs.LogSeverity + * @see #setSeverity(LogSeverity) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageStats_Severity() + * @model unique="false" + * @generated + */ + LogSeverity getSeverity(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessageStats#getSeverity Severity}' attribute. + * + * + * @param value the new value of the 'Severity' attribute. + * @see org.openecomp.ncomp.core.logs.LogSeverity + * @see #getSeverity() + * @generated + */ + void setSeverity(LogSeverity value); + + /** + * Returns the value of the 'Count' attribute. + * + *

+ * If the meaning of the 'Count' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Count' attribute. + * @see #setCount(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageStats_Count() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" + * @generated + */ + IncreasingULongMetricAttribute getCount(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogMessageStats#getCount Count}' attribute. + * + * + * @param value the new value of the 'Count' attribute. + * @see #getCount() + * @generated + */ + void setCount(IncreasingULongMetricAttribute value); + +} // LogMessageStats diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogPattern.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogPattern.java new file mode 100644 index 0000000..495ebc8 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogPattern.java @@ -0,0 +1,179 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Log Pattern'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.logs.LogPattern#getPattern Pattern}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogPattern#getMessage Message}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogPattern#getLevel Level}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogPattern#getSeverity Severity}
  • + *
  • {@link org.openecomp.ncomp.core.logs.LogPattern#getPath Path}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogPattern() + * @model + * @generated + */ +public interface LogPattern extends EObject { + /** + * Returns the value of the 'Pattern' attribute. + * + *

+ * If the meaning of the 'Pattern' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Pattern' attribute. + * @see #setPattern(String) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogPattern_Pattern() + * @model unique="false" + * @generated + */ + String getPattern(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogPattern#getPattern Pattern}' attribute. + * + * + * @param value the new value of the 'Pattern' attribute. + * @see #getPattern() + * @generated + */ + void setPattern(String value); + + /** + * Returns the value of the 'Message' attribute. + * + *

+ * If the meaning of the 'Message' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Message' attribute. + * @see #setMessage(String) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogPattern_Message() + * @model unique="false" + * @generated + */ + String getMessage(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogPattern#getMessage Message}' attribute. + * + * + * @param value the new value of the 'Message' attribute. + * @see #getMessage() + * @generated + */ + void setMessage(String value); + + /** + * Returns the value of the 'Level' attribute. + * + *

+ * If the meaning of the 'Level' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Level' attribute. + * @see #setLevel(String) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogPattern_Level() + * @model unique="false" + * @generated + */ + String getLevel(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogPattern#getLevel Level}' attribute. + * + * + * @param value the new value of the 'Level' attribute. + * @see #getLevel() + * @generated + */ + void setLevel(String value); + + /** + * Returns the value of the 'Severity' attribute. + * + *

+ * If the meaning of the 'Severity' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Severity' attribute. + * @see #setSeverity(String) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogPattern_Severity() + * @model unique="false" + * @generated + */ + String getSeverity(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogPattern#getSeverity Severity}' attribute. + * + * + * @param value the new value of the 'Severity' attribute. + * @see #getSeverity() + * @generated + */ + void setSeverity(String value); + + /** + * Returns the value of the 'Path' attribute. + * + *

+ * If the meaning of the 'Path' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Path' attribute. + * @see #setPath(String) + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogPattern_Path() + * @model unique="false" + * @generated + */ + String getPath(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.logs.LogPattern#getPath Path}' attribute. + * + * + * @param value the new value of the 'Path' attribute. + * @see #getPath() + * @generated + */ + void setPath(String value); + +} // LogPattern diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogSeverity.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogSeverity.java new file mode 100644 index 0000000..2085eed --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogSeverity.java @@ -0,0 +1,306 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Log Severity', + * and utility methods for working with them. + * + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogSeverity() + * @model + * @generated + */ +public enum LogSeverity implements Enumerator { + /** + * The 'UNKNOWN' literal object. + * + * + * @see #UNKNOWN_VALUE + * @generated + * @ordered + */ + UNKNOWN(0, "UNKNOWN", "UNKNOWN"), + + /** + * The 'SEV1' literal object. + * + * + * @see #SEV1_VALUE + * @generated + * @ordered + */ + SEV1(0, "SEV1", "SEV1"), + + /** + * The 'SEV2' literal object. + * + * + * @see #SEV2_VALUE + * @generated + * @ordered + */ + SEV2(0, "SEV2", "SEV2"), + + /** + * The 'SEV3' literal object. + * + * + * @see #SEV3_VALUE + * @generated + * @ordered + */ + SEV3(0, "SEV3", "SEV3"), + + /** + * The 'SEV4' literal object. + * + * + * @see #SEV4_VALUE + * @generated + * @ordered + */ + SEV4(0, "SEV4", "SEV4"); + + /** + * The 'UNKNOWN' literal value. + * + *

+ * If the meaning of 'UNKNOWN' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #UNKNOWN + * @model + * @generated + * @ordered + */ + public static final int UNKNOWN_VALUE = 0; + + /** + * The 'SEV1' literal value. + * + *

+ * If the meaning of 'SEV1' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #SEV1 + * @model + * @generated + * @ordered + */ + public static final int SEV1_VALUE = 0; + + /** + * The 'SEV2' literal value. + * + *

+ * If the meaning of 'SEV2' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #SEV2 + * @model + * @generated + * @ordered + */ + public static final int SEV2_VALUE = 0; + + /** + * The 'SEV3' literal value. + * + *

+ * If the meaning of 'SEV3' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #SEV3 + * @model + * @generated + * @ordered + */ + public static final int SEV3_VALUE = 0; + + /** + * The 'SEV4' literal value. + * + *

+ * If the meaning of 'SEV4' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #SEV4 + * @model + * @generated + * @ordered + */ + public static final int SEV4_VALUE = 0; + + /** + * An array of all the 'Log Severity' enumerators. + * + * + * @generated + */ + private static final LogSeverity[] VALUES_ARRAY = + new LogSeverity[] { + UNKNOWN, + SEV1, + SEV2, + SEV3, + SEV4, + }; + + /** + * A public read-only list of all the 'Log Severity' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Log Severity' literal with the specified literal value. + * + * + * @generated + */ + public static LogSeverity get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + LogSeverity result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Log Severity' literal with the specified name. + * + * + * @generated + */ + public static LogSeverity getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + LogSeverity result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Log Severity' literal with the specified integer value. + * + * + * @generated + */ + public static LogSeverity get(int value) { + switch (value) { + case UNKNOWN_VALUE: return UNKNOWN; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private LogSeverity(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //LogSeverity diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogsFactory.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogsFactory.java new file mode 100644 index 0000000..7a9af68 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogsFactory.java @@ -0,0 +1,135 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.ncomp.core.logs.LogsPackage + * @generated + */ +public interface LogsFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + LogsFactory eINSTANCE = org.openecomp.ncomp.core.logs.impl.LogsFactoryImpl.init(); + + /** + * Returns a new object of class 'Log Message'. + * + * + * @return a new object of class 'Log Message'. + * @generated + */ + LogMessage createLogMessage(); + + /** + * Returns a new object of class 'Log Message Rule'. + * + * + * @return a new object of class 'Log Message Rule'. + * @generated + */ + LogMessageRule createLogMessageRule(); + + /** + * Returns a new object of class 'Log Message Container Configuration'. + * + * + * @return a new object of class 'Log Message Container Configuration'. + * @generated + */ + LogMessageContainerConfiguration createLogMessageContainerConfiguration(); + + /** + * Returns a new object of class 'Log Message Category'. + * + * + * @return a new object of class 'Log Message Category'. + * @generated + */ + LogMessageCategory createLogMessageCategory(); + + /** + * Returns a new object of class 'Log Message Stats'. + * + * + * @return a new object of class 'Log Message Stats'. + * @generated + */ + LogMessageStats createLogMessageStats(); + + /** + * Returns a new object of class 'Log Message State'. + * + * + * @return a new object of class 'Log Message State'. + * @generated + */ + LogMessageState createLogMessageState(); + + /** + * Returns a new object of class 'Log Configuration'. + * + * + * @return a new object of class 'Log Configuration'. + * @generated + */ + LogConfiguration createLogConfiguration(); + + /** + * Returns a new object of class 'Log File'. + * + * + * @return a new object of class 'Log File'. + * @generated + */ + LogFile createLogFile(); + + /** + * Returns a new object of class 'Log Pattern'. + * + * + * @return a new object of class 'Log Pattern'. + * @generated + */ + LogPattern createLogPattern(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + LogsPackage getLogsPackage(); + +} //LogsFactory diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogsPackage.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogsPackage.java new file mode 100644 index 0000000..d82742f --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/LogsPackage.java @@ -0,0 +1,1766 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs; + +import org.openecomp.ncomp.core.CorePackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.ncomp.core.logs.LogsFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/ncomp-core-model/src/main/xcore-gen' basePackage='org.openecomp.ncomp.core'" + * @generated + */ +public interface LogsPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "logs"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.core.logs"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "logs"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + LogsPackage eINSTANCE = org.openecomp.ncomp.core.logs.impl.LogsPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageImpl Log Message}' class. + * + * + * @see org.openecomp.ncomp.core.logs.impl.LogMessageImpl + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogMessage() + * @generated + */ + int LOG_MESSAGE = 0; + + /** + * The feature id for the 'Time' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE__TIME = 0; + + /** + * The feature id for the 'Resource Name' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE__RESOURCE_NAME = 1; + + /** + * The feature id for the 'Severity' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE__SEVERITY = 2; + + /** + * The feature id for the 'Level' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE__LEVEL = 3; + + /** + * The feature id for the 'Message' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE__MESSAGE = 4; + + /** + * The feature id for the 'Category' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE__CATEGORY = 5; + + /** + * The feature id for the 'Number Of Suppressed' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE__NUMBER_OF_SUPPRESSED = 6; + + /** + * The feature id for the 'Suppressed Start Time' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE__SUPPRESSED_START_TIME = 7; + + /** + * The number of structural features of the 'Log Message' class. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_FEATURE_COUNT = 8; + + /** + * The number of operations of the 'Log Message' class. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl Log Message Rule}' class. + * + * + * @see org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogMessageRule() + * @generated + */ + int LOG_MESSAGE_RULE = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Description' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__DESCRIPTION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Message Filter' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__MESSAGE_FILTER = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Resource Path Filter' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__RESOURCE_PATH_FILTER = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Level' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__LEVEL = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Severity' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__SEVERITY = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The feature id for the 'New Level' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__NEW_LEVEL = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The feature id for the 'New Severity' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__NEW_SEVERITY = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 6; + + /** + * The feature id for the 'New Category' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__NEW_CATEGORY = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 7; + + /** + * The feature id for the 'Disabled' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__DISABLED = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 8; + + /** + * The feature id for the 'Update Function' reference. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__UPDATE_FUNCTION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 9; + + /** + * The number of structural features of the 'Log Message Rule' class. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 10; + + /** + * The number of operations of the 'Log Message Rule' class. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageContainerImpl Log Message Container}' class. + * + * + * @see org.openecomp.ncomp.core.logs.impl.LogMessageContainerImpl + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogMessageContainer() + * @generated + */ + int LOG_MESSAGE_CONTAINER = 2; + + /** + * The feature id for the 'Log Message Configuration' containment reference. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CONFIGURATION = 0; + + /** + * The feature id for the 'Log Message Categories' containment reference list. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CATEGORIES = 1; + + /** + * The feature id for the 'Log Message Stats' containment reference list. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_CONTAINER__LOG_MESSAGE_STATS = 2; + + /** + * The number of structural features of the 'Log Message Container' class. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_CONTAINER_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Log Message Container' class. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_CONTAINER_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageContainerConfigurationImpl Log Message Container Configuration}' class. + * + * + * @see org.openecomp.ncomp.core.logs.impl.LogMessageContainerConfigurationImpl + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogMessageContainerConfiguration() + * @generated + */ + int LOG_MESSAGE_CONTAINER_CONFIGURATION = 3; + + /** + * The number of structural features of the 'Log Message Container Configuration' class. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_CONTAINER_CONFIGURATION_FEATURE_COUNT = 0; + + /** + * The number of operations of the 'Log Message Container Configuration' class. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_CONTAINER_CONFIGURATION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageCategoryImpl Log Message Category}' class. + * + * + * @see org.openecomp.ncomp.core.logs.impl.LogMessageCategoryImpl + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogMessageCategory() + * @generated + */ + int LOG_MESSAGE_CATEGORY = 4; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_CATEGORY__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_CATEGORY__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_CATEGORY__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_CATEGORY__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Stats' containment reference list. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_CATEGORY__STATS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Log Message Category' class. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_CATEGORY_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Log Message Category' class. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_CATEGORY_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageStatsImpl Log Message Stats}' class. + * + * + * @see org.openecomp.ncomp.core.logs.impl.LogMessageStatsImpl + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogMessageStats() + * @generated + */ + int LOG_MESSAGE_STATS = 5; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_STATS__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_STATS__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_STATS__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_STATS__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the 'Level' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_STATS__LEVEL = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Severity' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_STATS__SEVERITY = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Count' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_STATS__COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Log Message Stats' class. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_STATS_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The number of operations of the 'Log Message Stats' class. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_STATS_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageStateImpl Log Message State}' class. + * + * + * @see org.openecomp.ncomp.core.logs.impl.LogMessageStateImpl + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogMessageState() + * @generated + */ + int LOG_MESSAGE_STATE = 6; + + /** + * The feature id for the 'Suspended' attribute. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_STATE__SUSPENDED = 0; + + /** + * The feature id for the 'Log' reference. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_STATE__LOG = 1; + + /** + * The feature id for the 'Category' reference. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_STATE__CATEGORY = 2; + + /** + * The number of structural features of the 'Log Message State' class. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_STATE_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Log Message State' class. + * + * + * @generated + * @ordered + */ + int LOG_MESSAGE_STATE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.logs.impl.LogConfigurationImpl Log Configuration}' class. + * + * + * @see org.openecomp.ncomp.core.logs.impl.LogConfigurationImpl + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogConfiguration() + * @generated + */ + int LOG_CONFIGURATION = 7; + + /** + * The feature id for the 'Files' containment reference list. + * + * + * @generated + * @ordered + */ + int LOG_CONFIGURATION__FILES = 0; + + /** + * The number of structural features of the 'Log Configuration' class. + * + * + * @generated + * @ordered + */ + int LOG_CONFIGURATION_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Log Configuration' class. + * + * + * @generated + * @ordered + */ + int LOG_CONFIGURATION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.logs.impl.LogFileImpl Log File}' class. + * + * + * @see org.openecomp.ncomp.core.logs.impl.LogFileImpl + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogFile() + * @generated + */ + int LOG_FILE = 8; + + /** + * The feature id for the 'Filename' attribute. + * + * + * @generated + * @ordered + */ + int LOG_FILE__FILENAME = 0; + + /** + * The feature id for the 'Patterns' containment reference list. + * + * + * @generated + * @ordered + */ + int LOG_FILE__PATTERNS = 1; + + /** + * The number of structural features of the 'Log File' class. + * + * + * @generated + * @ordered + */ + int LOG_FILE_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Log File' class. + * + * + * @generated + * @ordered + */ + int LOG_FILE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.logs.impl.LogPatternImpl Log Pattern}' class. + * + * + * @see org.openecomp.ncomp.core.logs.impl.LogPatternImpl + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogPattern() + * @generated + */ + int LOG_PATTERN = 9; + + /** + * The feature id for the 'Pattern' attribute. + * + * + * @generated + * @ordered + */ + int LOG_PATTERN__PATTERN = 0; + + /** + * The feature id for the 'Message' attribute. + * + * + * @generated + * @ordered + */ + int LOG_PATTERN__MESSAGE = 1; + + /** + * The feature id for the 'Level' attribute. + * + * + * @generated + * @ordered + */ + int LOG_PATTERN__LEVEL = 2; + + /** + * The feature id for the 'Severity' attribute. + * + * + * @generated + * @ordered + */ + int LOG_PATTERN__SEVERITY = 3; + + /** + * The feature id for the 'Path' attribute. + * + * + * @generated + * @ordered + */ + int LOG_PATTERN__PATH = 4; + + /** + * The number of structural features of the 'Log Pattern' class. + * + * + * @generated + * @ordered + */ + int LOG_PATTERN_FEATURE_COUNT = 5; + + /** + * The number of operations of the 'Log Pattern' class. + * + * + * @generated + * @ordered + */ + int LOG_PATTERN_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.logs.LogLevel Log Level}' enum. + * + * + * @see org.openecomp.ncomp.core.logs.LogLevel + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogLevel() + * @generated + */ + int LOG_LEVEL = 10; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.logs.LogSeverity Log Severity}' enum. + * + * + * @see org.openecomp.ncomp.core.logs.LogSeverity + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogSeverity() + * @generated + */ + int LOG_SEVERITY = 11; + + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.logs.LogMessage Log Message}'. + * + * + * @return the meta object for class 'Log Message'. + * @see org.openecomp.ncomp.core.logs.LogMessage + * @generated + */ + EClass getLogMessage(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogMessage#getTime Time}'. + * + * + * @return the meta object for the attribute 'Time'. + * @see org.openecomp.ncomp.core.logs.LogMessage#getTime() + * @see #getLogMessage() + * @generated + */ + EAttribute getLogMessage_Time(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogMessage#getResourceName Resource Name}'. + * + * + * @return the meta object for the attribute 'Resource Name'. + * @see org.openecomp.ncomp.core.logs.LogMessage#getResourceName() + * @see #getLogMessage() + * @generated + */ + EAttribute getLogMessage_ResourceName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogMessage#getSeverity Severity}'. + * + * + * @return the meta object for the attribute 'Severity'. + * @see org.openecomp.ncomp.core.logs.LogMessage#getSeverity() + * @see #getLogMessage() + * @generated + */ + EAttribute getLogMessage_Severity(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogMessage#getLevel Level}'. + * + * + * @return the meta object for the attribute 'Level'. + * @see org.openecomp.ncomp.core.logs.LogMessage#getLevel() + * @see #getLogMessage() + * @generated + */ + EAttribute getLogMessage_Level(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogMessage#getMessage Message}'. + * + * + * @return the meta object for the attribute 'Message'. + * @see org.openecomp.ncomp.core.logs.LogMessage#getMessage() + * @see #getLogMessage() + * @generated + */ + EAttribute getLogMessage_Message(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogMessage#getCategory Category}'. + * + * + * @return the meta object for the attribute 'Category'. + * @see org.openecomp.ncomp.core.logs.LogMessage#getCategory() + * @see #getLogMessage() + * @generated + */ + EAttribute getLogMessage_Category(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogMessage#getNumberOfSuppressed Number Of Suppressed}'. + * + * + * @return the meta object for the attribute 'Number Of Suppressed'. + * @see org.openecomp.ncomp.core.logs.LogMessage#getNumberOfSuppressed() + * @see #getLogMessage() + * @generated + */ + EAttribute getLogMessage_NumberOfSuppressed(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogMessage#getSuppressedStartTime Suppressed Start Time}'. + * + * + * @return the meta object for the attribute 'Suppressed Start Time'. + * @see org.openecomp.ncomp.core.logs.LogMessage#getSuppressedStartTime() + * @see #getLogMessage() + * @generated + */ + EAttribute getLogMessage_SuppressedStartTime(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.logs.LogMessageRule Log Message Rule}'. + * + * + * @return the meta object for class 'Log Message Rule'. + * @see org.openecomp.ncomp.core.logs.LogMessageRule + * @generated + */ + EClass getLogMessageRule(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogMessageRule#getDescription Description}'. + * + * + * @return the meta object for the attribute 'Description'. + * @see org.openecomp.ncomp.core.logs.LogMessageRule#getDescription() + * @see #getLogMessageRule() + * @generated + */ + EAttribute getLogMessageRule_Description(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogMessageRule#getMessageFilter Message Filter}'. + * + * + * @return the meta object for the attribute 'Message Filter'. + * @see org.openecomp.ncomp.core.logs.LogMessageRule#getMessageFilter() + * @see #getLogMessageRule() + * @generated + */ + EAttribute getLogMessageRule_MessageFilter(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogMessageRule#getResourcePathFilter Resource Path Filter}'. + * + * + * @return the meta object for the attribute 'Resource Path Filter'. + * @see org.openecomp.ncomp.core.logs.LogMessageRule#getResourcePathFilter() + * @see #getLogMessageRule() + * @generated + */ + EAttribute getLogMessageRule_ResourcePathFilter(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogMessageRule#getLevel Level}'. + * + * + * @return the meta object for the attribute 'Level'. + * @see org.openecomp.ncomp.core.logs.LogMessageRule#getLevel() + * @see #getLogMessageRule() + * @generated + */ + EAttribute getLogMessageRule_Level(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogMessageRule#getSeverity Severity}'. + * + * + * @return the meta object for the attribute 'Severity'. + * @see org.openecomp.ncomp.core.logs.LogMessageRule#getSeverity() + * @see #getLogMessageRule() + * @generated + */ + EAttribute getLogMessageRule_Severity(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogMessageRule#getNewLevel New Level}'. + * + * + * @return the meta object for the attribute 'New Level'. + * @see org.openecomp.ncomp.core.logs.LogMessageRule#getNewLevel() + * @see #getLogMessageRule() + * @generated + */ + EAttribute getLogMessageRule_NewLevel(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogMessageRule#getNewSeverity New Severity}'. + * + * + * @return the meta object for the attribute 'New Severity'. + * @see org.openecomp.ncomp.core.logs.LogMessageRule#getNewSeverity() + * @see #getLogMessageRule() + * @generated + */ + EAttribute getLogMessageRule_NewSeverity(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogMessageRule#getNewCategory New Category}'. + * + * + * @return the meta object for the attribute 'New Category'. + * @see org.openecomp.ncomp.core.logs.LogMessageRule#getNewCategory() + * @see #getLogMessageRule() + * @generated + */ + EAttribute getLogMessageRule_NewCategory(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogMessageRule#isDisabled Disabled}'. + * + * + * @return the meta object for the attribute 'Disabled'. + * @see org.openecomp.ncomp.core.logs.LogMessageRule#isDisabled() + * @see #getLogMessageRule() + * @generated + */ + EAttribute getLogMessageRule_Disabled(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.ncomp.core.logs.LogMessageRule#getUpdateFunction Update Function}'. + * + * + * @return the meta object for the reference 'Update Function'. + * @see org.openecomp.ncomp.core.logs.LogMessageRule#getUpdateFunction() + * @see #getLogMessageRule() + * @generated + */ + EReference getLogMessageRule_UpdateFunction(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.logs.LogMessageContainer Log Message Container}'. + * + * + * @return the meta object for class 'Log Message Container'. + * @see org.openecomp.ncomp.core.logs.LogMessageContainer + * @generated + */ + EClass getLogMessageContainer(); + + /** + * Returns the meta object for the containment reference '{@link org.openecomp.ncomp.core.logs.LogMessageContainer#getLogMessageConfiguration Log Message Configuration}'. + * + * + * @return the meta object for the containment reference 'Log Message Configuration'. + * @see org.openecomp.ncomp.core.logs.LogMessageContainer#getLogMessageConfiguration() + * @see #getLogMessageContainer() + * @generated + */ + EReference getLogMessageContainer_LogMessageConfiguration(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.core.logs.LogMessageContainer#getLogMessageCategories Log Message Categories}'. + * + * + * @return the meta object for the containment reference list 'Log Message Categories'. + * @see org.openecomp.ncomp.core.logs.LogMessageContainer#getLogMessageCategories() + * @see #getLogMessageContainer() + * @generated + */ + EReference getLogMessageContainer_LogMessageCategories(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.core.logs.LogMessageContainer#getLogMessageStats Log Message Stats}'. + * + * + * @return the meta object for the containment reference list 'Log Message Stats'. + * @see org.openecomp.ncomp.core.logs.LogMessageContainer#getLogMessageStats() + * @see #getLogMessageContainer() + * @generated + */ + EReference getLogMessageContainer_LogMessageStats(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.logs.LogMessageContainerConfiguration Log Message Container Configuration}'. + * + * + * @return the meta object for class 'Log Message Container Configuration'. + * @see org.openecomp.ncomp.core.logs.LogMessageContainerConfiguration + * @generated + */ + EClass getLogMessageContainerConfiguration(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.logs.LogMessageCategory Log Message Category}'. + * + * + * @return the meta object for class 'Log Message Category'. + * @see org.openecomp.ncomp.core.logs.LogMessageCategory + * @generated + */ + EClass getLogMessageCategory(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.core.logs.LogMessageCategory#getStats Stats}'. + * + * + * @return the meta object for the containment reference list 'Stats'. + * @see org.openecomp.ncomp.core.logs.LogMessageCategory#getStats() + * @see #getLogMessageCategory() + * @generated + */ + EReference getLogMessageCategory_Stats(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.logs.LogMessageStats Log Message Stats}'. + * + * + * @return the meta object for class 'Log Message Stats'. + * @see org.openecomp.ncomp.core.logs.LogMessageStats + * @generated + */ + EClass getLogMessageStats(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogMessageStats#getLevel Level}'. + * + * + * @return the meta object for the attribute 'Level'. + * @see org.openecomp.ncomp.core.logs.LogMessageStats#getLevel() + * @see #getLogMessageStats() + * @generated + */ + EAttribute getLogMessageStats_Level(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogMessageStats#getSeverity Severity}'. + * + * + * @return the meta object for the attribute 'Severity'. + * @see org.openecomp.ncomp.core.logs.LogMessageStats#getSeverity() + * @see #getLogMessageStats() + * @generated + */ + EAttribute getLogMessageStats_Severity(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogMessageStats#getCount Count}'. + * + * + * @return the meta object for the attribute 'Count'. + * @see org.openecomp.ncomp.core.logs.LogMessageStats#getCount() + * @see #getLogMessageStats() + * @generated + */ + EAttribute getLogMessageStats_Count(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.logs.LogMessageState Log Message State}'. + * + * + * @return the meta object for class 'Log Message State'. + * @see org.openecomp.ncomp.core.logs.LogMessageState + * @generated + */ + EClass getLogMessageState(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogMessageState#isSuspended Suspended}'. + * + * + * @return the meta object for the attribute 'Suspended'. + * @see org.openecomp.ncomp.core.logs.LogMessageState#isSuspended() + * @see #getLogMessageState() + * @generated + */ + EAttribute getLogMessageState_Suspended(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.ncomp.core.logs.LogMessageState#getLog Log}'. + * + * + * @return the meta object for the reference 'Log'. + * @see org.openecomp.ncomp.core.logs.LogMessageState#getLog() + * @see #getLogMessageState() + * @generated + */ + EReference getLogMessageState_Log(); + + /** + * Returns the meta object for the reference '{@link org.openecomp.ncomp.core.logs.LogMessageState#getCategory Category}'. + * + * + * @return the meta object for the reference 'Category'. + * @see org.openecomp.ncomp.core.logs.LogMessageState#getCategory() + * @see #getLogMessageState() + * @generated + */ + EReference getLogMessageState_Category(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.logs.LogConfiguration Log Configuration}'. + * + * + * @return the meta object for class 'Log Configuration'. + * @see org.openecomp.ncomp.core.logs.LogConfiguration + * @generated + */ + EClass getLogConfiguration(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.core.logs.LogConfiguration#getFiles Files}'. + * + * + * @return the meta object for the containment reference list 'Files'. + * @see org.openecomp.ncomp.core.logs.LogConfiguration#getFiles() + * @see #getLogConfiguration() + * @generated + */ + EReference getLogConfiguration_Files(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.logs.LogFile Log File}'. + * + * + * @return the meta object for class 'Log File'. + * @see org.openecomp.ncomp.core.logs.LogFile + * @generated + */ + EClass getLogFile(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogFile#getFilename Filename}'. + * + * + * @return the meta object for the attribute 'Filename'. + * @see org.openecomp.ncomp.core.logs.LogFile#getFilename() + * @see #getLogFile() + * @generated + */ + EAttribute getLogFile_Filename(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.core.logs.LogFile#getPatterns Patterns}'. + * + * + * @return the meta object for the containment reference list 'Patterns'. + * @see org.openecomp.ncomp.core.logs.LogFile#getPatterns() + * @see #getLogFile() + * @generated + */ + EReference getLogFile_Patterns(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.logs.LogPattern Log Pattern}'. + * + * + * @return the meta object for class 'Log Pattern'. + * @see org.openecomp.ncomp.core.logs.LogPattern + * @generated + */ + EClass getLogPattern(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogPattern#getPattern Pattern}'. + * + * + * @return the meta object for the attribute 'Pattern'. + * @see org.openecomp.ncomp.core.logs.LogPattern#getPattern() + * @see #getLogPattern() + * @generated + */ + EAttribute getLogPattern_Pattern(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogPattern#getMessage Message}'. + * + * + * @return the meta object for the attribute 'Message'. + * @see org.openecomp.ncomp.core.logs.LogPattern#getMessage() + * @see #getLogPattern() + * @generated + */ + EAttribute getLogPattern_Message(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogPattern#getLevel Level}'. + * + * + * @return the meta object for the attribute 'Level'. + * @see org.openecomp.ncomp.core.logs.LogPattern#getLevel() + * @see #getLogPattern() + * @generated + */ + EAttribute getLogPattern_Level(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogPattern#getSeverity Severity}'. + * + * + * @return the meta object for the attribute 'Severity'. + * @see org.openecomp.ncomp.core.logs.LogPattern#getSeverity() + * @see #getLogPattern() + * @generated + */ + EAttribute getLogPattern_Severity(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.logs.LogPattern#getPath Path}'. + * + * + * @return the meta object for the attribute 'Path'. + * @see org.openecomp.ncomp.core.logs.LogPattern#getPath() + * @see #getLogPattern() + * @generated + */ + EAttribute getLogPattern_Path(); + + /** + * Returns the meta object for enum '{@link org.openecomp.ncomp.core.logs.LogLevel Log Level}'. + * + * + * @return the meta object for enum 'Log Level'. + * @see org.openecomp.ncomp.core.logs.LogLevel + * @generated + */ + EEnum getLogLevel(); + + /** + * Returns the meta object for enum '{@link org.openecomp.ncomp.core.logs.LogSeverity Log Severity}'. + * + * + * @return the meta object for enum 'Log Severity'. + * @see org.openecomp.ncomp.core.logs.LogSeverity + * @generated + */ + EEnum getLogSeverity(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + LogsFactory getLogsFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageImpl Log Message}' class. + * + * + * @see org.openecomp.ncomp.core.logs.impl.LogMessageImpl + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogMessage() + * @generated + */ + EClass LOG_MESSAGE = eINSTANCE.getLogMessage(); + + /** + * The meta object literal for the 'Time' attribute feature. + * + * + * @generated + */ + EAttribute LOG_MESSAGE__TIME = eINSTANCE.getLogMessage_Time(); + + /** + * The meta object literal for the 'Resource Name' attribute feature. + * + * + * @generated + */ + EAttribute LOG_MESSAGE__RESOURCE_NAME = eINSTANCE.getLogMessage_ResourceName(); + + /** + * The meta object literal for the 'Severity' attribute feature. + * + * + * @generated + */ + EAttribute LOG_MESSAGE__SEVERITY = eINSTANCE.getLogMessage_Severity(); + + /** + * The meta object literal for the 'Level' attribute feature. + * + * + * @generated + */ + EAttribute LOG_MESSAGE__LEVEL = eINSTANCE.getLogMessage_Level(); + + /** + * The meta object literal for the 'Message' attribute feature. + * + * + * @generated + */ + EAttribute LOG_MESSAGE__MESSAGE = eINSTANCE.getLogMessage_Message(); + + /** + * The meta object literal for the 'Category' attribute feature. + * + * + * @generated + */ + EAttribute LOG_MESSAGE__CATEGORY = eINSTANCE.getLogMessage_Category(); + + /** + * The meta object literal for the 'Number Of Suppressed' attribute feature. + * + * + * @generated + */ + EAttribute LOG_MESSAGE__NUMBER_OF_SUPPRESSED = eINSTANCE.getLogMessage_NumberOfSuppressed(); + + /** + * The meta object literal for the 'Suppressed Start Time' attribute feature. + * + * + * @generated + */ + EAttribute LOG_MESSAGE__SUPPRESSED_START_TIME = eINSTANCE.getLogMessage_SuppressedStartTime(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl Log Message Rule}' class. + * + * + * @see org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogMessageRule() + * @generated + */ + EClass LOG_MESSAGE_RULE = eINSTANCE.getLogMessageRule(); + + /** + * The meta object literal for the 'Description' attribute feature. + * + * + * @generated + */ + EAttribute LOG_MESSAGE_RULE__DESCRIPTION = eINSTANCE.getLogMessageRule_Description(); + + /** + * The meta object literal for the 'Message Filter' attribute feature. + * + * + * @generated + */ + EAttribute LOG_MESSAGE_RULE__MESSAGE_FILTER = eINSTANCE.getLogMessageRule_MessageFilter(); + + /** + * The meta object literal for the 'Resource Path Filter' attribute feature. + * + * + * @generated + */ + EAttribute LOG_MESSAGE_RULE__RESOURCE_PATH_FILTER = eINSTANCE.getLogMessageRule_ResourcePathFilter(); + + /** + * The meta object literal for the 'Level' attribute feature. + * + * + * @generated + */ + EAttribute LOG_MESSAGE_RULE__LEVEL = eINSTANCE.getLogMessageRule_Level(); + + /** + * The meta object literal for the 'Severity' attribute feature. + * + * + * @generated + */ + EAttribute LOG_MESSAGE_RULE__SEVERITY = eINSTANCE.getLogMessageRule_Severity(); + + /** + * The meta object literal for the 'New Level' attribute feature. + * + * + * @generated + */ + EAttribute LOG_MESSAGE_RULE__NEW_LEVEL = eINSTANCE.getLogMessageRule_NewLevel(); + + /** + * The meta object literal for the 'New Severity' attribute feature. + * + * + * @generated + */ + EAttribute LOG_MESSAGE_RULE__NEW_SEVERITY = eINSTANCE.getLogMessageRule_NewSeverity(); + + /** + * The meta object literal for the 'New Category' attribute feature. + * + * + * @generated + */ + EAttribute LOG_MESSAGE_RULE__NEW_CATEGORY = eINSTANCE.getLogMessageRule_NewCategory(); + + /** + * The meta object literal for the 'Disabled' attribute feature. + * + * + * @generated + */ + EAttribute LOG_MESSAGE_RULE__DISABLED = eINSTANCE.getLogMessageRule_Disabled(); + + /** + * The meta object literal for the 'Update Function' reference feature. + * + * + * @generated + */ + EReference LOG_MESSAGE_RULE__UPDATE_FUNCTION = eINSTANCE.getLogMessageRule_UpdateFunction(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageContainerImpl Log Message Container}' class. + * + * + * @see org.openecomp.ncomp.core.logs.impl.LogMessageContainerImpl + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogMessageContainer() + * @generated + */ + EClass LOG_MESSAGE_CONTAINER = eINSTANCE.getLogMessageContainer(); + + /** + * The meta object literal for the 'Log Message Configuration' containment reference feature. + * + * + * @generated + */ + EReference LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CONFIGURATION = eINSTANCE.getLogMessageContainer_LogMessageConfiguration(); + + /** + * The meta object literal for the 'Log Message Categories' containment reference list feature. + * + * + * @generated + */ + EReference LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CATEGORIES = eINSTANCE.getLogMessageContainer_LogMessageCategories(); + + /** + * The meta object literal for the 'Log Message Stats' containment reference list feature. + * + * + * @generated + */ + EReference LOG_MESSAGE_CONTAINER__LOG_MESSAGE_STATS = eINSTANCE.getLogMessageContainer_LogMessageStats(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageContainerConfigurationImpl Log Message Container Configuration}' class. + * + * + * @see org.openecomp.ncomp.core.logs.impl.LogMessageContainerConfigurationImpl + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogMessageContainerConfiguration() + * @generated + */ + EClass LOG_MESSAGE_CONTAINER_CONFIGURATION = eINSTANCE.getLogMessageContainerConfiguration(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageCategoryImpl Log Message Category}' class. + * + * + * @see org.openecomp.ncomp.core.logs.impl.LogMessageCategoryImpl + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogMessageCategory() + * @generated + */ + EClass LOG_MESSAGE_CATEGORY = eINSTANCE.getLogMessageCategory(); + + /** + * The meta object literal for the 'Stats' containment reference list feature. + * + * + * @generated + */ + EReference LOG_MESSAGE_CATEGORY__STATS = eINSTANCE.getLogMessageCategory_Stats(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageStatsImpl Log Message Stats}' class. + * + * + * @see org.openecomp.ncomp.core.logs.impl.LogMessageStatsImpl + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogMessageStats() + * @generated + */ + EClass LOG_MESSAGE_STATS = eINSTANCE.getLogMessageStats(); + + /** + * The meta object literal for the 'Level' attribute feature. + * + * + * @generated + */ + EAttribute LOG_MESSAGE_STATS__LEVEL = eINSTANCE.getLogMessageStats_Level(); + + /** + * The meta object literal for the 'Severity' attribute feature. + * + * + * @generated + */ + EAttribute LOG_MESSAGE_STATS__SEVERITY = eINSTANCE.getLogMessageStats_Severity(); + + /** + * The meta object literal for the 'Count' attribute feature. + * + * + * @generated + */ + EAttribute LOG_MESSAGE_STATS__COUNT = eINSTANCE.getLogMessageStats_Count(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageStateImpl Log Message State}' class. + * + * + * @see org.openecomp.ncomp.core.logs.impl.LogMessageStateImpl + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogMessageState() + * @generated + */ + EClass LOG_MESSAGE_STATE = eINSTANCE.getLogMessageState(); + + /** + * The meta object literal for the 'Suspended' attribute feature. + * + * + * @generated + */ + EAttribute LOG_MESSAGE_STATE__SUSPENDED = eINSTANCE.getLogMessageState_Suspended(); + + /** + * The meta object literal for the 'Log' reference feature. + * + * + * @generated + */ + EReference LOG_MESSAGE_STATE__LOG = eINSTANCE.getLogMessageState_Log(); + + /** + * The meta object literal for the 'Category' reference feature. + * + * + * @generated + */ + EReference LOG_MESSAGE_STATE__CATEGORY = eINSTANCE.getLogMessageState_Category(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.logs.impl.LogConfigurationImpl Log Configuration}' class. + * + * + * @see org.openecomp.ncomp.core.logs.impl.LogConfigurationImpl + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogConfiguration() + * @generated + */ + EClass LOG_CONFIGURATION = eINSTANCE.getLogConfiguration(); + + /** + * The meta object literal for the 'Files' containment reference list feature. + * + * + * @generated + */ + EReference LOG_CONFIGURATION__FILES = eINSTANCE.getLogConfiguration_Files(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.logs.impl.LogFileImpl Log File}' class. + * + * + * @see org.openecomp.ncomp.core.logs.impl.LogFileImpl + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogFile() + * @generated + */ + EClass LOG_FILE = eINSTANCE.getLogFile(); + + /** + * The meta object literal for the 'Filename' attribute feature. + * + * + * @generated + */ + EAttribute LOG_FILE__FILENAME = eINSTANCE.getLogFile_Filename(); + + /** + * The meta object literal for the 'Patterns' containment reference list feature. + * + * + * @generated + */ + EReference LOG_FILE__PATTERNS = eINSTANCE.getLogFile_Patterns(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.logs.impl.LogPatternImpl Log Pattern}' class. + * + * + * @see org.openecomp.ncomp.core.logs.impl.LogPatternImpl + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogPattern() + * @generated + */ + EClass LOG_PATTERN = eINSTANCE.getLogPattern(); + + /** + * The meta object literal for the 'Pattern' attribute feature. + * + * + * @generated + */ + EAttribute LOG_PATTERN__PATTERN = eINSTANCE.getLogPattern_Pattern(); + + /** + * The meta object literal for the 'Message' attribute feature. + * + * + * @generated + */ + EAttribute LOG_PATTERN__MESSAGE = eINSTANCE.getLogPattern_Message(); + + /** + * The meta object literal for the 'Level' attribute feature. + * + * + * @generated + */ + EAttribute LOG_PATTERN__LEVEL = eINSTANCE.getLogPattern_Level(); + + /** + * The meta object literal for the 'Severity' attribute feature. + * + * + * @generated + */ + EAttribute LOG_PATTERN__SEVERITY = eINSTANCE.getLogPattern_Severity(); + + /** + * The meta object literal for the 'Path' attribute feature. + * + * + * @generated + */ + EAttribute LOG_PATTERN__PATH = eINSTANCE.getLogPattern_Path(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.logs.LogLevel Log Level}' enum. + * + * + * @see org.openecomp.ncomp.core.logs.LogLevel + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogLevel() + * @generated + */ + EEnum LOG_LEVEL = eINSTANCE.getLogLevel(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.logs.LogSeverity Log Severity}' enum. + * + * + * @see org.openecomp.ncomp.core.logs.LogSeverity + * @see org.openecomp.ncomp.core.logs.impl.LogsPackageImpl#getLogSeverity() + * @generated + */ + EEnum LOG_SEVERITY = eINSTANCE.getLogSeverity(); + + } + +} //LogsPackage diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogConfigurationImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogConfigurationImpl.java new file mode 100644 index 0000000..4fb6661 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogConfigurationImpl.java @@ -0,0 +1,173 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs.impl; + +import org.openecomp.ncomp.core.logs.LogConfiguration; +import org.openecomp.ncomp.core.logs.LogFile; +import org.openecomp.ncomp.core.logs.LogsPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Log Configuration'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogConfigurationImpl#getFiles Files}
  • + *
+ *

+ * + * @generated + */ +public class LogConfigurationImpl extends MinimalEObjectImpl.Container implements LogConfiguration { + /** + * The cached value of the '{@link #getFiles() Files}' containment reference list. + * + * + * @see #getFiles() + * @generated + * @ordered + */ + protected EList files; + + /** + * + * + * @generated + */ + protected LogConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LogsPackage.Literals.LOG_CONFIGURATION; + } + + /** + * + * + * @generated + */ + public EList getFiles() { + if (files == null) { + files = new EObjectContainmentEList(LogFile.class, this, LogsPackage.LOG_CONFIGURATION__FILES); + } + return files; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case LogsPackage.LOG_CONFIGURATION__FILES: + return ((InternalEList)getFiles()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case LogsPackage.LOG_CONFIGURATION__FILES: + return getFiles(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case LogsPackage.LOG_CONFIGURATION__FILES: + getFiles().clear(); + getFiles().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case LogsPackage.LOG_CONFIGURATION__FILES: + getFiles().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case LogsPackage.LOG_CONFIGURATION__FILES: + return files != null && !files.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //LogConfigurationImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogFileImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogFileImpl.java new file mode 100644 index 0000000..cd27aaa --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogFileImpl.java @@ -0,0 +1,243 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs.impl; + +import org.openecomp.ncomp.core.logs.LogFile; +import org.openecomp.ncomp.core.logs.LogPattern; +import org.openecomp.ncomp.core.logs.LogsPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Log File'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogFileImpl#getFilename Filename}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogFileImpl#getPatterns Patterns}
  • + *
+ *

+ * + * @generated + */ +public class LogFileImpl extends MinimalEObjectImpl.Container implements LogFile { + /** + * The default value of the '{@link #getFilename() Filename}' attribute. + * + * + * @see #getFilename() + * @generated + * @ordered + */ + protected static final String FILENAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFilename() Filename}' attribute. + * + * + * @see #getFilename() + * @generated + * @ordered + */ + protected String filename = FILENAME_EDEFAULT; + + /** + * The cached value of the '{@link #getPatterns() Patterns}' containment reference list. + * + * + * @see #getPatterns() + * @generated + * @ordered + */ + protected EList patterns; + + /** + * + * + * @generated + */ + protected LogFileImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LogsPackage.Literals.LOG_FILE; + } + + /** + * + * + * @generated + */ + public String getFilename() { + return filename; + } + + /** + * + * + * @generated + */ + public void setFilename(String newFilename) { + String oldFilename = filename; + filename = newFilename; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_FILE__FILENAME, oldFilename, filename)); + } + + /** + * + * + * @generated + */ + public EList getPatterns() { + if (patterns == null) { + patterns = new EObjectContainmentEList(LogPattern.class, this, LogsPackage.LOG_FILE__PATTERNS); + } + return patterns; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case LogsPackage.LOG_FILE__PATTERNS: + return ((InternalEList)getPatterns()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case LogsPackage.LOG_FILE__FILENAME: + return getFilename(); + case LogsPackage.LOG_FILE__PATTERNS: + return getPatterns(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case LogsPackage.LOG_FILE__FILENAME: + setFilename((String)newValue); + return; + case LogsPackage.LOG_FILE__PATTERNS: + getPatterns().clear(); + getPatterns().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case LogsPackage.LOG_FILE__FILENAME: + setFilename(FILENAME_EDEFAULT); + return; + case LogsPackage.LOG_FILE__PATTERNS: + getPatterns().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case LogsPackage.LOG_FILE__FILENAME: + return FILENAME_EDEFAULT == null ? filename != null : !FILENAME_EDEFAULT.equals(filename); + case LogsPackage.LOG_FILE__PATTERNS: + return patterns != null && !patterns.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (filename: "); + result.append(filename); + result.append(')'); + return result.toString(); + } + +} //LogFileImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageCategoryImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageCategoryImpl.java new file mode 100644 index 0000000..3ab69ac --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageCategoryImpl.java @@ -0,0 +1,173 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs.impl; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.core.logs.LogMessageCategory; +import org.openecomp.ncomp.core.logs.LogMessageStats; +import org.openecomp.ncomp.core.logs.LogsPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Log Message Category'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageCategoryImpl#getStats Stats}
  • + *
+ *

+ * + * @generated + */ +public class LogMessageCategoryImpl extends NamedEntityImpl implements LogMessageCategory { + /** + * The cached value of the '{@link #getStats() Stats}' containment reference list. + * + * + * @see #getStats() + * @generated + * @ordered + */ + protected EList stats; + + /** + * + * + * @generated + */ + protected LogMessageCategoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LogsPackage.Literals.LOG_MESSAGE_CATEGORY; + } + + /** + * + * + * @generated + */ + public EList getStats() { + if (stats == null) { + stats = new EObjectContainmentEList(LogMessageStats.class, this, LogsPackage.LOG_MESSAGE_CATEGORY__STATS); + } + return stats; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_CATEGORY__STATS: + return ((InternalEList)getStats()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_CATEGORY__STATS: + return getStats(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_CATEGORY__STATS: + getStats().clear(); + getStats().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_CATEGORY__STATS: + getStats().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_CATEGORY__STATS: + return stats != null && !stats.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //LogMessageCategoryImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageContainerConfigurationImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageContainerConfigurationImpl.java new file mode 100644 index 0000000..4d5dfb4 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageContainerConfigurationImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs.impl; + +import org.openecomp.ncomp.core.logs.LogMessageContainerConfiguration; +import org.openecomp.ncomp.core.logs.LogsPackage; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Log Message Container Configuration'. + * + *

+ *

+ * + * @generated + */ +public class LogMessageContainerConfigurationImpl extends MinimalEObjectImpl.Container implements LogMessageContainerConfiguration { + /** + * + * + * @generated + */ + protected LogMessageContainerConfigurationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LogsPackage.Literals.LOG_MESSAGE_CONTAINER_CONFIGURATION; + } + +} //LogMessageContainerConfigurationImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageContainerImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageContainerImpl.java new file mode 100644 index 0000000..f7b9ad7 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageContainerImpl.java @@ -0,0 +1,279 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs.impl; + +import org.openecomp.ncomp.core.logs.LogMessageCategory; +import org.openecomp.ncomp.core.logs.LogMessageContainer; +import org.openecomp.ncomp.core.logs.LogMessageContainerConfiguration; +import org.openecomp.ncomp.core.logs.LogMessageStats; +import org.openecomp.ncomp.core.logs.LogsPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Log Message Container'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageContainerImpl#getLogMessageConfiguration Log Message Configuration}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageContainerImpl#getLogMessageCategories Log Message Categories}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageContainerImpl#getLogMessageStats Log Message Stats}
  • + *
+ *

+ * + * @generated + */ +public abstract class LogMessageContainerImpl extends MinimalEObjectImpl.Container implements LogMessageContainer { + /** + * The cached value of the '{@link #getLogMessageConfiguration() Log Message Configuration}' containment reference. + * + * + * @see #getLogMessageConfiguration() + * @generated + * @ordered + */ + protected LogMessageContainerConfiguration logMessageConfiguration; + + /** + * The cached value of the '{@link #getLogMessageCategories() Log Message Categories}' containment reference list. + * + * + * @see #getLogMessageCategories() + * @generated + * @ordered + */ + protected EList logMessageCategories; + + /** + * The cached value of the '{@link #getLogMessageStats() Log Message Stats}' containment reference list. + * + * + * @see #getLogMessageStats() + * @generated + * @ordered + */ + protected EList logMessageStats; + + /** + * + * + * @generated + */ + protected LogMessageContainerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LogsPackage.Literals.LOG_MESSAGE_CONTAINER; + } + + /** + * + * + * @generated + */ + public LogMessageContainerConfiguration getLogMessageConfiguration() { + return logMessageConfiguration; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetLogMessageConfiguration(LogMessageContainerConfiguration newLogMessageConfiguration, NotificationChain msgs) { + LogMessageContainerConfiguration oldLogMessageConfiguration = logMessageConfiguration; + logMessageConfiguration = newLogMessageConfiguration; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CONFIGURATION, oldLogMessageConfiguration, newLogMessageConfiguration); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setLogMessageConfiguration(LogMessageContainerConfiguration newLogMessageConfiguration) { + if (newLogMessageConfiguration != logMessageConfiguration) { + NotificationChain msgs = null; + if (logMessageConfiguration != null) + msgs = ((InternalEObject)logMessageConfiguration).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CONFIGURATION, null, msgs); + if (newLogMessageConfiguration != null) + msgs = ((InternalEObject)newLogMessageConfiguration).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CONFIGURATION, null, msgs); + msgs = basicSetLogMessageConfiguration(newLogMessageConfiguration, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CONFIGURATION, newLogMessageConfiguration, newLogMessageConfiguration)); + } + + /** + * + * + * @generated + */ + public EList getLogMessageCategories() { + if (logMessageCategories == null) { + logMessageCategories = new EObjectContainmentEList(LogMessageCategory.class, this, LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CATEGORIES); + } + return logMessageCategories; + } + + /** + * + * + * @generated + */ + public EList getLogMessageStats() { + if (logMessageStats == null) { + logMessageStats = new EObjectContainmentEList(LogMessageStats.class, this, LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_STATS); + } + return logMessageStats; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CONFIGURATION: + return basicSetLogMessageConfiguration(null, msgs); + case LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CATEGORIES: + return ((InternalEList)getLogMessageCategories()).basicRemove(otherEnd, msgs); + case LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_STATS: + return ((InternalEList)getLogMessageStats()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CONFIGURATION: + return getLogMessageConfiguration(); + case LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CATEGORIES: + return getLogMessageCategories(); + case LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_STATS: + return getLogMessageStats(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CONFIGURATION: + setLogMessageConfiguration((LogMessageContainerConfiguration)newValue); + return; + case LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CATEGORIES: + getLogMessageCategories().clear(); + getLogMessageCategories().addAll((Collection)newValue); + return; + case LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_STATS: + getLogMessageStats().clear(); + getLogMessageStats().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CONFIGURATION: + setLogMessageConfiguration((LogMessageContainerConfiguration)null); + return; + case LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CATEGORIES: + getLogMessageCategories().clear(); + return; + case LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_STATS: + getLogMessageStats().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CONFIGURATION: + return logMessageConfiguration != null; + case LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CATEGORIES: + return logMessageCategories != null && !logMessageCategories.isEmpty(); + case LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_STATS: + return logMessageStats != null && !logMessageStats.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //LogMessageContainerImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageImpl.java new file mode 100644 index 0000000..556c308 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageImpl.java @@ -0,0 +1,564 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs.impl; + +import org.openecomp.ncomp.core.logs.LogLevel; +import org.openecomp.ncomp.core.logs.LogMessage; +import org.openecomp.ncomp.core.logs.LogSeverity; +import org.openecomp.ncomp.core.logs.LogsPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Log Message'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageImpl#getTime Time}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageImpl#getResourceName Resource Name}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageImpl#getSeverity Severity}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageImpl#getLevel Level}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageImpl#getMessage Message}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageImpl#getCategory Category}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageImpl#getNumberOfSuppressed Number Of Suppressed}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageImpl#getSuppressedStartTime Suppressed Start Time}
  • + *
+ *

+ * + * @generated + */ +public class LogMessageImpl extends MinimalEObjectImpl.Container implements LogMessage { + /** + * The default value of the '{@link #getTime() Time}' attribute. + * + * + * @see #getTime() + * @generated + * @ordered + */ + protected static final long TIME_EDEFAULT = 0L; + + /** + * The cached value of the '{@link #getTime() Time}' attribute. + * + * + * @see #getTime() + * @generated + * @ordered + */ + protected long time = TIME_EDEFAULT; + + /** + * The default value of the '{@link #getResourceName() Resource Name}' attribute. + * + * + * @see #getResourceName() + * @generated + * @ordered + */ + protected static final String RESOURCE_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getResourceName() Resource Name}' attribute. + * + * + * @see #getResourceName() + * @generated + * @ordered + */ + protected String resourceName = RESOURCE_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getSeverity() Severity}' attribute. + * + * + * @see #getSeverity() + * @generated + * @ordered + */ + protected static final LogSeverity SEVERITY_EDEFAULT = LogSeverity.UNKNOWN; + + /** + * The cached value of the '{@link #getSeverity() Severity}' attribute. + * + * + * @see #getSeverity() + * @generated + * @ordered + */ + protected LogSeverity severity = SEVERITY_EDEFAULT; + + /** + * The default value of the '{@link #getLevel() Level}' attribute. + * + * + * @see #getLevel() + * @generated + * @ordered + */ + protected static final LogLevel LEVEL_EDEFAULT = LogLevel.UNKNOWN; + + /** + * The cached value of the '{@link #getLevel() Level}' attribute. + * + * + * @see #getLevel() + * @generated + * @ordered + */ + protected LogLevel level = LEVEL_EDEFAULT; + + /** + * The default value of the '{@link #getMessage() Message}' attribute. + * + * + * @see #getMessage() + * @generated + * @ordered + */ + protected static final String MESSAGE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMessage() Message}' attribute. + * + * + * @see #getMessage() + * @generated + * @ordered + */ + protected String message = MESSAGE_EDEFAULT; + + /** + * The default value of the '{@link #getCategory() Category}' attribute. + * + * + * @see #getCategory() + * @generated + * @ordered + */ + protected static final String CATEGORY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCategory() Category}' attribute. + * + * + * @see #getCategory() + * @generated + * @ordered + */ + protected String category = CATEGORY_EDEFAULT; + + /** + * The default value of the '{@link #getNumberOfSuppressed() Number Of Suppressed}' attribute. + * + * + * @see #getNumberOfSuppressed() + * @generated + * @ordered + */ + protected static final int NUMBER_OF_SUPPRESSED_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getNumberOfSuppressed() Number Of Suppressed}' attribute. + * + * + * @see #getNumberOfSuppressed() + * @generated + * @ordered + */ + protected int numberOfSuppressed = NUMBER_OF_SUPPRESSED_EDEFAULT; + + /** + * The default value of the '{@link #getSuppressedStartTime() Suppressed Start Time}' attribute. + * + * + * @see #getSuppressedStartTime() + * @generated + * @ordered + */ + protected static final Long SUPPRESSED_START_TIME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSuppressedStartTime() Suppressed Start Time}' attribute. + * + * + * @see #getSuppressedStartTime() + * @generated + * @ordered + */ + protected Long suppressedStartTime = SUPPRESSED_START_TIME_EDEFAULT; + + /** + * + * + * @generated + */ + protected LogMessageImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LogsPackage.Literals.LOG_MESSAGE; + } + + /** + * + * + * @generated + */ + public long getTime() { + return time; + } + + /** + * + * + * @generated + */ + public void setTime(long newTime) { + long oldTime = time; + time = newTime; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE__TIME, oldTime, time)); + } + + /** + * + * + * @generated + */ + public String getResourceName() { + return resourceName; + } + + /** + * + * + * @generated + */ + public void setResourceName(String newResourceName) { + String oldResourceName = resourceName; + resourceName = newResourceName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE__RESOURCE_NAME, oldResourceName, resourceName)); + } + + /** + * + * + * @generated + */ + public LogSeverity getSeverity() { + return severity; + } + + /** + * + * + * @generated + */ + public void setSeverity(LogSeverity newSeverity) { + LogSeverity oldSeverity = severity; + severity = newSeverity == null ? SEVERITY_EDEFAULT : newSeverity; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE__SEVERITY, oldSeverity, severity)); + } + + /** + * + * + * @generated + */ + public LogLevel getLevel() { + return level; + } + + /** + * + * + * @generated + */ + public void setLevel(LogLevel newLevel) { + LogLevel oldLevel = level; + level = newLevel == null ? LEVEL_EDEFAULT : newLevel; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE__LEVEL, oldLevel, level)); + } + + /** + * + * + * @generated + */ + public String getMessage() { + return message; + } + + /** + * + * + * @generated + */ + public void setMessage(String newMessage) { + String oldMessage = message; + message = newMessage; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE__MESSAGE, oldMessage, message)); + } + + /** + * + * + * @generated + */ + public String getCategory() { + return category; + } + + /** + * + * + * @generated + */ + public void setCategory(String newCategory) { + String oldCategory = category; + category = newCategory; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE__CATEGORY, oldCategory, category)); + } + + /** + * + * + * @generated + */ + public int getNumberOfSuppressed() { + return numberOfSuppressed; + } + + /** + * + * + * @generated + */ + public void setNumberOfSuppressed(int newNumberOfSuppressed) { + int oldNumberOfSuppressed = numberOfSuppressed; + numberOfSuppressed = newNumberOfSuppressed; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE__NUMBER_OF_SUPPRESSED, oldNumberOfSuppressed, numberOfSuppressed)); + } + + /** + * + * + * @generated + */ + public Long getSuppressedStartTime() { + return suppressedStartTime; + } + + /** + * + * + * @generated + */ + public void setSuppressedStartTime(Long newSuppressedStartTime) { + Long oldSuppressedStartTime = suppressedStartTime; + suppressedStartTime = newSuppressedStartTime; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE__SUPPRESSED_START_TIME, oldSuppressedStartTime, suppressedStartTime)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE__TIME: + return getTime(); + case LogsPackage.LOG_MESSAGE__RESOURCE_NAME: + return getResourceName(); + case LogsPackage.LOG_MESSAGE__SEVERITY: + return getSeverity(); + case LogsPackage.LOG_MESSAGE__LEVEL: + return getLevel(); + case LogsPackage.LOG_MESSAGE__MESSAGE: + return getMessage(); + case LogsPackage.LOG_MESSAGE__CATEGORY: + return getCategory(); + case LogsPackage.LOG_MESSAGE__NUMBER_OF_SUPPRESSED: + return getNumberOfSuppressed(); + case LogsPackage.LOG_MESSAGE__SUPPRESSED_START_TIME: + return getSuppressedStartTime(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE__TIME: + setTime((Long)newValue); + return; + case LogsPackage.LOG_MESSAGE__RESOURCE_NAME: + setResourceName((String)newValue); + return; + case LogsPackage.LOG_MESSAGE__SEVERITY: + setSeverity((LogSeverity)newValue); + return; + case LogsPackage.LOG_MESSAGE__LEVEL: + setLevel((LogLevel)newValue); + return; + case LogsPackage.LOG_MESSAGE__MESSAGE: + setMessage((String)newValue); + return; + case LogsPackage.LOG_MESSAGE__CATEGORY: + setCategory((String)newValue); + return; + case LogsPackage.LOG_MESSAGE__NUMBER_OF_SUPPRESSED: + setNumberOfSuppressed((Integer)newValue); + return; + case LogsPackage.LOG_MESSAGE__SUPPRESSED_START_TIME: + setSuppressedStartTime((Long)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE__TIME: + setTime(TIME_EDEFAULT); + return; + case LogsPackage.LOG_MESSAGE__RESOURCE_NAME: + setResourceName(RESOURCE_NAME_EDEFAULT); + return; + case LogsPackage.LOG_MESSAGE__SEVERITY: + setSeverity(SEVERITY_EDEFAULT); + return; + case LogsPackage.LOG_MESSAGE__LEVEL: + setLevel(LEVEL_EDEFAULT); + return; + case LogsPackage.LOG_MESSAGE__MESSAGE: + setMessage(MESSAGE_EDEFAULT); + return; + case LogsPackage.LOG_MESSAGE__CATEGORY: + setCategory(CATEGORY_EDEFAULT); + return; + case LogsPackage.LOG_MESSAGE__NUMBER_OF_SUPPRESSED: + setNumberOfSuppressed(NUMBER_OF_SUPPRESSED_EDEFAULT); + return; + case LogsPackage.LOG_MESSAGE__SUPPRESSED_START_TIME: + setSuppressedStartTime(SUPPRESSED_START_TIME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE__TIME: + return time != TIME_EDEFAULT; + case LogsPackage.LOG_MESSAGE__RESOURCE_NAME: + return RESOURCE_NAME_EDEFAULT == null ? resourceName != null : !RESOURCE_NAME_EDEFAULT.equals(resourceName); + case LogsPackage.LOG_MESSAGE__SEVERITY: + return severity != SEVERITY_EDEFAULT; + case LogsPackage.LOG_MESSAGE__LEVEL: + return level != LEVEL_EDEFAULT; + case LogsPackage.LOG_MESSAGE__MESSAGE: + return MESSAGE_EDEFAULT == null ? message != null : !MESSAGE_EDEFAULT.equals(message); + case LogsPackage.LOG_MESSAGE__CATEGORY: + return CATEGORY_EDEFAULT == null ? category != null : !CATEGORY_EDEFAULT.equals(category); + case LogsPackage.LOG_MESSAGE__NUMBER_OF_SUPPRESSED: + return numberOfSuppressed != NUMBER_OF_SUPPRESSED_EDEFAULT; + case LogsPackage.LOG_MESSAGE__SUPPRESSED_START_TIME: + return SUPPRESSED_START_TIME_EDEFAULT == null ? suppressedStartTime != null : !SUPPRESSED_START_TIME_EDEFAULT.equals(suppressedStartTime); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (time: "); + result.append(time); + result.append(", resourceName: "); + result.append(resourceName); + result.append(", severity: "); + result.append(severity); + result.append(", level: "); + result.append(level); + result.append(", message: "); + result.append(message); + result.append(", category: "); + result.append(category); + result.append(", numberOfSuppressed: "); + result.append(numberOfSuppressed); + result.append(", suppressedStartTime: "); + result.append(suppressedStartTime); + result.append(')'); + return result.toString(); + } + +} //LogMessageImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageRuleImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageRuleImpl.java new file mode 100644 index 0000000..2e53ffb --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageRuleImpl.java @@ -0,0 +1,682 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs.impl; + +import org.openecomp.ncomp.core.function.Function; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.core.logs.LogLevel; +import org.openecomp.ncomp.core.logs.LogMessageRule; +import org.openecomp.ncomp.core.logs.LogSeverity; +import org.openecomp.ncomp.core.logs.LogsPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Log Message Rule'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl#getDescription Description}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl#getMessageFilter Message Filter}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl#getResourcePathFilter Resource Path Filter}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl#getLevel Level}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl#getSeverity Severity}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl#getNewLevel New Level}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl#getNewSeverity New Severity}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl#getNewCategory New Category}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl#isDisabled Disabled}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl#getUpdateFunction Update Function}
  • + *
+ *

+ * + * @generated + */ +public class LogMessageRuleImpl extends NamedEntityImpl implements LogMessageRule { + /** + * The default value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() Description}' attribute. + * + * + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * The default value of the '{@link #getMessageFilter() Message Filter}' attribute. + * + * + * @see #getMessageFilter() + * @generated + * @ordered + */ + protected static final String MESSAGE_FILTER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMessageFilter() Message Filter}' attribute. + * + * + * @see #getMessageFilter() + * @generated + * @ordered + */ + protected String messageFilter = MESSAGE_FILTER_EDEFAULT; + + /** + * The default value of the '{@link #getResourcePathFilter() Resource Path Filter}' attribute. + * + * + * @see #getResourcePathFilter() + * @generated + * @ordered + */ + protected static final String RESOURCE_PATH_FILTER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getResourcePathFilter() Resource Path Filter}' attribute. + * + * + * @see #getResourcePathFilter() + * @generated + * @ordered + */ + protected String resourcePathFilter = RESOURCE_PATH_FILTER_EDEFAULT; + + /** + * The default value of the '{@link #getLevel() Level}' attribute. + * + * + * @see #getLevel() + * @generated + * @ordered + */ + protected static final LogLevel LEVEL_EDEFAULT = LogLevel.UNKNOWN; + + /** + * The cached value of the '{@link #getLevel() Level}' attribute. + * + * + * @see #getLevel() + * @generated + * @ordered + */ + protected LogLevel level = LEVEL_EDEFAULT; + + /** + * The default value of the '{@link #getSeverity() Severity}' attribute. + * + * + * @see #getSeverity() + * @generated + * @ordered + */ + protected static final LogSeverity SEVERITY_EDEFAULT = LogSeverity.UNKNOWN; + + /** + * The cached value of the '{@link #getSeverity() Severity}' attribute. + * + * + * @see #getSeverity() + * @generated + * @ordered + */ + protected LogSeverity severity = SEVERITY_EDEFAULT; + + /** + * The default value of the '{@link #getNewLevel() New Level}' attribute. + * + * + * @see #getNewLevel() + * @generated + * @ordered + */ + protected static final LogLevel NEW_LEVEL_EDEFAULT = LogLevel.UNKNOWN; + + /** + * The cached value of the '{@link #getNewLevel() New Level}' attribute. + * + * + * @see #getNewLevel() + * @generated + * @ordered + */ + protected LogLevel newLevel = NEW_LEVEL_EDEFAULT; + + /** + * The default value of the '{@link #getNewSeverity() New Severity}' attribute. + * + * + * @see #getNewSeverity() + * @generated + * @ordered + */ + protected static final LogSeverity NEW_SEVERITY_EDEFAULT = LogSeverity.UNKNOWN; + + /** + * The cached value of the '{@link #getNewSeverity() New Severity}' attribute. + * + * + * @see #getNewSeverity() + * @generated + * @ordered + */ + protected LogSeverity newSeverity = NEW_SEVERITY_EDEFAULT; + + /** + * The default value of the '{@link #getNewCategory() New Category}' attribute. + * + * + * @see #getNewCategory() + * @generated + * @ordered + */ + protected static final String NEW_CATEGORY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNewCategory() New Category}' attribute. + * + * + * @see #getNewCategory() + * @generated + * @ordered + */ + protected String newCategory = NEW_CATEGORY_EDEFAULT; + + /** + * The default value of the '{@link #isDisabled() Disabled}' attribute. + * + * + * @see #isDisabled() + * @generated + * @ordered + */ + protected static final boolean DISABLED_EDEFAULT = false; + + /** + * The cached value of the '{@link #isDisabled() Disabled}' attribute. + * + * + * @see #isDisabled() + * @generated + * @ordered + */ + protected boolean disabled = DISABLED_EDEFAULT; + + /** + * The cached value of the '{@link #getUpdateFunction() Update Function}' reference. + * + * + * @see #getUpdateFunction() + * @generated + * @ordered + */ + protected Function updateFunction; + + /** + * + * + * @generated + */ + protected LogMessageRuleImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LogsPackage.Literals.LOG_MESSAGE_RULE; + } + + /** + * + * + * @generated + */ + public String getDescription() { + return description; + } + + /** + * + * + * @generated + */ + public void setDescription(String newDescription) { + String oldDescription = description; + description = newDescription; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE_RULE__DESCRIPTION, oldDescription, description)); + } + + /** + * + * + * @generated + */ + public String getMessageFilter() { + return messageFilter; + } + + /** + * + * + * @generated + */ + public void setMessageFilter(String newMessageFilter) { + String oldMessageFilter = messageFilter; + messageFilter = newMessageFilter; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE_RULE__MESSAGE_FILTER, oldMessageFilter, messageFilter)); + } + + /** + * + * + * @generated + */ + public String getResourcePathFilter() { + return resourcePathFilter; + } + + /** + * + * + * @generated + */ + public void setResourcePathFilter(String newResourcePathFilter) { + String oldResourcePathFilter = resourcePathFilter; + resourcePathFilter = newResourcePathFilter; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE_RULE__RESOURCE_PATH_FILTER, oldResourcePathFilter, resourcePathFilter)); + } + + /** + * + * + * @generated + */ + public LogLevel getLevel() { + return level; + } + + /** + * + * + * @generated + */ + public void setLevel(LogLevel newLevel) { + LogLevel oldLevel = level; + level = newLevel == null ? LEVEL_EDEFAULT : newLevel; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE_RULE__LEVEL, oldLevel, level)); + } + + /** + * + * + * @generated + */ + public LogSeverity getSeverity() { + return severity; + } + + /** + * + * + * @generated + */ + public void setSeverity(LogSeverity newSeverity) { + LogSeverity oldSeverity = severity; + severity = newSeverity == null ? SEVERITY_EDEFAULT : newSeverity; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE_RULE__SEVERITY, oldSeverity, severity)); + } + + /** + * + * + * @generated + */ + public LogLevel getNewLevel() { + return newLevel; + } + + /** + * + * + * @generated + */ + public void setNewLevel(LogLevel newNewLevel) { + LogLevel oldNewLevel = newLevel; + newLevel = newNewLevel == null ? NEW_LEVEL_EDEFAULT : newNewLevel; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE_RULE__NEW_LEVEL, oldNewLevel, newLevel)); + } + + /** + * + * + * @generated + */ + public LogSeverity getNewSeverity() { + return newSeverity; + } + + /** + * + * + * @generated + */ + public void setNewSeverity(LogSeverity newNewSeverity) { + LogSeverity oldNewSeverity = newSeverity; + newSeverity = newNewSeverity == null ? NEW_SEVERITY_EDEFAULT : newNewSeverity; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE_RULE__NEW_SEVERITY, oldNewSeverity, newSeverity)); + } + + /** + * + * + * @generated + */ + public String getNewCategory() { + return newCategory; + } + + /** + * + * + * @generated + */ + public void setNewCategory(String newNewCategory) { + String oldNewCategory = newCategory; + newCategory = newNewCategory; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE_RULE__NEW_CATEGORY, oldNewCategory, newCategory)); + } + + /** + * + * + * @generated + */ + public boolean isDisabled() { + return disabled; + } + + /** + * + * + * @generated + */ + public void setDisabled(boolean newDisabled) { + boolean oldDisabled = disabled; + disabled = newDisabled; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE_RULE__DISABLED, oldDisabled, disabled)); + } + + /** + * + * + * @generated + */ + public Function getUpdateFunction() { + if (updateFunction != null && updateFunction.eIsProxy()) { + InternalEObject oldUpdateFunction = (InternalEObject)updateFunction; + updateFunction = (Function)eResolveProxy(oldUpdateFunction); + if (updateFunction != oldUpdateFunction) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, LogsPackage.LOG_MESSAGE_RULE__UPDATE_FUNCTION, oldUpdateFunction, updateFunction)); + } + } + return updateFunction; + } + + /** + * + * + * @generated + */ + public Function basicGetUpdateFunction() { + return updateFunction; + } + + /** + * + * + * @generated + */ + public void setUpdateFunction(Function newUpdateFunction) { + Function oldUpdateFunction = updateFunction; + updateFunction = newUpdateFunction; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE_RULE__UPDATE_FUNCTION, oldUpdateFunction, updateFunction)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_RULE__DESCRIPTION: + return getDescription(); + case LogsPackage.LOG_MESSAGE_RULE__MESSAGE_FILTER: + return getMessageFilter(); + case LogsPackage.LOG_MESSAGE_RULE__RESOURCE_PATH_FILTER: + return getResourcePathFilter(); + case LogsPackage.LOG_MESSAGE_RULE__LEVEL: + return getLevel(); + case LogsPackage.LOG_MESSAGE_RULE__SEVERITY: + return getSeverity(); + case LogsPackage.LOG_MESSAGE_RULE__NEW_LEVEL: + return getNewLevel(); + case LogsPackage.LOG_MESSAGE_RULE__NEW_SEVERITY: + return getNewSeverity(); + case LogsPackage.LOG_MESSAGE_RULE__NEW_CATEGORY: + return getNewCategory(); + case LogsPackage.LOG_MESSAGE_RULE__DISABLED: + return isDisabled(); + case LogsPackage.LOG_MESSAGE_RULE__UPDATE_FUNCTION: + if (resolve) return getUpdateFunction(); + return basicGetUpdateFunction(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_RULE__DESCRIPTION: + setDescription((String)newValue); + return; + case LogsPackage.LOG_MESSAGE_RULE__MESSAGE_FILTER: + setMessageFilter((String)newValue); + return; + case LogsPackage.LOG_MESSAGE_RULE__RESOURCE_PATH_FILTER: + setResourcePathFilter((String)newValue); + return; + case LogsPackage.LOG_MESSAGE_RULE__LEVEL: + setLevel((LogLevel)newValue); + return; + case LogsPackage.LOG_MESSAGE_RULE__SEVERITY: + setSeverity((LogSeverity)newValue); + return; + case LogsPackage.LOG_MESSAGE_RULE__NEW_LEVEL: + setNewLevel((LogLevel)newValue); + return; + case LogsPackage.LOG_MESSAGE_RULE__NEW_SEVERITY: + setNewSeverity((LogSeverity)newValue); + return; + case LogsPackage.LOG_MESSAGE_RULE__NEW_CATEGORY: + setNewCategory((String)newValue); + return; + case LogsPackage.LOG_MESSAGE_RULE__DISABLED: + setDisabled((Boolean)newValue); + return; + case LogsPackage.LOG_MESSAGE_RULE__UPDATE_FUNCTION: + setUpdateFunction((Function)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_RULE__DESCRIPTION: + setDescription(DESCRIPTION_EDEFAULT); + return; + case LogsPackage.LOG_MESSAGE_RULE__MESSAGE_FILTER: + setMessageFilter(MESSAGE_FILTER_EDEFAULT); + return; + case LogsPackage.LOG_MESSAGE_RULE__RESOURCE_PATH_FILTER: + setResourcePathFilter(RESOURCE_PATH_FILTER_EDEFAULT); + return; + case LogsPackage.LOG_MESSAGE_RULE__LEVEL: + setLevel(LEVEL_EDEFAULT); + return; + case LogsPackage.LOG_MESSAGE_RULE__SEVERITY: + setSeverity(SEVERITY_EDEFAULT); + return; + case LogsPackage.LOG_MESSAGE_RULE__NEW_LEVEL: + setNewLevel(NEW_LEVEL_EDEFAULT); + return; + case LogsPackage.LOG_MESSAGE_RULE__NEW_SEVERITY: + setNewSeverity(NEW_SEVERITY_EDEFAULT); + return; + case LogsPackage.LOG_MESSAGE_RULE__NEW_CATEGORY: + setNewCategory(NEW_CATEGORY_EDEFAULT); + return; + case LogsPackage.LOG_MESSAGE_RULE__DISABLED: + setDisabled(DISABLED_EDEFAULT); + return; + case LogsPackage.LOG_MESSAGE_RULE__UPDATE_FUNCTION: + setUpdateFunction((Function)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_RULE__DESCRIPTION: + return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description); + case LogsPackage.LOG_MESSAGE_RULE__MESSAGE_FILTER: + return MESSAGE_FILTER_EDEFAULT == null ? messageFilter != null : !MESSAGE_FILTER_EDEFAULT.equals(messageFilter); + case LogsPackage.LOG_MESSAGE_RULE__RESOURCE_PATH_FILTER: + return RESOURCE_PATH_FILTER_EDEFAULT == null ? resourcePathFilter != null : !RESOURCE_PATH_FILTER_EDEFAULT.equals(resourcePathFilter); + case LogsPackage.LOG_MESSAGE_RULE__LEVEL: + return level != LEVEL_EDEFAULT; + case LogsPackage.LOG_MESSAGE_RULE__SEVERITY: + return severity != SEVERITY_EDEFAULT; + case LogsPackage.LOG_MESSAGE_RULE__NEW_LEVEL: + return newLevel != NEW_LEVEL_EDEFAULT; + case LogsPackage.LOG_MESSAGE_RULE__NEW_SEVERITY: + return newSeverity != NEW_SEVERITY_EDEFAULT; + case LogsPackage.LOG_MESSAGE_RULE__NEW_CATEGORY: + return NEW_CATEGORY_EDEFAULT == null ? newCategory != null : !NEW_CATEGORY_EDEFAULT.equals(newCategory); + case LogsPackage.LOG_MESSAGE_RULE__DISABLED: + return disabled != DISABLED_EDEFAULT; + case LogsPackage.LOG_MESSAGE_RULE__UPDATE_FUNCTION: + return updateFunction != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (description: "); + result.append(description); + result.append(", messageFilter: "); + result.append(messageFilter); + result.append(", resourcePathFilter: "); + result.append(resourcePathFilter); + result.append(", level: "); + result.append(level); + result.append(", severity: "); + result.append(severity); + result.append(", newLevel: "); + result.append(newLevel); + result.append(", newSeverity: "); + result.append(newSeverity); + result.append(", newCategory: "); + result.append(newCategory); + result.append(", disabled: "); + result.append(disabled); + result.append(')'); + return result.toString(); + } + +} //LogMessageRuleImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageStateImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageStateImpl.java new file mode 100644 index 0000000..420f804 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageStateImpl.java @@ -0,0 +1,307 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs.impl; + +import org.openecomp.ncomp.core.logs.LogMessage; +import org.openecomp.ncomp.core.logs.LogMessageCategory; +import org.openecomp.ncomp.core.logs.LogMessageState; +import org.openecomp.ncomp.core.logs.LogsPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Log Message State'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageStateImpl#isSuspended Suspended}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageStateImpl#getLog Log}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageStateImpl#getCategory Category}
  • + *
+ *

+ * + * @generated + */ +public class LogMessageStateImpl extends MinimalEObjectImpl.Container implements LogMessageState { + /** + * The default value of the '{@link #isSuspended() Suspended}' attribute. + * + * + * @see #isSuspended() + * @generated + * @ordered + */ + protected static final boolean SUSPENDED_EDEFAULT = false; + + /** + * The cached value of the '{@link #isSuspended() Suspended}' attribute. + * + * + * @see #isSuspended() + * @generated + * @ordered + */ + protected boolean suspended = SUSPENDED_EDEFAULT; + + /** + * The cached value of the '{@link #getLog() Log}' reference. + * + * + * @see #getLog() + * @generated + * @ordered + */ + protected LogMessage log; + + /** + * The cached value of the '{@link #getCategory() Category}' reference. + * + * + * @see #getCategory() + * @generated + * @ordered + */ + protected LogMessageCategory category; + + /** + * + * + * @generated + */ + protected LogMessageStateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LogsPackage.Literals.LOG_MESSAGE_STATE; + } + + /** + * + * + * @generated + */ + public boolean isSuspended() { + return suspended; + } + + /** + * + * + * @generated + */ + public void setSuspended(boolean newSuspended) { + boolean oldSuspended = suspended; + suspended = newSuspended; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE_STATE__SUSPENDED, oldSuspended, suspended)); + } + + /** + * + * + * @generated + */ + public LogMessage getLog() { + if (log != null && log.eIsProxy()) { + InternalEObject oldLog = (InternalEObject)log; + log = (LogMessage)eResolveProxy(oldLog); + if (log != oldLog) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, LogsPackage.LOG_MESSAGE_STATE__LOG, oldLog, log)); + } + } + return log; + } + + /** + * + * + * @generated + */ + public LogMessage basicGetLog() { + return log; + } + + /** + * + * + * @generated + */ + public void setLog(LogMessage newLog) { + LogMessage oldLog = log; + log = newLog; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE_STATE__LOG, oldLog, log)); + } + + /** + * + * + * @generated + */ + public LogMessageCategory getCategory() { + if (category != null && category.eIsProxy()) { + InternalEObject oldCategory = (InternalEObject)category; + category = (LogMessageCategory)eResolveProxy(oldCategory); + if (category != oldCategory) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, LogsPackage.LOG_MESSAGE_STATE__CATEGORY, oldCategory, category)); + } + } + return category; + } + + /** + * + * + * @generated + */ + public LogMessageCategory basicGetCategory() { + return category; + } + + /** + * + * + * @generated + */ + public void setCategory(LogMessageCategory newCategory) { + LogMessageCategory oldCategory = category; + category = newCategory; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE_STATE__CATEGORY, oldCategory, category)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_STATE__SUSPENDED: + return isSuspended(); + case LogsPackage.LOG_MESSAGE_STATE__LOG: + if (resolve) return getLog(); + return basicGetLog(); + case LogsPackage.LOG_MESSAGE_STATE__CATEGORY: + if (resolve) return getCategory(); + return basicGetCategory(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_STATE__SUSPENDED: + setSuspended((Boolean)newValue); + return; + case LogsPackage.LOG_MESSAGE_STATE__LOG: + setLog((LogMessage)newValue); + return; + case LogsPackage.LOG_MESSAGE_STATE__CATEGORY: + setCategory((LogMessageCategory)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_STATE__SUSPENDED: + setSuspended(SUSPENDED_EDEFAULT); + return; + case LogsPackage.LOG_MESSAGE_STATE__LOG: + setLog((LogMessage)null); + return; + case LogsPackage.LOG_MESSAGE_STATE__CATEGORY: + setCategory((LogMessageCategory)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_STATE__SUSPENDED: + return suspended != SUSPENDED_EDEFAULT; + case LogsPackage.LOG_MESSAGE_STATE__LOG: + return log != null; + case LogsPackage.LOG_MESSAGE_STATE__CATEGORY: + return category != null; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (suspended: "); + result.append(suspended); + result.append(')'); + return result.toString(); + } + +} //LogMessageStateImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageStatsImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageStatsImpl.java new file mode 100644 index 0000000..a20a01e --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogMessageStatsImpl.java @@ -0,0 +1,292 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs.impl; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; +import org.openecomp.ncomp.core.logs.LogLevel; +import org.openecomp.ncomp.core.logs.LogMessageStats; +import org.openecomp.ncomp.core.logs.LogSeverity; +import org.openecomp.ncomp.core.logs.LogsPackage; +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Log Message Stats'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageStatsImpl#getLevel Level}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageStatsImpl#getSeverity Severity}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogMessageStatsImpl#getCount Count}
  • + *
+ *

+ * + * @generated + */ +public class LogMessageStatsImpl extends NamedEntityImpl implements LogMessageStats { + /** + * The default value of the '{@link #getLevel() Level}' attribute. + * + * + * @see #getLevel() + * @generated + * @ordered + */ + protected static final LogLevel LEVEL_EDEFAULT = LogLevel.UNKNOWN; + + /** + * The cached value of the '{@link #getLevel() Level}' attribute. + * + * + * @see #getLevel() + * @generated + * @ordered + */ + protected LogLevel level = LEVEL_EDEFAULT; + + /** + * The default value of the '{@link #getSeverity() Severity}' attribute. + * + * + * @see #getSeverity() + * @generated + * @ordered + */ + protected static final LogSeverity SEVERITY_EDEFAULT = LogSeverity.UNKNOWN; + + /** + * The cached value of the '{@link #getSeverity() Severity}' attribute. + * + * + * @see #getSeverity() + * @generated + * @ordered + */ + protected LogSeverity severity = SEVERITY_EDEFAULT; + + /** + * The default value of the '{@link #getCount() Count}' attribute. + * + * + * @see #getCount() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute COUNT_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCount() Count}' attribute. + * + * + * @see #getCount() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute count = COUNT_EDEFAULT; + + /** + * + * + * @generated + */ + protected LogMessageStatsImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LogsPackage.Literals.LOG_MESSAGE_STATS; + } + + /** + * + * + * @generated + */ + public LogLevel getLevel() { + return level; + } + + /** + * + * + * @generated + */ + public void setLevel(LogLevel newLevel) { + LogLevel oldLevel = level; + level = newLevel == null ? LEVEL_EDEFAULT : newLevel; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE_STATS__LEVEL, oldLevel, level)); + } + + /** + * + * + * @generated + */ + public LogSeverity getSeverity() { + return severity; + } + + /** + * + * + * @generated + */ + public void setSeverity(LogSeverity newSeverity) { + LogSeverity oldSeverity = severity; + severity = newSeverity == null ? SEVERITY_EDEFAULT : newSeverity; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE_STATS__SEVERITY, oldSeverity, severity)); + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getCount() { + return count; + } + + /** + * + * + * @generated + */ + public void setCount(IncreasingULongMetricAttribute newCount) { + IncreasingULongMetricAttribute oldCount = count; + count = newCount; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_MESSAGE_STATS__COUNT, oldCount, count)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_STATS__LEVEL: + return getLevel(); + case LogsPackage.LOG_MESSAGE_STATS__SEVERITY: + return getSeverity(); + case LogsPackage.LOG_MESSAGE_STATS__COUNT: + return getCount(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_STATS__LEVEL: + setLevel((LogLevel)newValue); + return; + case LogsPackage.LOG_MESSAGE_STATS__SEVERITY: + setSeverity((LogSeverity)newValue); + return; + case LogsPackage.LOG_MESSAGE_STATS__COUNT: + setCount((IncreasingULongMetricAttribute)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_STATS__LEVEL: + setLevel(LEVEL_EDEFAULT); + return; + case LogsPackage.LOG_MESSAGE_STATS__SEVERITY: + setSeverity(SEVERITY_EDEFAULT); + return; + case LogsPackage.LOG_MESSAGE_STATS__COUNT: + setCount(COUNT_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_STATS__LEVEL: + return level != LEVEL_EDEFAULT; + case LogsPackage.LOG_MESSAGE_STATS__SEVERITY: + return severity != SEVERITY_EDEFAULT; + case LogsPackage.LOG_MESSAGE_STATS__COUNT: + return COUNT_EDEFAULT == null ? count != null : !COUNT_EDEFAULT.equals(count); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (level: "); + result.append(level); + result.append(", severity: "); + result.append(severity); + result.append(", count: "); + result.append(count); + result.append(')'); + return result.toString(); + } + +} //LogMessageStatsImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogPatternImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogPatternImpl.java new file mode 100644 index 0000000..84607d4 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogPatternImpl.java @@ -0,0 +1,400 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs.impl; + +import org.openecomp.ncomp.core.logs.LogPattern; +import org.openecomp.ncomp.core.logs.LogsPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Log Pattern'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogPatternImpl#getPattern Pattern}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogPatternImpl#getMessage Message}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogPatternImpl#getLevel Level}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogPatternImpl#getSeverity Severity}
  • + *
  • {@link org.openecomp.ncomp.core.logs.impl.LogPatternImpl#getPath Path}
  • + *
+ *

+ * + * @generated + */ +public class LogPatternImpl extends MinimalEObjectImpl.Container implements LogPattern { + /** + * The default value of the '{@link #getPattern() Pattern}' attribute. + * + * + * @see #getPattern() + * @generated + * @ordered + */ + protected static final String PATTERN_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPattern() Pattern}' attribute. + * + * + * @see #getPattern() + * @generated + * @ordered + */ + protected String pattern = PATTERN_EDEFAULT; + + /** + * The default value of the '{@link #getMessage() Message}' attribute. + * + * + * @see #getMessage() + * @generated + * @ordered + */ + protected static final String MESSAGE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMessage() Message}' attribute. + * + * + * @see #getMessage() + * @generated + * @ordered + */ + protected String message = MESSAGE_EDEFAULT; + + /** + * The default value of the '{@link #getLevel() Level}' attribute. + * + * + * @see #getLevel() + * @generated + * @ordered + */ + protected static final String LEVEL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLevel() Level}' attribute. + * + * + * @see #getLevel() + * @generated + * @ordered + */ + protected String level = LEVEL_EDEFAULT; + + /** + * The default value of the '{@link #getSeverity() Severity}' attribute. + * + * + * @see #getSeverity() + * @generated + * @ordered + */ + protected static final String SEVERITY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSeverity() Severity}' attribute. + * + * + * @see #getSeverity() + * @generated + * @ordered + */ + protected String severity = SEVERITY_EDEFAULT; + + /** + * The default value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected static final String PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPath() Path}' attribute. + * + * + * @see #getPath() + * @generated + * @ordered + */ + protected String path = PATH_EDEFAULT; + + /** + * + * + * @generated + */ + protected LogPatternImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return LogsPackage.Literals.LOG_PATTERN; + } + + /** + * + * + * @generated + */ + public String getPattern() { + return pattern; + } + + /** + * + * + * @generated + */ + public void setPattern(String newPattern) { + String oldPattern = pattern; + pattern = newPattern; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_PATTERN__PATTERN, oldPattern, pattern)); + } + + /** + * + * + * @generated + */ + public String getMessage() { + return message; + } + + /** + * + * + * @generated + */ + public void setMessage(String newMessage) { + String oldMessage = message; + message = newMessage; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_PATTERN__MESSAGE, oldMessage, message)); + } + + /** + * + * + * @generated + */ + public String getLevel() { + return level; + } + + /** + * + * + * @generated + */ + public void setLevel(String newLevel) { + String oldLevel = level; + level = newLevel; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_PATTERN__LEVEL, oldLevel, level)); + } + + /** + * + * + * @generated + */ + public String getSeverity() { + return severity; + } + + /** + * + * + * @generated + */ + public void setSeverity(String newSeverity) { + String oldSeverity = severity; + severity = newSeverity; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_PATTERN__SEVERITY, oldSeverity, severity)); + } + + /** + * + * + * @generated + */ + public String getPath() { + return path; + } + + /** + * + * + * @generated + */ + public void setPath(String newPath) { + String oldPath = path; + path = newPath; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, LogsPackage.LOG_PATTERN__PATH, oldPath, path)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case LogsPackage.LOG_PATTERN__PATTERN: + return getPattern(); + case LogsPackage.LOG_PATTERN__MESSAGE: + return getMessage(); + case LogsPackage.LOG_PATTERN__LEVEL: + return getLevel(); + case LogsPackage.LOG_PATTERN__SEVERITY: + return getSeverity(); + case LogsPackage.LOG_PATTERN__PATH: + return getPath(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case LogsPackage.LOG_PATTERN__PATTERN: + setPattern((String)newValue); + return; + case LogsPackage.LOG_PATTERN__MESSAGE: + setMessage((String)newValue); + return; + case LogsPackage.LOG_PATTERN__LEVEL: + setLevel((String)newValue); + return; + case LogsPackage.LOG_PATTERN__SEVERITY: + setSeverity((String)newValue); + return; + case LogsPackage.LOG_PATTERN__PATH: + setPath((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case LogsPackage.LOG_PATTERN__PATTERN: + setPattern(PATTERN_EDEFAULT); + return; + case LogsPackage.LOG_PATTERN__MESSAGE: + setMessage(MESSAGE_EDEFAULT); + return; + case LogsPackage.LOG_PATTERN__LEVEL: + setLevel(LEVEL_EDEFAULT); + return; + case LogsPackage.LOG_PATTERN__SEVERITY: + setSeverity(SEVERITY_EDEFAULT); + return; + case LogsPackage.LOG_PATTERN__PATH: + setPath(PATH_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case LogsPackage.LOG_PATTERN__PATTERN: + return PATTERN_EDEFAULT == null ? pattern != null : !PATTERN_EDEFAULT.equals(pattern); + case LogsPackage.LOG_PATTERN__MESSAGE: + return MESSAGE_EDEFAULT == null ? message != null : !MESSAGE_EDEFAULT.equals(message); + case LogsPackage.LOG_PATTERN__LEVEL: + return LEVEL_EDEFAULT == null ? level != null : !LEVEL_EDEFAULT.equals(level); + case LogsPackage.LOG_PATTERN__SEVERITY: + return SEVERITY_EDEFAULT == null ? severity != null : !SEVERITY_EDEFAULT.equals(severity); + case LogsPackage.LOG_PATTERN__PATH: + return PATH_EDEFAULT == null ? path != null : !PATH_EDEFAULT.equals(path); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (pattern: "); + result.append(pattern); + result.append(", message: "); + result.append(message); + result.append(", level: "); + result.append(level); + result.append(", severity: "); + result.append(severity); + result.append(", path: "); + result.append(path); + result.append(')'); + return result.toString(); + } + +} //LogPatternImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogsFactoryImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogsFactoryImpl.java new file mode 100644 index 0000000..1916800 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogsFactoryImpl.java @@ -0,0 +1,279 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs.impl; + +import org.openecomp.ncomp.core.logs.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class LogsFactoryImpl extends EFactoryImpl implements LogsFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static LogsFactory init() { + try { + LogsFactory theLogsFactory = (LogsFactory)EPackage.Registry.INSTANCE.getEFactory(LogsPackage.eNS_URI); + if (theLogsFactory != null) { + return theLogsFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new LogsFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public LogsFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case LogsPackage.LOG_MESSAGE: return createLogMessage(); + case LogsPackage.LOG_MESSAGE_RULE: return createLogMessageRule(); + case LogsPackage.LOG_MESSAGE_CONTAINER_CONFIGURATION: return createLogMessageContainerConfiguration(); + case LogsPackage.LOG_MESSAGE_CATEGORY: return createLogMessageCategory(); + case LogsPackage.LOG_MESSAGE_STATS: return createLogMessageStats(); + case LogsPackage.LOG_MESSAGE_STATE: return createLogMessageState(); + case LogsPackage.LOG_CONFIGURATION: return createLogConfiguration(); + case LogsPackage.LOG_FILE: return createLogFile(); + case LogsPackage.LOG_PATTERN: return createLogPattern(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case LogsPackage.LOG_LEVEL: + return createLogLevelFromString(eDataType, initialValue); + case LogsPackage.LOG_SEVERITY: + return createLogSeverityFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case LogsPackage.LOG_LEVEL: + return convertLogLevelToString(eDataType, instanceValue); + case LogsPackage.LOG_SEVERITY: + return convertLogSeverityToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public LogMessage createLogMessage() { + LogMessageImpl logMessage = new LogMessageImpl(); + return logMessage; + } + + /** + * + * + * @generated + */ + public LogMessageRule createLogMessageRule() { + LogMessageRuleImpl logMessageRule = new LogMessageRuleImpl(); + return logMessageRule; + } + + /** + * + * + * @generated + */ + public LogMessageContainerConfiguration createLogMessageContainerConfiguration() { + LogMessageContainerConfigurationImpl logMessageContainerConfiguration = new LogMessageContainerConfigurationImpl(); + return logMessageContainerConfiguration; + } + + /** + * + * + * @generated + */ + public LogMessageCategory createLogMessageCategory() { + LogMessageCategoryImpl logMessageCategory = new LogMessageCategoryImpl(); + return logMessageCategory; + } + + /** + * + * + * @generated + */ + public LogMessageStats createLogMessageStats() { + LogMessageStatsImpl logMessageStats = new LogMessageStatsImpl(); + return logMessageStats; + } + + /** + * + * + * @generated + */ + public LogMessageState createLogMessageState() { + LogMessageStateImpl logMessageState = new LogMessageStateImpl(); + return logMessageState; + } + + /** + * + * + * @generated + */ + public LogConfiguration createLogConfiguration() { + LogConfigurationImpl logConfiguration = new LogConfigurationImpl(); + return logConfiguration; + } + + /** + * + * + * @generated + */ + public LogFile createLogFile() { + LogFileImpl logFile = new LogFileImpl(); + return logFile; + } + + /** + * + * + * @generated + */ + public LogPattern createLogPattern() { + LogPatternImpl logPattern = new LogPatternImpl(); + return logPattern; + } + + /** + * + * + * @generated + */ + public LogLevel createLogLevelFromString(EDataType eDataType, String initialValue) { + LogLevel result = LogLevel.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertLogLevelToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public LogSeverity createLogSeverityFromString(EDataType eDataType, String initialValue) { + LogSeverity result = LogSeverity.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertLogSeverityToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public LogsPackage getLogsPackage() { + return (LogsPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static LogsPackage getPackage() { + return LogsPackage.eINSTANCE; + } + +} //LogsFactoryImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogsPackageImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogsPackageImpl.java new file mode 100644 index 0000000..e6b9261 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/impl/LogsPackageImpl.java @@ -0,0 +1,845 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs.impl; + +import org.openecomp.ncomp.core.CorePackage; + +import org.openecomp.ncomp.core.function.FunctionPackage; + +import org.openecomp.ncomp.core.logs.LogConfiguration; +import org.openecomp.ncomp.core.logs.LogFile; +import org.openecomp.ncomp.core.logs.LogLevel; +import org.openecomp.ncomp.core.logs.LogMessage; +import org.openecomp.ncomp.core.logs.LogMessageCategory; +import org.openecomp.ncomp.core.logs.LogMessageContainer; +import org.openecomp.ncomp.core.logs.LogMessageContainerConfiguration; +import org.openecomp.ncomp.core.logs.LogMessageRule; +import org.openecomp.ncomp.core.logs.LogMessageState; +import org.openecomp.ncomp.core.logs.LogMessageStats; +import org.openecomp.ncomp.core.logs.LogPattern; +import org.openecomp.ncomp.core.logs.LogSeverity; +import org.openecomp.ncomp.core.logs.LogsFactory; +import org.openecomp.ncomp.core.logs.LogsPackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class LogsPackageImpl extends EPackageImpl implements LogsPackage { + /** + * + * + * @generated + */ + private EClass logMessageEClass = null; + + /** + * + * + * @generated + */ + private EClass logMessageRuleEClass = null; + + /** + * + * + * @generated + */ + private EClass logMessageContainerEClass = null; + + /** + * + * + * @generated + */ + private EClass logMessageContainerConfigurationEClass = null; + + /** + * + * + * @generated + */ + private EClass logMessageCategoryEClass = null; + + /** + * + * + * @generated + */ + private EClass logMessageStatsEClass = null; + + /** + * + * + * @generated + */ + private EClass logMessageStateEClass = null; + + /** + * + * + * @generated + */ + private EClass logConfigurationEClass = null; + + /** + * + * + * @generated + */ + private EClass logFileEClass = null; + + /** + * + * + * @generated + */ + private EClass logPatternEClass = null; + + /** + * + * + * @generated + */ + private EEnum logLevelEEnum = null; + + /** + * + * + * @generated + */ + private EEnum logSeverityEEnum = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.ncomp.core.logs.LogsPackage#eNS_URI + * @see #init() + * @generated + */ + private LogsPackageImpl() { + super(eNS_URI, LogsFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link LogsPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static LogsPackage init() { + if (isInited) return (LogsPackage)EPackage.Registry.INSTANCE.getEPackage(LogsPackage.eNS_URI); + + // Obtain or create and register package + LogsPackageImpl theLogsPackage = (LogsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof LogsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new LogsPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + FunctionPackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theLogsPackage.createPackageContents(); + + // Initialize created meta-data + theLogsPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theLogsPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(LogsPackage.eNS_URI, theLogsPackage); + return theLogsPackage; + } + + /** + * + * + * @generated + */ + public EClass getLogMessage() { + return logMessageEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getLogMessage_Time() { + return (EAttribute)logMessageEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getLogMessage_ResourceName() { + return (EAttribute)logMessageEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getLogMessage_Severity() { + return (EAttribute)logMessageEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getLogMessage_Level() { + return (EAttribute)logMessageEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getLogMessage_Message() { + return (EAttribute)logMessageEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getLogMessage_Category() { + return (EAttribute)logMessageEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getLogMessage_NumberOfSuppressed() { + return (EAttribute)logMessageEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EAttribute getLogMessage_SuppressedStartTime() { + return (EAttribute)logMessageEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EClass getLogMessageRule() { + return logMessageRuleEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getLogMessageRule_Description() { + return (EAttribute)logMessageRuleEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getLogMessageRule_MessageFilter() { + return (EAttribute)logMessageRuleEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getLogMessageRule_ResourcePathFilter() { + return (EAttribute)logMessageRuleEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getLogMessageRule_Level() { + return (EAttribute)logMessageRuleEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getLogMessageRule_Severity() { + return (EAttribute)logMessageRuleEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EAttribute getLogMessageRule_NewLevel() { + return (EAttribute)logMessageRuleEClass.getEStructuralFeatures().get(5); + } + + /** + * + * + * @generated + */ + public EAttribute getLogMessageRule_NewSeverity() { + return (EAttribute)logMessageRuleEClass.getEStructuralFeatures().get(6); + } + + /** + * + * + * @generated + */ + public EAttribute getLogMessageRule_NewCategory() { + return (EAttribute)logMessageRuleEClass.getEStructuralFeatures().get(7); + } + + /** + * + * + * @generated + */ + public EAttribute getLogMessageRule_Disabled() { + return (EAttribute)logMessageRuleEClass.getEStructuralFeatures().get(8); + } + + /** + * + * + * @generated + */ + public EReference getLogMessageRule_UpdateFunction() { + return (EReference)logMessageRuleEClass.getEStructuralFeatures().get(9); + } + + /** + * + * + * @generated + */ + public EClass getLogMessageContainer() { + return logMessageContainerEClass; + } + + /** + * + * + * @generated + */ + public EReference getLogMessageContainer_LogMessageConfiguration() { + return (EReference)logMessageContainerEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getLogMessageContainer_LogMessageCategories() { + return (EReference)logMessageContainerEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getLogMessageContainer_LogMessageStats() { + return (EReference)logMessageContainerEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getLogMessageContainerConfiguration() { + return logMessageContainerConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EClass getLogMessageCategory() { + return logMessageCategoryEClass; + } + + /** + * + * + * @generated + */ + public EReference getLogMessageCategory_Stats() { + return (EReference)logMessageCategoryEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getLogMessageStats() { + return logMessageStatsEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getLogMessageStats_Level() { + return (EAttribute)logMessageStatsEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getLogMessageStats_Severity() { + return (EAttribute)logMessageStatsEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getLogMessageStats_Count() { + return (EAttribute)logMessageStatsEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getLogMessageState() { + return logMessageStateEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getLogMessageState_Suspended() { + return (EAttribute)logMessageStateEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getLogMessageState_Log() { + return (EReference)logMessageStateEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getLogMessageState_Category() { + return (EReference)logMessageStateEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getLogConfiguration() { + return logConfigurationEClass; + } + + /** + * + * + * @generated + */ + public EReference getLogConfiguration_Files() { + return (EReference)logConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getLogFile() { + return logFileEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getLogFile_Filename() { + return (EAttribute)logFileEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getLogFile_Patterns() { + return (EReference)logFileEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getLogPattern() { + return logPatternEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getLogPattern_Pattern() { + return (EAttribute)logPatternEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getLogPattern_Message() { + return (EAttribute)logPatternEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getLogPattern_Level() { + return (EAttribute)logPatternEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EAttribute getLogPattern_Severity() { + return (EAttribute)logPatternEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + public EAttribute getLogPattern_Path() { + return (EAttribute)logPatternEClass.getEStructuralFeatures().get(4); + } + + /** + * + * + * @generated + */ + public EEnum getLogLevel() { + return logLevelEEnum; + } + + /** + * + * + * @generated + */ + public EEnum getLogSeverity() { + return logSeverityEEnum; + } + + /** + * + * + * @generated + */ + public LogsFactory getLogsFactory() { + return (LogsFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + logMessageEClass = createEClass(LOG_MESSAGE); + createEAttribute(logMessageEClass, LOG_MESSAGE__TIME); + createEAttribute(logMessageEClass, LOG_MESSAGE__RESOURCE_NAME); + createEAttribute(logMessageEClass, LOG_MESSAGE__SEVERITY); + createEAttribute(logMessageEClass, LOG_MESSAGE__LEVEL); + createEAttribute(logMessageEClass, LOG_MESSAGE__MESSAGE); + createEAttribute(logMessageEClass, LOG_MESSAGE__CATEGORY); + createEAttribute(logMessageEClass, LOG_MESSAGE__NUMBER_OF_SUPPRESSED); + createEAttribute(logMessageEClass, LOG_MESSAGE__SUPPRESSED_START_TIME); + + logMessageRuleEClass = createEClass(LOG_MESSAGE_RULE); + createEAttribute(logMessageRuleEClass, LOG_MESSAGE_RULE__DESCRIPTION); + createEAttribute(logMessageRuleEClass, LOG_MESSAGE_RULE__MESSAGE_FILTER); + createEAttribute(logMessageRuleEClass, LOG_MESSAGE_RULE__RESOURCE_PATH_FILTER); + createEAttribute(logMessageRuleEClass, LOG_MESSAGE_RULE__LEVEL); + createEAttribute(logMessageRuleEClass, LOG_MESSAGE_RULE__SEVERITY); + createEAttribute(logMessageRuleEClass, LOG_MESSAGE_RULE__NEW_LEVEL); + createEAttribute(logMessageRuleEClass, LOG_MESSAGE_RULE__NEW_SEVERITY); + createEAttribute(logMessageRuleEClass, LOG_MESSAGE_RULE__NEW_CATEGORY); + createEAttribute(logMessageRuleEClass, LOG_MESSAGE_RULE__DISABLED); + createEReference(logMessageRuleEClass, LOG_MESSAGE_RULE__UPDATE_FUNCTION); + + logMessageContainerEClass = createEClass(LOG_MESSAGE_CONTAINER); + createEReference(logMessageContainerEClass, LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CONFIGURATION); + createEReference(logMessageContainerEClass, LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CATEGORIES); + createEReference(logMessageContainerEClass, LOG_MESSAGE_CONTAINER__LOG_MESSAGE_STATS); + + logMessageContainerConfigurationEClass = createEClass(LOG_MESSAGE_CONTAINER_CONFIGURATION); + + logMessageCategoryEClass = createEClass(LOG_MESSAGE_CATEGORY); + createEReference(logMessageCategoryEClass, LOG_MESSAGE_CATEGORY__STATS); + + logMessageStatsEClass = createEClass(LOG_MESSAGE_STATS); + createEAttribute(logMessageStatsEClass, LOG_MESSAGE_STATS__LEVEL); + createEAttribute(logMessageStatsEClass, LOG_MESSAGE_STATS__SEVERITY); + createEAttribute(logMessageStatsEClass, LOG_MESSAGE_STATS__COUNT); + + logMessageStateEClass = createEClass(LOG_MESSAGE_STATE); + createEAttribute(logMessageStateEClass, LOG_MESSAGE_STATE__SUSPENDED); + createEReference(logMessageStateEClass, LOG_MESSAGE_STATE__LOG); + createEReference(logMessageStateEClass, LOG_MESSAGE_STATE__CATEGORY); + + logConfigurationEClass = createEClass(LOG_CONFIGURATION); + createEReference(logConfigurationEClass, LOG_CONFIGURATION__FILES); + + logFileEClass = createEClass(LOG_FILE); + createEAttribute(logFileEClass, LOG_FILE__FILENAME); + createEReference(logFileEClass, LOG_FILE__PATTERNS); + + logPatternEClass = createEClass(LOG_PATTERN); + createEAttribute(logPatternEClass, LOG_PATTERN__PATTERN); + createEAttribute(logPatternEClass, LOG_PATTERN__MESSAGE); + createEAttribute(logPatternEClass, LOG_PATTERN__LEVEL); + createEAttribute(logPatternEClass, LOG_PATTERN__SEVERITY); + createEAttribute(logPatternEClass, LOG_PATTERN__PATH); + + // Create enums + logLevelEEnum = createEEnum(LOG_LEVEL); + logSeverityEEnum = createEEnum(LOG_SEVERITY); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + FunctionPackage theFunctionPackage = (FunctionPackage)EPackage.Registry.INSTANCE.getEPackage(FunctionPackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + logMessageRuleEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + logMessageCategoryEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + logMessageStatsEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + + // Initialize classes, features, and operations; add parameters + initEClass(logMessageEClass, LogMessage.class, "LogMessage", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLogMessage_Time(), theEcorePackage.getELong(), "time", null, 0, 1, LogMessage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogMessage_ResourceName(), theEcorePackage.getEString(), "resourceName", null, 0, 1, LogMessage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogMessage_Severity(), this.getLogSeverity(), "severity", null, 0, 1, LogMessage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogMessage_Level(), this.getLogLevel(), "level", null, 0, 1, LogMessage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogMessage_Message(), theEcorePackage.getEString(), "message", null, 0, 1, LogMessage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogMessage_Category(), theEcorePackage.getEString(), "category", null, 0, 1, LogMessage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogMessage_NumberOfSuppressed(), theEcorePackage.getEInt(), "numberOfSuppressed", "0", 0, 1, LogMessage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogMessage_SuppressedStartTime(), theEcorePackage.getELongObject(), "suppressedStartTime", null, 0, 1, LogMessage.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(logMessageRuleEClass, LogMessageRule.class, "LogMessageRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLogMessageRule_Description(), theEcorePackage.getEString(), "description", null, 0, 1, LogMessageRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogMessageRule_MessageFilter(), theEcorePackage.getEString(), "messageFilter", null, 0, 1, LogMessageRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogMessageRule_ResourcePathFilter(), theEcorePackage.getEString(), "resourcePathFilter", null, 0, 1, LogMessageRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogMessageRule_Level(), this.getLogLevel(), "level", null, 0, 1, LogMessageRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogMessageRule_Severity(), this.getLogSeverity(), "severity", null, 0, 1, LogMessageRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogMessageRule_NewLevel(), this.getLogLevel(), "newLevel", null, 0, 1, LogMessageRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogMessageRule_NewSeverity(), this.getLogSeverity(), "newSeverity", null, 0, 1, LogMessageRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogMessageRule_NewCategory(), theEcorePackage.getEString(), "newCategory", null, 0, 1, LogMessageRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogMessageRule_Disabled(), theEcorePackage.getEBoolean(), "disabled", "false", 0, 1, LogMessageRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getLogMessageRule_UpdateFunction(), theFunctionPackage.getFunction(), null, "updateFunction", null, 0, 1, LogMessageRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(logMessageContainerEClass, LogMessageContainer.class, "LogMessageContainer", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getLogMessageContainer_LogMessageConfiguration(), this.getLogMessageContainerConfiguration(), null, "logMessageConfiguration", null, 0, 1, LogMessageContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getLogMessageContainer_LogMessageCategories(), this.getLogMessageCategory(), null, "logMessageCategories", null, 0, -1, LogMessageContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getLogMessageContainer_LogMessageStats(), this.getLogMessageStats(), null, "logMessageStats", null, 0, -1, LogMessageContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(logMessageContainerConfigurationEClass, LogMessageContainerConfiguration.class, "LogMessageContainerConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(logMessageCategoryEClass, LogMessageCategory.class, "LogMessageCategory", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getLogMessageCategory_Stats(), this.getLogMessageStats(), null, "stats", null, 0, -1, LogMessageCategory.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(logMessageStatsEClass, LogMessageStats.class, "LogMessageStats", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLogMessageStats_Level(), this.getLogLevel(), "level", null, 0, 1, LogMessageStats.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogMessageStats_Severity(), this.getLogSeverity(), "severity", null, 0, 1, LogMessageStats.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogMessageStats_Count(), theCorePackage.getIncreasingULongMetricAttribute(), "count", null, 0, 1, LogMessageStats.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(logMessageStateEClass, LogMessageState.class, "LogMessageState", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLogMessageState_Suspended(), theEcorePackage.getEBoolean(), "suspended", null, 0, 1, LogMessageState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getLogMessageState_Log(), this.getLogMessage(), null, "log", null, 0, 1, LogMessageState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getLogMessageState_Category(), this.getLogMessageCategory(), null, "category", null, 0, 1, LogMessageState.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(logConfigurationEClass, LogConfiguration.class, "LogConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getLogConfiguration_Files(), this.getLogFile(), null, "files", null, 0, -1, LogConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(logFileEClass, LogFile.class, "LogFile", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLogFile_Filename(), theEcorePackage.getEString(), "filename", null, 0, 1, LogFile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getLogFile_Patterns(), this.getLogPattern(), null, "patterns", null, 0, -1, LogFile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(logPatternEClass, LogPattern.class, "LogPattern", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLogPattern_Pattern(), theEcorePackage.getEString(), "pattern", null, 0, 1, LogPattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogPattern_Message(), theEcorePackage.getEString(), "message", null, 0, 1, LogPattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogPattern_Level(), theEcorePackage.getEString(), "level", null, 0, 1, LogPattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogPattern_Severity(), theEcorePackage.getEString(), "severity", null, 0, 1, LogPattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLogPattern_Path(), theEcorePackage.getEString(), "path", null, 0, 1, LogPattern.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(logLevelEEnum, LogLevel.class, "LogLevel"); + addEEnumLiteral(logLevelEEnum, LogLevel.UNKNOWN); + addEEnumLiteral(logLevelEEnum, LogLevel.TRACE); + addEEnumLiteral(logLevelEEnum, LogLevel.DEBUG); + addEEnumLiteral(logLevelEEnum, LogLevel.INFO); + addEEnumLiteral(logLevelEEnum, LogLevel.WARN); + addEEnumLiteral(logLevelEEnum, LogLevel.ERROR); + addEEnumLiteral(logLevelEEnum, LogLevel.FATAL); + + initEEnum(logSeverityEEnum, LogSeverity.class, "LogSeverity"); + addEEnumLiteral(logSeverityEEnum, LogSeverity.UNKNOWN); + addEEnumLiteral(logSeverityEEnum, LogSeverity.SEV1); + addEEnumLiteral(logSeverityEEnum, LogSeverity.SEV2); + addEEnumLiteral(logSeverityEEnum, LogSeverity.SEV3); + addEEnumLiteral(logSeverityEEnum, LogSeverity.SEV4); + + // Create resource + createResource(eNS_URI); + } + +} //LogsPackageImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/util/LogsAdapterFactory.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/util/LogsAdapterFactory.java new file mode 100644 index 0000000..5b8d1fb --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/util/LogsAdapterFactory.java @@ -0,0 +1,323 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs.util; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.logs.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.ncomp.core.logs.LogsPackage + * @generated + */ +public class LogsAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static LogsPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public LogsAdapterFactory() { + if (modelPackage == null) { + modelPackage = LogsPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected LogsSwitch modelSwitch = + new LogsSwitch() { + @Override + public Adapter caseLogMessage(LogMessage object) { + return createLogMessageAdapter(); + } + @Override + public Adapter caseLogMessageRule(LogMessageRule object) { + return createLogMessageRuleAdapter(); + } + @Override + public Adapter caseLogMessageContainer(LogMessageContainer object) { + return createLogMessageContainerAdapter(); + } + @Override + public Adapter caseLogMessageContainerConfiguration(LogMessageContainerConfiguration object) { + return createLogMessageContainerConfigurationAdapter(); + } + @Override + public Adapter caseLogMessageCategory(LogMessageCategory object) { + return createLogMessageCategoryAdapter(); + } + @Override + public Adapter caseLogMessageStats(LogMessageStats object) { + return createLogMessageStatsAdapter(); + } + @Override + public Adapter caseLogMessageState(LogMessageState object) { + return createLogMessageStateAdapter(); + } + @Override + public Adapter caseLogConfiguration(LogConfiguration object) { + return createLogConfigurationAdapter(); + } + @Override + public Adapter caseLogFile(LogFile object) { + return createLogFileAdapter(); + } + @Override + public Adapter caseLogPattern(LogPattern object) { + return createLogPatternAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.logs.LogMessage Log Message}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.logs.LogMessage + * @generated + */ + public Adapter createLogMessageAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.logs.LogMessageRule Log Message Rule}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.logs.LogMessageRule + * @generated + */ + public Adapter createLogMessageRuleAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.logs.LogMessageContainer Log Message Container}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.logs.LogMessageContainer + * @generated + */ + public Adapter createLogMessageContainerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.logs.LogMessageContainerConfiguration Log Message Container Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.logs.LogMessageContainerConfiguration + * @generated + */ + public Adapter createLogMessageContainerConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.logs.LogMessageCategory Log Message Category}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.logs.LogMessageCategory + * @generated + */ + public Adapter createLogMessageCategoryAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.logs.LogMessageStats Log Message Stats}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.logs.LogMessageStats + * @generated + */ + public Adapter createLogMessageStatsAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.logs.LogMessageState Log Message State}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.logs.LogMessageState + * @generated + */ + public Adapter createLogMessageStateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.logs.LogConfiguration Log Configuration}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.logs.LogConfiguration + * @generated + */ + public Adapter createLogConfigurationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.logs.LogFile Log File}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.logs.LogFile + * @generated + */ + public Adapter createLogFileAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.logs.LogPattern Log Pattern}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.logs.LogPattern + * @generated + */ + public Adapter createLogPatternAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //LogsAdapterFactory diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/util/LogsSwitch.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/util/LogsSwitch.java new file mode 100644 index 0000000..2e1d369 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/logs/util/LogsSwitch.java @@ -0,0 +1,340 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.logs.util; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.logs.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.ncomp.core.logs.LogsPackage + * @generated + */ +public class LogsSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static LogsPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public LogsSwitch() { + if (modelPackage == null) { + modelPackage = LogsPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case LogsPackage.LOG_MESSAGE: { + LogMessage logMessage = (LogMessage)theEObject; + T result = caseLogMessage(logMessage); + if (result == null) result = defaultCase(theEObject); + return result; + } + case LogsPackage.LOG_MESSAGE_RULE: { + LogMessageRule logMessageRule = (LogMessageRule)theEObject; + T result = caseLogMessageRule(logMessageRule); + if (result == null) result = caseNamedEntity(logMessageRule); + if (result == null) result = defaultCase(theEObject); + return result; + } + case LogsPackage.LOG_MESSAGE_CONTAINER: { + LogMessageContainer logMessageContainer = (LogMessageContainer)theEObject; + T result = caseLogMessageContainer(logMessageContainer); + if (result == null) result = defaultCase(theEObject); + return result; + } + case LogsPackage.LOG_MESSAGE_CONTAINER_CONFIGURATION: { + LogMessageContainerConfiguration logMessageContainerConfiguration = (LogMessageContainerConfiguration)theEObject; + T result = caseLogMessageContainerConfiguration(logMessageContainerConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case LogsPackage.LOG_MESSAGE_CATEGORY: { + LogMessageCategory logMessageCategory = (LogMessageCategory)theEObject; + T result = caseLogMessageCategory(logMessageCategory); + if (result == null) result = caseNamedEntity(logMessageCategory); + if (result == null) result = defaultCase(theEObject); + return result; + } + case LogsPackage.LOG_MESSAGE_STATS: { + LogMessageStats logMessageStats = (LogMessageStats)theEObject; + T result = caseLogMessageStats(logMessageStats); + if (result == null) result = caseNamedEntity(logMessageStats); + if (result == null) result = defaultCase(theEObject); + return result; + } + case LogsPackage.LOG_MESSAGE_STATE: { + LogMessageState logMessageState = (LogMessageState)theEObject; + T result = caseLogMessageState(logMessageState); + if (result == null) result = defaultCase(theEObject); + return result; + } + case LogsPackage.LOG_CONFIGURATION: { + LogConfiguration logConfiguration = (LogConfiguration)theEObject; + T result = caseLogConfiguration(logConfiguration); + if (result == null) result = defaultCase(theEObject); + return result; + } + case LogsPackage.LOG_FILE: { + LogFile logFile = (LogFile)theEObject; + T result = caseLogFile(logFile); + if (result == null) result = defaultCase(theEObject); + return result; + } + case LogsPackage.LOG_PATTERN: { + LogPattern logPattern = (LogPattern)theEObject; + T result = caseLogPattern(logPattern); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Log Message'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Log Message'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLogMessage(LogMessage object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Log Message Rule'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Log Message Rule'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLogMessageRule(LogMessageRule object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Log Message Container'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Log Message Container'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLogMessageContainer(LogMessageContainer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Log Message Container Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Log Message Container Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLogMessageContainerConfiguration(LogMessageContainerConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Log Message Category'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Log Message Category'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLogMessageCategory(LogMessageCategory object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Log Message Stats'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Log Message Stats'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLogMessageStats(LogMessageStats object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Log Message State'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Log Message State'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLogMessageState(LogMessageState object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Log Configuration'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Log Configuration'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLogConfiguration(LogConfiguration object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Log File'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Log File'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLogFile(LogFile object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Log Pattern'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Log Pattern'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLogPattern(LogPattern object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //LogsSwitch diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/AggregationMetricValueOption.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/AggregationMetricValueOption.java new file mode 100644 index 0000000..02c074d --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/AggregationMetricValueOption.java @@ -0,0 +1,100 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics; + + +/** + * + * A representation of the model object 'Aggregation Metric Value Option'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.metrics.AggregationMetricValueOption#getDuration Duration}
  • + *
  • {@link org.openecomp.ncomp.core.metrics.AggregationMetricValueOption#getAggregationType Aggregation Type}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getAggregationMetricValueOption() + * @model + * @generated + */ +public interface AggregationMetricValueOption extends MetricValueOption { + /** + * Returns the value of the 'Duration' attribute. + * + *

+ * If the meaning of the 'Duration' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Duration' attribute. + * @see #setDuration(String) + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getAggregationMetricValueOption_Duration() + * @model unique="false" + * @generated + */ + String getDuration(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.metrics.AggregationMetricValueOption#getDuration Duration}' attribute. + * + * + * @param value the new value of the 'Duration' attribute. + * @see #getDuration() + * @generated + */ + void setDuration(String value); + + /** + * Returns the value of the 'Aggregation Type' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.metrics.AggregationMetricValueOptionType}. + * + *

+ * If the meaning of the 'Aggregation Type' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Aggregation Type' attribute. + * @see org.openecomp.ncomp.core.metrics.AggregationMetricValueOptionType + * @see #setAggregationType(AggregationMetricValueOptionType) + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getAggregationMetricValueOption_AggregationType() + * @model unique="false" + * @generated + */ + AggregationMetricValueOptionType getAggregationType(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.metrics.AggregationMetricValueOption#getAggregationType Aggregation Type}' attribute. + * + * + * @param value the new value of the 'Aggregation Type' attribute. + * @see org.openecomp.ncomp.core.metrics.AggregationMetricValueOptionType + * @see #getAggregationType() + * @generated + */ + void setAggregationType(AggregationMetricValueOptionType value); + +} // AggregationMetricValueOption diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/AggregationMetricValueOptionType.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/AggregationMetricValueOptionType.java new file mode 100644 index 0000000..6f83e1d --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/AggregationMetricValueOptionType.java @@ -0,0 +1,306 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Aggregation Metric Value Option Type', + * and utility methods for working with them. + * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getAggregationMetricValueOptionType() + * @model + * @generated + */ +public enum AggregationMetricValueOptionType implements Enumerator { + /** + * The 'SUM' literal object. + * + * + * @see #SUM_VALUE + * @generated + * @ordered + */ + SUM(0, "SUM", "SUM"), + + /** + * The 'AVERAGE' literal object. + * + * + * @see #AVERAGE_VALUE + * @generated + * @ordered + */ + AVERAGE(0, "AVERAGE", "AVERAGE"), + + /** + * The 'COUNT' literal object. + * + * + * @see #COUNT_VALUE + * @generated + * @ordered + */ + COUNT(0, "COUNT", "COUNT"), + + /** + * The 'MAX' literal object. + * + * + * @see #MAX_VALUE + * @generated + * @ordered + */ + MAX(0, "MAX", "MAX"), + + /** + * The 'MIN' literal object. + * + * + * @see #MIN_VALUE + * @generated + * @ordered + */ + MIN(0, "MIN", "MIN"); + + /** + * The 'SUM' literal value. + * + *

+ * If the meaning of 'SUM' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #SUM + * @model + * @generated + * @ordered + */ + public static final int SUM_VALUE = 0; + + /** + * The 'AVERAGE' literal value. + * + *

+ * If the meaning of 'AVERAGE' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #AVERAGE + * @model + * @generated + * @ordered + */ + public static final int AVERAGE_VALUE = 0; + + /** + * The 'COUNT' literal value. + * + *

+ * If the meaning of 'COUNT' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #COUNT + * @model + * @generated + * @ordered + */ + public static final int COUNT_VALUE = 0; + + /** + * The 'MAX' literal value. + * + *

+ * If the meaning of 'MAX' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #MAX + * @model + * @generated + * @ordered + */ + public static final int MAX_VALUE = 0; + + /** + * The 'MIN' literal value. + * + *

+ * If the meaning of 'MIN' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #MIN + * @model + * @generated + * @ordered + */ + public static final int MIN_VALUE = 0; + + /** + * An array of all the 'Aggregation Metric Value Option Type' enumerators. + * + * + * @generated + */ + private static final AggregationMetricValueOptionType[] VALUES_ARRAY = + new AggregationMetricValueOptionType[] { + SUM, + AVERAGE, + COUNT, + MAX, + MIN, + }; + + /** + * A public read-only list of all the 'Aggregation Metric Value Option Type' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Aggregation Metric Value Option Type' literal with the specified literal value. + * + * + * @generated + */ + public static AggregationMetricValueOptionType get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + AggregationMetricValueOptionType result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Aggregation Metric Value Option Type' literal with the specified name. + * + * + * @generated + */ + public static AggregationMetricValueOptionType getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + AggregationMetricValueOptionType result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Aggregation Metric Value Option Type' literal with the specified integer value. + * + * + * @generated + */ + public static AggregationMetricValueOptionType get(int value) { + switch (value) { + case SUM_VALUE: return SUM; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private AggregationMetricValueOptionType(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //AggregationMetricValueOptionType diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicDoubleMetric.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicDoubleMetric.java new file mode 100644 index 0000000..037249e --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicDoubleMetric.java @@ -0,0 +1,71 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics; + +import org.openecomp.ncomp.core.types.metrics.DoubleMetricAttribute; + +/** + * + * A representation of the model object 'Basic Double Metric'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.metrics.BasicDoubleMetric#getValue Value}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getBasicDoubleMetric() + * @model + * @generated + */ +public interface BasicDoubleMetric extends BasicMetric { + /** + * Returns the value of the 'Value' attribute. + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(DoubleMetricAttribute) + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getBasicDoubleMetric_Value() + * @model unique="false" dataType="org.openecomp.ncomp.core.DoubleMetricAttribute" transient="true" + * @generated + */ + DoubleMetricAttribute getValue(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.metrics.BasicDoubleMetric#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(DoubleMetricAttribute value); + +} // BasicDoubleMetric diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicIncreasingULongMetric.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicIncreasingULongMetric.java new file mode 100644 index 0000000..644c808 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicIncreasingULongMetric.java @@ -0,0 +1,71 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics; + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +/** + * + * A representation of the model object 'Basic Increasing ULong Metric'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.metrics.BasicIncreasingULongMetric#getValue Value}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getBasicIncreasingULongMetric() + * @model + * @generated + */ +public interface BasicIncreasingULongMetric extends BasicMetric { + /** + * Returns the value of the 'Value' attribute. + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(IncreasingULongMetricAttribute) + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getBasicIncreasingULongMetric_Value() + * @model unique="false" dataType="org.openecomp.ncomp.core.IncreasingULongMetricAttribute" transient="true" + * @generated + */ + IncreasingULongMetricAttribute getValue(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.metrics.BasicIncreasingULongMetric#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(IncreasingULongMetricAttribute value); + +} // BasicIncreasingULongMetric diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicLongMetric.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicLongMetric.java new file mode 100644 index 0000000..9d1718a --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicLongMetric.java @@ -0,0 +1,71 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics; + +import org.openecomp.ncomp.core.types.metrics.LongMetricAttribute; + +/** + * + * A representation of the model object 'Basic Long Metric'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.metrics.BasicLongMetric#getValue Value}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getBasicLongMetric() + * @model + * @generated + */ +public interface BasicLongMetric extends BasicMetric { + /** + * Returns the value of the 'Value' attribute. + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(LongMetricAttribute) + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getBasicLongMetric_Value() + * @model unique="false" dataType="org.openecomp.ncomp.core.LongMetricAttribute" transient="true" + * @generated + */ + LongMetricAttribute getValue(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.metrics.BasicLongMetric#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(LongMetricAttribute value); + +} // BasicLongMetric diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicMetric.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicMetric.java new file mode 100644 index 0000000..5a6674d --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicMetric.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Basic Metric'. + * + * + * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getBasicMetric() + * @model abstract="true" + * @generated + */ +public interface BasicMetric extends NamedEntity { +} // BasicMetric diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicMetricValueOption.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicMetricValueOption.java new file mode 100644 index 0000000..71f62ed --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicMetricValueOption.java @@ -0,0 +1,38 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics; + + +/** + * + * A representation of the model object 'Basic Metric Value Option'. + * + * + * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getBasicMetricValueOption() + * @model + * @generated + */ +public interface BasicMetricValueOption extends MetricValueOption { +} // BasicMetricValueOption diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicMetrics.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicMetrics.java new file mode 100644 index 0000000..7216ecc --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/BasicMetrics.java @@ -0,0 +1,61 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Basic Metrics'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.metrics.BasicMetrics#getMetrics Metrics}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getBasicMetrics() + * @model + * @generated + */ +public interface BasicMetrics extends MetricsContainer { + /** + * Returns the value of the 'Metrics' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.metrics.BasicMetric}. + * + *

+ * If the meaning of the 'Metrics' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Metrics' containment reference list. + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getBasicMetrics_Metrics() + * @model containment="true" + * @generated + */ + EList getMetrics(); + +} // BasicMetrics diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/DoubleMetric.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/DoubleMetric.java new file mode 100644 index 0000000..5941283 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/DoubleMetric.java @@ -0,0 +1,70 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics; + + +/** + * + * A representation of the model object 'Double Metric'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.metrics.DoubleMetric#getValue Value}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getDoubleMetric() + * @model + * @generated + */ +public interface DoubleMetric extends Metric { + /** + * Returns the value of the 'Value' attribute. + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(double) + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getDoubleMetric_Value() + * @model unique="false" + * @generated + */ + double getValue(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.metrics.DoubleMetric#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(double value); + +} // DoubleMetric diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/LongMetric.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/LongMetric.java new file mode 100644 index 0000000..4150224 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/LongMetric.java @@ -0,0 +1,126 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics; + + +/** + * + * A representation of the model object 'Long Metric'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.metrics.LongMetric#isIncreasing Increasing}
  • + *
  • {@link org.openecomp.ncomp.core.metrics.LongMetric#isDelta Delta}
  • + *
  • {@link org.openecomp.ncomp.core.metrics.LongMetric#getValue Value}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getLongMetric() + * @model + * @generated + */ +public interface LongMetric extends Metric { + /** + * Returns the value of the 'Increasing' attribute. + * The default value is "false". + * + *

+ * If the meaning of the 'Increasing' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Increasing' attribute. + * @see #setIncreasing(boolean) + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getLongMetric_Increasing() + * @model default="false" unique="false" + * @generated + */ + boolean isIncreasing(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.metrics.LongMetric#isIncreasing Increasing}' attribute. + * + * + * @param value the new value of the 'Increasing' attribute. + * @see #isIncreasing() + * @generated + */ + void setIncreasing(boolean value); + + /** + * Returns the value of the 'Delta' attribute. + * The default value is "false". + * + *

+ * If the meaning of the 'Delta' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Delta' attribute. + * @see #setDelta(boolean) + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getLongMetric_Delta() + * @model default="false" unique="false" + * @generated + */ + boolean isDelta(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.metrics.LongMetric#isDelta Delta}' attribute. + * + * + * @param value the new value of the 'Delta' attribute. + * @see #isDelta() + * @generated + */ + void setDelta(boolean value); + + /** + * Returns the value of the 'Value' attribute. + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(long) + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getLongMetric_Value() + * @model unique="false" + * @generated + */ + long getValue(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.metrics.LongMetric#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(long value); + +} // LongMetric diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/Metric.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/Metric.java new file mode 100644 index 0000000..2997236 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/Metric.java @@ -0,0 +1,125 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Metric'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.metrics.Metric#getTime Time}
  • + *
  • {@link org.openecomp.ncomp.core.metrics.Metric#getResourceName Resource Name}
  • + *
  • {@link org.openecomp.ncomp.core.metrics.Metric#getMetricName Metric Name}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getMetric() + * @model abstract="true" + * @generated + */ +public interface Metric extends EObject { + /** + * Returns the value of the 'Time' attribute. + * + *

+ * If the meaning of the 'Time' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Time' attribute. + * @see #setTime(long) + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getMetric_Time() + * @model unique="false" + * @generated + */ + long getTime(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.metrics.Metric#getTime Time}' attribute. + * + * + * @param value the new value of the 'Time' attribute. + * @see #getTime() + * @generated + */ + void setTime(long value); + + /** + * Returns the value of the 'Resource Name' attribute. + * + *

+ * If the meaning of the 'Resource Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Resource Name' attribute. + * @see #setResourceName(String) + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getMetric_ResourceName() + * @model unique="false" + * @generated + */ + String getResourceName(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.metrics.Metric#getResourceName Resource Name}' attribute. + * + * + * @param value the new value of the 'Resource Name' attribute. + * @see #getResourceName() + * @generated + */ + void setResourceName(String value); + + /** + * Returns the value of the 'Metric Name' attribute. + * + *

+ * If the meaning of the 'Metric Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Metric Name' attribute. + * @see #setMetricName(String) + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getMetric_MetricName() + * @model unique="false" + * @generated + */ + String getMetricName(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.metrics.Metric#getMetricName Metric Name}' attribute. + * + * + * @param value the new value of the 'Metric Name' attribute. + * @see #getMetricName() + * @generated + */ + void setMetricName(String value); + +} // Metric diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/MetricValueOption.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/MetricValueOption.java new file mode 100644 index 0000000..07b0938 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/MetricValueOption.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics; + +import org.openecomp.ncomp.core.NamedEntity; + +/** + * + * A representation of the model object 'Metric Value Option'. + * + * + * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getMetricValueOption() + * @model abstract="true" + * @generated + */ +public interface MetricValueOption extends NamedEntity { +} // MetricValueOption diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/MetricsContainer.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/MetricsContainer.java new file mode 100644 index 0000000..3087a2f --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/MetricsContainer.java @@ -0,0 +1,39 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Container'. + * + * + * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getMetricsContainer() + * @model abstract="true" + * @generated + */ +public interface MetricsContainer extends EObject { +} // MetricsContainer diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/MetricsFactory.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/MetricsFactory.java new file mode 100644 index 0000000..f1942dc --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/MetricsFactory.java @@ -0,0 +1,144 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage + * @generated + */ +public interface MetricsFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + MetricsFactory eINSTANCE = org.openecomp.ncomp.core.metrics.impl.MetricsFactoryImpl.init(); + + /** + * Returns a new object of class 'Double Metric'. + * + * + * @return a new object of class 'Double Metric'. + * @generated + */ + DoubleMetric createDoubleMetric(); + + /** + * Returns a new object of class 'Long Metric'. + * + * + * @return a new object of class 'Long Metric'. + * @generated + */ + LongMetric createLongMetric(); + + /** + * Returns a new object of class 'String Metric'. + * + * + * @return a new object of class 'String Metric'. + * @generated + */ + StringMetric createStringMetric(); + + /** + * Returns a new object of class 'Aggregation Metric Value Option'. + * + * + * @return a new object of class 'Aggregation Metric Value Option'. + * @generated + */ + AggregationMetricValueOption createAggregationMetricValueOption(); + + /** + * Returns a new object of class 'Basic Metric Value Option'. + * + * + * @return a new object of class 'Basic Metric Value Option'. + * @generated + */ + BasicMetricValueOption createBasicMetricValueOption(); + + /** + * Returns a new object of class 'Sequence Metric Value Option'. + * + * + * @return a new object of class 'Sequence Metric Value Option'. + * @generated + */ + SequenceMetricValueOption createSequenceMetricValueOption(); + + /** + * Returns a new object of class 'Basic Metrics'. + * + * + * @return a new object of class 'Basic Metrics'. + * @generated + */ + BasicMetrics createBasicMetrics(); + + /** + * Returns a new object of class 'Basic Increasing ULong Metric'. + * + * + * @return a new object of class 'Basic Increasing ULong Metric'. + * @generated + */ + BasicIncreasingULongMetric createBasicIncreasingULongMetric(); + + /** + * Returns a new object of class 'Basic Long Metric'. + * + * + * @return a new object of class 'Basic Long Metric'. + * @generated + */ + BasicLongMetric createBasicLongMetric(); + + /** + * Returns a new object of class 'Basic Double Metric'. + * + * + * @return a new object of class 'Basic Double Metric'. + * @generated + */ + BasicDoubleMetric createBasicDoubleMetric(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + MetricsPackage getMetricsPackage(); + +} //MetricsFactory diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/MetricsPackage.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/MetricsPackage.java new file mode 100644 index 0000000..091b5de --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/MetricsPackage.java @@ -0,0 +1,1601 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics; + +import org.openecomp.ncomp.core.CorePackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see org.openecomp.ncomp.core.metrics.MetricsFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/GenModel modelDirectory='/ncomp-core-model/src/main/xcore-gen' basePackage='org.openecomp.ncomp.core'" + * @generated + */ +public interface MetricsPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "metrics"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.core.metrics"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "metrics"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + MetricsPackage eINSTANCE = org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.metrics.impl.MetricImpl Metric}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.MetricImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getMetric() + * @generated + */ + int METRIC = 0; + + /** + * The feature id for the 'Time' attribute. + * + * + * @generated + * @ordered + */ + int METRIC__TIME = 0; + + /** + * The feature id for the 'Resource Name' attribute. + * + * + * @generated + * @ordered + */ + int METRIC__RESOURCE_NAME = 1; + + /** + * The feature id for the 'Metric Name' attribute. + * + * + * @generated + * @ordered + */ + int METRIC__METRIC_NAME = 2; + + /** + * The number of structural features of the 'Metric' class. + * + * + * @generated + * @ordered + */ + int METRIC_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Metric' class. + * + * + * @generated + * @ordered + */ + int METRIC_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.metrics.impl.DoubleMetricImpl Double Metric}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.DoubleMetricImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getDoubleMetric() + * @generated + */ + int DOUBLE_METRIC = 1; + + /** + * The feature id for the 'Time' attribute. + * + * + * @generated + * @ordered + */ + int DOUBLE_METRIC__TIME = METRIC__TIME; + + /** + * The feature id for the 'Resource Name' attribute. + * + * + * @generated + * @ordered + */ + int DOUBLE_METRIC__RESOURCE_NAME = METRIC__RESOURCE_NAME; + + /** + * The feature id for the 'Metric Name' attribute. + * + * + * @generated + * @ordered + */ + int DOUBLE_METRIC__METRIC_NAME = METRIC__METRIC_NAME; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int DOUBLE_METRIC__VALUE = METRIC_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Double Metric' class. + * + * + * @generated + * @ordered + */ + int DOUBLE_METRIC_FEATURE_COUNT = METRIC_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Double Metric' class. + * + * + * @generated + * @ordered + */ + int DOUBLE_METRIC_OPERATION_COUNT = METRIC_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.metrics.impl.LongMetricImpl Long Metric}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.LongMetricImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getLongMetric() + * @generated + */ + int LONG_METRIC = 2; + + /** + * The feature id for the 'Time' attribute. + * + * + * @generated + * @ordered + */ + int LONG_METRIC__TIME = METRIC__TIME; + + /** + * The feature id for the 'Resource Name' attribute. + * + * + * @generated + * @ordered + */ + int LONG_METRIC__RESOURCE_NAME = METRIC__RESOURCE_NAME; + + /** + * The feature id for the 'Metric Name' attribute. + * + * + * @generated + * @ordered + */ + int LONG_METRIC__METRIC_NAME = METRIC__METRIC_NAME; + + /** + * The feature id for the 'Increasing' attribute. + * + * + * @generated + * @ordered + */ + int LONG_METRIC__INCREASING = METRIC_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Delta' attribute. + * + * + * @generated + * @ordered + */ + int LONG_METRIC__DELTA = METRIC_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int LONG_METRIC__VALUE = METRIC_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Long Metric' class. + * + * + * @generated + * @ordered + */ + int LONG_METRIC_FEATURE_COUNT = METRIC_FEATURE_COUNT + 3; + + /** + * The number of operations of the 'Long Metric' class. + * + * + * @generated + * @ordered + */ + int LONG_METRIC_OPERATION_COUNT = METRIC_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.metrics.impl.StringMetricImpl String Metric}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.StringMetricImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getStringMetric() + * @generated + */ + int STRING_METRIC = 3; + + /** + * The feature id for the 'Time' attribute. + * + * + * @generated + * @ordered + */ + int STRING_METRIC__TIME = METRIC__TIME; + + /** + * The feature id for the 'Resource Name' attribute. + * + * + * @generated + * @ordered + */ + int STRING_METRIC__RESOURCE_NAME = METRIC__RESOURCE_NAME; + + /** + * The feature id for the 'Metric Name' attribute. + * + * + * @generated + * @ordered + */ + int STRING_METRIC__METRIC_NAME = METRIC__METRIC_NAME; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int STRING_METRIC__VALUE = METRIC_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'String Metric' class. + * + * + * @generated + * @ordered + */ + int STRING_METRIC_FEATURE_COUNT = METRIC_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'String Metric' class. + * + * + * @generated + * @ordered + */ + int STRING_METRIC_OPERATION_COUNT = METRIC_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.metrics.impl.MetricValueOptionImpl Metric Value Option}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.MetricValueOptionImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getMetricValueOption() + * @generated + */ + int METRIC_VALUE_OPTION = 4; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int METRIC_VALUE_OPTION__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int METRIC_VALUE_OPTION__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int METRIC_VALUE_OPTION__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int METRIC_VALUE_OPTION__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The number of structural features of the 'Metric Value Option' class. + * + * + * @generated + * @ordered + */ + int METRIC_VALUE_OPTION_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Metric Value Option' class. + * + * + * @generated + * @ordered + */ + int METRIC_VALUE_OPTION_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.metrics.impl.AggregationMetricValueOptionImpl Aggregation Metric Value Option}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.AggregationMetricValueOptionImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getAggregationMetricValueOption() + * @generated + */ + int AGGREGATION_METRIC_VALUE_OPTION = 5; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int AGGREGATION_METRIC_VALUE_OPTION__NAME = METRIC_VALUE_OPTION__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int AGGREGATION_METRIC_VALUE_OPTION__LAST_POLLED = METRIC_VALUE_OPTION__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int AGGREGATION_METRIC_VALUE_OPTION__LAST_CHANGED = METRIC_VALUE_OPTION__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int AGGREGATION_METRIC_VALUE_OPTION__CREATED = METRIC_VALUE_OPTION__CREATED; + + /** + * The feature id for the 'Duration' attribute. + * + * + * @generated + * @ordered + */ + int AGGREGATION_METRIC_VALUE_OPTION__DURATION = METRIC_VALUE_OPTION_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Aggregation Type' attribute. + * + * + * @generated + * @ordered + */ + int AGGREGATION_METRIC_VALUE_OPTION__AGGREGATION_TYPE = METRIC_VALUE_OPTION_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Aggregation Metric Value Option' class. + * + * + * @generated + * @ordered + */ + int AGGREGATION_METRIC_VALUE_OPTION_FEATURE_COUNT = METRIC_VALUE_OPTION_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Aggregation Metric Value Option' class. + * + * + * @generated + * @ordered + */ + int AGGREGATION_METRIC_VALUE_OPTION_OPERATION_COUNT = METRIC_VALUE_OPTION_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.metrics.impl.BasicMetricValueOptionImpl Basic Metric Value Option}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.BasicMetricValueOptionImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getBasicMetricValueOption() + * @generated + */ + int BASIC_METRIC_VALUE_OPTION = 6; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_METRIC_VALUE_OPTION__NAME = METRIC_VALUE_OPTION__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_METRIC_VALUE_OPTION__LAST_POLLED = METRIC_VALUE_OPTION__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_METRIC_VALUE_OPTION__LAST_CHANGED = METRIC_VALUE_OPTION__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_METRIC_VALUE_OPTION__CREATED = METRIC_VALUE_OPTION__CREATED; + + /** + * The number of structural features of the 'Basic Metric Value Option' class. + * + * + * @generated + * @ordered + */ + int BASIC_METRIC_VALUE_OPTION_FEATURE_COUNT = METRIC_VALUE_OPTION_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Basic Metric Value Option' class. + * + * + * @generated + * @ordered + */ + int BASIC_METRIC_VALUE_OPTION_OPERATION_COUNT = METRIC_VALUE_OPTION_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.metrics.impl.SequenceMetricValueOptionImpl Sequence Metric Value Option}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.SequenceMetricValueOptionImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getSequenceMetricValueOption() + * @generated + */ + int SEQUENCE_METRIC_VALUE_OPTION = 7; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SEQUENCE_METRIC_VALUE_OPTION__NAME = METRIC_VALUE_OPTION__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int SEQUENCE_METRIC_VALUE_OPTION__LAST_POLLED = METRIC_VALUE_OPTION__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int SEQUENCE_METRIC_VALUE_OPTION__LAST_CHANGED = METRIC_VALUE_OPTION__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int SEQUENCE_METRIC_VALUE_OPTION__CREATED = METRIC_VALUE_OPTION__CREATED; + + /** + * The feature id for the 'Options' containment reference list. + * + * + * @generated + * @ordered + */ + int SEQUENCE_METRIC_VALUE_OPTION__OPTIONS = METRIC_VALUE_OPTION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Sequence Metric Value Option' class. + * + * + * @generated + * @ordered + */ + int SEQUENCE_METRIC_VALUE_OPTION_FEATURE_COUNT = METRIC_VALUE_OPTION_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Sequence Metric Value Option' class. + * + * + * @generated + * @ordered + */ + int SEQUENCE_METRIC_VALUE_OPTION_OPERATION_COUNT = METRIC_VALUE_OPTION_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.metrics.impl.MetricsContainerImpl Container}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.MetricsContainerImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getMetricsContainer() + * @generated + */ + int METRICS_CONTAINER = 8; + + /** + * The number of structural features of the 'Container' class. + * + * + * @generated + * @ordered + */ + int METRICS_CONTAINER_FEATURE_COUNT = 0; + + /** + * The number of operations of the 'Container' class. + * + * + * @generated + * @ordered + */ + int METRICS_CONTAINER_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.metrics.impl.BasicMetricsImpl Basic Metrics}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.BasicMetricsImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getBasicMetrics() + * @generated + */ + int BASIC_METRICS = 9; + + /** + * The feature id for the 'Metrics' containment reference list. + * + * + * @generated + * @ordered + */ + int BASIC_METRICS__METRICS = METRICS_CONTAINER_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Basic Metrics' class. + * + * + * @generated + * @ordered + */ + int BASIC_METRICS_FEATURE_COUNT = METRICS_CONTAINER_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Basic Metrics' class. + * + * + * @generated + * @ordered + */ + int BASIC_METRICS_OPERATION_COUNT = METRICS_CONTAINER_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.metrics.impl.BasicMetricImpl Basic Metric}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.BasicMetricImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getBasicMetric() + * @generated + */ + int BASIC_METRIC = 10; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_METRIC__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_METRIC__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_METRIC__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_METRIC__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The number of structural features of the 'Basic Metric' class. + * + * + * @generated + * @ordered + */ + int BASIC_METRIC_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Basic Metric' class. + * + * + * @generated + * @ordered + */ + int BASIC_METRIC_OPERATION_COUNT = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.metrics.impl.BasicIncreasingULongMetricImpl Basic Increasing ULong Metric}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.BasicIncreasingULongMetricImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getBasicIncreasingULongMetric() + * @generated + */ + int BASIC_INCREASING_ULONG_METRIC = 11; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_INCREASING_ULONG_METRIC__NAME = BASIC_METRIC__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_INCREASING_ULONG_METRIC__LAST_POLLED = BASIC_METRIC__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_INCREASING_ULONG_METRIC__LAST_CHANGED = BASIC_METRIC__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_INCREASING_ULONG_METRIC__CREATED = BASIC_METRIC__CREATED; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_INCREASING_ULONG_METRIC__VALUE = BASIC_METRIC_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Basic Increasing ULong Metric' class. + * + * + * @generated + * @ordered + */ + int BASIC_INCREASING_ULONG_METRIC_FEATURE_COUNT = BASIC_METRIC_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Basic Increasing ULong Metric' class. + * + * + * @generated + * @ordered + */ + int BASIC_INCREASING_ULONG_METRIC_OPERATION_COUNT = BASIC_METRIC_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.metrics.impl.BasicLongMetricImpl Basic Long Metric}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.BasicLongMetricImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getBasicLongMetric() + * @generated + */ + int BASIC_LONG_METRIC = 12; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_LONG_METRIC__NAME = BASIC_METRIC__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_LONG_METRIC__LAST_POLLED = BASIC_METRIC__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_LONG_METRIC__LAST_CHANGED = BASIC_METRIC__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_LONG_METRIC__CREATED = BASIC_METRIC__CREATED; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_LONG_METRIC__VALUE = BASIC_METRIC_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Basic Long Metric' class. + * + * + * @generated + * @ordered + */ + int BASIC_LONG_METRIC_FEATURE_COUNT = BASIC_METRIC_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Basic Long Metric' class. + * + * + * @generated + * @ordered + */ + int BASIC_LONG_METRIC_OPERATION_COUNT = BASIC_METRIC_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.metrics.impl.BasicDoubleMetricImpl Basic Double Metric}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.BasicDoubleMetricImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getBasicDoubleMetric() + * @generated + */ + int BASIC_DOUBLE_METRIC = 13; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_DOUBLE_METRIC__NAME = BASIC_METRIC__NAME; + + /** + * The feature id for the 'Last Polled' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_DOUBLE_METRIC__LAST_POLLED = BASIC_METRIC__LAST_POLLED; + + /** + * The feature id for the 'Last Changed' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_DOUBLE_METRIC__LAST_CHANGED = BASIC_METRIC__LAST_CHANGED; + + /** + * The feature id for the 'Created' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_DOUBLE_METRIC__CREATED = BASIC_METRIC__CREATED; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int BASIC_DOUBLE_METRIC__VALUE = BASIC_METRIC_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Basic Double Metric' class. + * + * + * @generated + * @ordered + */ + int BASIC_DOUBLE_METRIC_FEATURE_COUNT = BASIC_METRIC_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Basic Double Metric' class. + * + * + * @generated + * @ordered + */ + int BASIC_DOUBLE_METRIC_OPERATION_COUNT = BASIC_METRIC_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.metrics.AggregationMetricValueOptionType Aggregation Metric Value Option Type}' enum. + * + * + * @see org.openecomp.ncomp.core.metrics.AggregationMetricValueOptionType + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getAggregationMetricValueOptionType() + * @generated + */ + int AGGREGATION_METRIC_VALUE_OPTION_TYPE = 14; + + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.metrics.Metric Metric}'. + * + * + * @return the meta object for class 'Metric'. + * @see org.openecomp.ncomp.core.metrics.Metric + * @generated + */ + EClass getMetric(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.metrics.Metric#getTime Time}'. + * + * + * @return the meta object for the attribute 'Time'. + * @see org.openecomp.ncomp.core.metrics.Metric#getTime() + * @see #getMetric() + * @generated + */ + EAttribute getMetric_Time(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.metrics.Metric#getResourceName Resource Name}'. + * + * + * @return the meta object for the attribute 'Resource Name'. + * @see org.openecomp.ncomp.core.metrics.Metric#getResourceName() + * @see #getMetric() + * @generated + */ + EAttribute getMetric_ResourceName(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.metrics.Metric#getMetricName Metric Name}'. + * + * + * @return the meta object for the attribute 'Metric Name'. + * @see org.openecomp.ncomp.core.metrics.Metric#getMetricName() + * @see #getMetric() + * @generated + */ + EAttribute getMetric_MetricName(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.metrics.DoubleMetric Double Metric}'. + * + * + * @return the meta object for class 'Double Metric'. + * @see org.openecomp.ncomp.core.metrics.DoubleMetric + * @generated + */ + EClass getDoubleMetric(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.metrics.DoubleMetric#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.openecomp.ncomp.core.metrics.DoubleMetric#getValue() + * @see #getDoubleMetric() + * @generated + */ + EAttribute getDoubleMetric_Value(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.metrics.LongMetric Long Metric}'. + * + * + * @return the meta object for class 'Long Metric'. + * @see org.openecomp.ncomp.core.metrics.LongMetric + * @generated + */ + EClass getLongMetric(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.metrics.LongMetric#isIncreasing Increasing}'. + * + * + * @return the meta object for the attribute 'Increasing'. + * @see org.openecomp.ncomp.core.metrics.LongMetric#isIncreasing() + * @see #getLongMetric() + * @generated + */ + EAttribute getLongMetric_Increasing(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.metrics.LongMetric#isDelta Delta}'. + * + * + * @return the meta object for the attribute 'Delta'. + * @see org.openecomp.ncomp.core.metrics.LongMetric#isDelta() + * @see #getLongMetric() + * @generated + */ + EAttribute getLongMetric_Delta(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.metrics.LongMetric#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.openecomp.ncomp.core.metrics.LongMetric#getValue() + * @see #getLongMetric() + * @generated + */ + EAttribute getLongMetric_Value(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.metrics.StringMetric String Metric}'. + * + * + * @return the meta object for class 'String Metric'. + * @see org.openecomp.ncomp.core.metrics.StringMetric + * @generated + */ + EClass getStringMetric(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.metrics.StringMetric#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.openecomp.ncomp.core.metrics.StringMetric#getValue() + * @see #getStringMetric() + * @generated + */ + EAttribute getStringMetric_Value(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.metrics.MetricValueOption Metric Value Option}'. + * + * + * @return the meta object for class 'Metric Value Option'. + * @see org.openecomp.ncomp.core.metrics.MetricValueOption + * @generated + */ + EClass getMetricValueOption(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.metrics.AggregationMetricValueOption Aggregation Metric Value Option}'. + * + * + * @return the meta object for class 'Aggregation Metric Value Option'. + * @see org.openecomp.ncomp.core.metrics.AggregationMetricValueOption + * @generated + */ + EClass getAggregationMetricValueOption(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.metrics.AggregationMetricValueOption#getDuration Duration}'. + * + * + * @return the meta object for the attribute 'Duration'. + * @see org.openecomp.ncomp.core.metrics.AggregationMetricValueOption#getDuration() + * @see #getAggregationMetricValueOption() + * @generated + */ + EAttribute getAggregationMetricValueOption_Duration(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.metrics.AggregationMetricValueOption#getAggregationType Aggregation Type}'. + * + * + * @return the meta object for the attribute 'Aggregation Type'. + * @see org.openecomp.ncomp.core.metrics.AggregationMetricValueOption#getAggregationType() + * @see #getAggregationMetricValueOption() + * @generated + */ + EAttribute getAggregationMetricValueOption_AggregationType(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.metrics.BasicMetricValueOption Basic Metric Value Option}'. + * + * + * @return the meta object for class 'Basic Metric Value Option'. + * @see org.openecomp.ncomp.core.metrics.BasicMetricValueOption + * @generated + */ + EClass getBasicMetricValueOption(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.metrics.SequenceMetricValueOption Sequence Metric Value Option}'. + * + * + * @return the meta object for class 'Sequence Metric Value Option'. + * @see org.openecomp.ncomp.core.metrics.SequenceMetricValueOption + * @generated + */ + EClass getSequenceMetricValueOption(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.core.metrics.SequenceMetricValueOption#getOptions Options}'. + * + * + * @return the meta object for the containment reference list 'Options'. + * @see org.openecomp.ncomp.core.metrics.SequenceMetricValueOption#getOptions() + * @see #getSequenceMetricValueOption() + * @generated + */ + EReference getSequenceMetricValueOption_Options(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.metrics.MetricsContainer Container}'. + * + * + * @return the meta object for class 'Container'. + * @see org.openecomp.ncomp.core.metrics.MetricsContainer + * @generated + */ + EClass getMetricsContainer(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.metrics.BasicMetrics Basic Metrics}'. + * + * + * @return the meta object for class 'Basic Metrics'. + * @see org.openecomp.ncomp.core.metrics.BasicMetrics + * @generated + */ + EClass getBasicMetrics(); + + /** + * Returns the meta object for the containment reference list '{@link org.openecomp.ncomp.core.metrics.BasicMetrics#getMetrics Metrics}'. + * + * + * @return the meta object for the containment reference list 'Metrics'. + * @see org.openecomp.ncomp.core.metrics.BasicMetrics#getMetrics() + * @see #getBasicMetrics() + * @generated + */ + EReference getBasicMetrics_Metrics(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.metrics.BasicMetric Basic Metric}'. + * + * + * @return the meta object for class 'Basic Metric'. + * @see org.openecomp.ncomp.core.metrics.BasicMetric + * @generated + */ + EClass getBasicMetric(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.metrics.BasicIncreasingULongMetric Basic Increasing ULong Metric}'. + * + * + * @return the meta object for class 'Basic Increasing ULong Metric'. + * @see org.openecomp.ncomp.core.metrics.BasicIncreasingULongMetric + * @generated + */ + EClass getBasicIncreasingULongMetric(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.metrics.BasicIncreasingULongMetric#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.openecomp.ncomp.core.metrics.BasicIncreasingULongMetric#getValue() + * @see #getBasicIncreasingULongMetric() + * @generated + */ + EAttribute getBasicIncreasingULongMetric_Value(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.metrics.BasicLongMetric Basic Long Metric}'. + * + * + * @return the meta object for class 'Basic Long Metric'. + * @see org.openecomp.ncomp.core.metrics.BasicLongMetric + * @generated + */ + EClass getBasicLongMetric(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.metrics.BasicLongMetric#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.openecomp.ncomp.core.metrics.BasicLongMetric#getValue() + * @see #getBasicLongMetric() + * @generated + */ + EAttribute getBasicLongMetric_Value(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.metrics.BasicDoubleMetric Basic Double Metric}'. + * + * + * @return the meta object for class 'Basic Double Metric'. + * @see org.openecomp.ncomp.core.metrics.BasicDoubleMetric + * @generated + */ + EClass getBasicDoubleMetric(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.metrics.BasicDoubleMetric#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see org.openecomp.ncomp.core.metrics.BasicDoubleMetric#getValue() + * @see #getBasicDoubleMetric() + * @generated + */ + EAttribute getBasicDoubleMetric_Value(); + + /** + * Returns the meta object for enum '{@link org.openecomp.ncomp.core.metrics.AggregationMetricValueOptionType Aggregation Metric Value Option Type}'. + * + * + * @return the meta object for enum 'Aggregation Metric Value Option Type'. + * @see org.openecomp.ncomp.core.metrics.AggregationMetricValueOptionType + * @generated + */ + EEnum getAggregationMetricValueOptionType(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + MetricsFactory getMetricsFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.MetricImpl Metric}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.MetricImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getMetric() + * @generated + */ + EClass METRIC = eINSTANCE.getMetric(); + + /** + * The meta object literal for the 'Time' attribute feature. + * + * + * @generated + */ + EAttribute METRIC__TIME = eINSTANCE.getMetric_Time(); + + /** + * The meta object literal for the 'Resource Name' attribute feature. + * + * + * @generated + */ + EAttribute METRIC__RESOURCE_NAME = eINSTANCE.getMetric_ResourceName(); + + /** + * The meta object literal for the 'Metric Name' attribute feature. + * + * + * @generated + */ + EAttribute METRIC__METRIC_NAME = eINSTANCE.getMetric_MetricName(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.DoubleMetricImpl Double Metric}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.DoubleMetricImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getDoubleMetric() + * @generated + */ + EClass DOUBLE_METRIC = eINSTANCE.getDoubleMetric(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute DOUBLE_METRIC__VALUE = eINSTANCE.getDoubleMetric_Value(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.LongMetricImpl Long Metric}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.LongMetricImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getLongMetric() + * @generated + */ + EClass LONG_METRIC = eINSTANCE.getLongMetric(); + + /** + * The meta object literal for the 'Increasing' attribute feature. + * + * + * @generated + */ + EAttribute LONG_METRIC__INCREASING = eINSTANCE.getLongMetric_Increasing(); + + /** + * The meta object literal for the 'Delta' attribute feature. + * + * + * @generated + */ + EAttribute LONG_METRIC__DELTA = eINSTANCE.getLongMetric_Delta(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute LONG_METRIC__VALUE = eINSTANCE.getLongMetric_Value(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.StringMetricImpl String Metric}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.StringMetricImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getStringMetric() + * @generated + */ + EClass STRING_METRIC = eINSTANCE.getStringMetric(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute STRING_METRIC__VALUE = eINSTANCE.getStringMetric_Value(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.MetricValueOptionImpl Metric Value Option}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.MetricValueOptionImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getMetricValueOption() + * @generated + */ + EClass METRIC_VALUE_OPTION = eINSTANCE.getMetricValueOption(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.AggregationMetricValueOptionImpl Aggregation Metric Value Option}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.AggregationMetricValueOptionImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getAggregationMetricValueOption() + * @generated + */ + EClass AGGREGATION_METRIC_VALUE_OPTION = eINSTANCE.getAggregationMetricValueOption(); + + /** + * The meta object literal for the 'Duration' attribute feature. + * + * + * @generated + */ + EAttribute AGGREGATION_METRIC_VALUE_OPTION__DURATION = eINSTANCE.getAggregationMetricValueOption_Duration(); + + /** + * The meta object literal for the 'Aggregation Type' attribute feature. + * + * + * @generated + */ + EAttribute AGGREGATION_METRIC_VALUE_OPTION__AGGREGATION_TYPE = eINSTANCE.getAggregationMetricValueOption_AggregationType(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.BasicMetricValueOptionImpl Basic Metric Value Option}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.BasicMetricValueOptionImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getBasicMetricValueOption() + * @generated + */ + EClass BASIC_METRIC_VALUE_OPTION = eINSTANCE.getBasicMetricValueOption(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.SequenceMetricValueOptionImpl Sequence Metric Value Option}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.SequenceMetricValueOptionImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getSequenceMetricValueOption() + * @generated + */ + EClass SEQUENCE_METRIC_VALUE_OPTION = eINSTANCE.getSequenceMetricValueOption(); + + /** + * The meta object literal for the 'Options' containment reference list feature. + * + * + * @generated + */ + EReference SEQUENCE_METRIC_VALUE_OPTION__OPTIONS = eINSTANCE.getSequenceMetricValueOption_Options(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.MetricsContainerImpl Container}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.MetricsContainerImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getMetricsContainer() + * @generated + */ + EClass METRICS_CONTAINER = eINSTANCE.getMetricsContainer(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.BasicMetricsImpl Basic Metrics}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.BasicMetricsImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getBasicMetrics() + * @generated + */ + EClass BASIC_METRICS = eINSTANCE.getBasicMetrics(); + + /** + * The meta object literal for the 'Metrics' containment reference list feature. + * + * + * @generated + */ + EReference BASIC_METRICS__METRICS = eINSTANCE.getBasicMetrics_Metrics(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.BasicMetricImpl Basic Metric}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.BasicMetricImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getBasicMetric() + * @generated + */ + EClass BASIC_METRIC = eINSTANCE.getBasicMetric(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.BasicIncreasingULongMetricImpl Basic Increasing ULong Metric}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.BasicIncreasingULongMetricImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getBasicIncreasingULongMetric() + * @generated + */ + EClass BASIC_INCREASING_ULONG_METRIC = eINSTANCE.getBasicIncreasingULongMetric(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute BASIC_INCREASING_ULONG_METRIC__VALUE = eINSTANCE.getBasicIncreasingULongMetric_Value(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.BasicLongMetricImpl Basic Long Metric}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.BasicLongMetricImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getBasicLongMetric() + * @generated + */ + EClass BASIC_LONG_METRIC = eINSTANCE.getBasicLongMetric(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute BASIC_LONG_METRIC__VALUE = eINSTANCE.getBasicLongMetric_Value(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.BasicDoubleMetricImpl Basic Double Metric}' class. + * + * + * @see org.openecomp.ncomp.core.metrics.impl.BasicDoubleMetricImpl + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getBasicDoubleMetric() + * @generated + */ + EClass BASIC_DOUBLE_METRIC = eINSTANCE.getBasicDoubleMetric(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute BASIC_DOUBLE_METRIC__VALUE = eINSTANCE.getBasicDoubleMetric_Value(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.AggregationMetricValueOptionType Aggregation Metric Value Option Type}' enum. + * + * + * @see org.openecomp.ncomp.core.metrics.AggregationMetricValueOptionType + * @see org.openecomp.ncomp.core.metrics.impl.MetricsPackageImpl#getAggregationMetricValueOptionType() + * @generated + */ + EEnum AGGREGATION_METRIC_VALUE_OPTION_TYPE = eINSTANCE.getAggregationMetricValueOptionType(); + + } + +} //MetricsPackage diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/SequenceMetricValueOption.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/SequenceMetricValueOption.java new file mode 100644 index 0000000..d6add77 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/SequenceMetricValueOption.java @@ -0,0 +1,61 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Sequence Metric Value Option'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.metrics.SequenceMetricValueOption#getOptions Options}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getSequenceMetricValueOption() + * @model + * @generated + */ +public interface SequenceMetricValueOption extends MetricValueOption { + /** + * Returns the value of the 'Options' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.metrics.MetricValueOption}. + * + *

+ * If the meaning of the 'Options' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Options' containment reference list. + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getSequenceMetricValueOption_Options() + * @model containment="true" + * @generated + */ + EList getOptions(); + +} // SequenceMetricValueOption diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/StringMetric.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/StringMetric.java new file mode 100644 index 0000000..f0ce75d --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/StringMetric.java @@ -0,0 +1,70 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics; + + +/** + * + * A representation of the model object 'String Metric'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link org.openecomp.ncomp.core.metrics.StringMetric#getValue Value}
  • + *
+ *

+ * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getStringMetric() + * @model + * @generated + */ +public interface StringMetric extends Metric { + /** + * Returns the value of the 'Value' attribute. + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(String) + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getStringMetric_Value() + * @model unique="false" + * @generated + */ + String getValue(); + + /** + * Sets the value of the '{@link org.openecomp.ncomp.core.metrics.StringMetric#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(String value); + +} // StringMetric diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/AggregationMetricValueOptionImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/AggregationMetricValueOptionImpl.java new file mode 100644 index 0000000..b3b1354 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/AggregationMetricValueOptionImpl.java @@ -0,0 +1,238 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics.impl; + +import org.openecomp.ncomp.core.metrics.AggregationMetricValueOption; +import org.openecomp.ncomp.core.metrics.AggregationMetricValueOptionType; +import org.openecomp.ncomp.core.metrics.MetricsPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Aggregation Metric Value Option'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.metrics.impl.AggregationMetricValueOptionImpl#getDuration Duration}
  • + *
  • {@link org.openecomp.ncomp.core.metrics.impl.AggregationMetricValueOptionImpl#getAggregationType Aggregation Type}
  • + *
+ *

+ * + * @generated + */ +public class AggregationMetricValueOptionImpl extends MetricValueOptionImpl implements AggregationMetricValueOption { + /** + * The default value of the '{@link #getDuration() Duration}' attribute. + * + * + * @see #getDuration() + * @generated + * @ordered + */ + protected static final String DURATION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDuration() Duration}' attribute. + * + * + * @see #getDuration() + * @generated + * @ordered + */ + protected String duration = DURATION_EDEFAULT; + + /** + * The default value of the '{@link #getAggregationType() Aggregation Type}' attribute. + * + * + * @see #getAggregationType() + * @generated + * @ordered + */ + protected static final AggregationMetricValueOptionType AGGREGATION_TYPE_EDEFAULT = AggregationMetricValueOptionType.SUM; + + /** + * The cached value of the '{@link #getAggregationType() Aggregation Type}' attribute. + * + * + * @see #getAggregationType() + * @generated + * @ordered + */ + protected AggregationMetricValueOptionType aggregationType = AGGREGATION_TYPE_EDEFAULT; + + /** + * + * + * @generated + */ + protected AggregationMetricValueOptionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.AGGREGATION_METRIC_VALUE_OPTION; + } + + /** + * + * + * @generated + */ + public String getDuration() { + return duration; + } + + /** + * + * + * @generated + */ + public void setDuration(String newDuration) { + String oldDuration = duration; + duration = newDuration; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, MetricsPackage.AGGREGATION_METRIC_VALUE_OPTION__DURATION, oldDuration, duration)); + } + + /** + * + * + * @generated + */ + public AggregationMetricValueOptionType getAggregationType() { + return aggregationType; + } + + /** + * + * + * @generated + */ + public void setAggregationType(AggregationMetricValueOptionType newAggregationType) { + AggregationMetricValueOptionType oldAggregationType = aggregationType; + aggregationType = newAggregationType == null ? AGGREGATION_TYPE_EDEFAULT : newAggregationType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, MetricsPackage.AGGREGATION_METRIC_VALUE_OPTION__AGGREGATION_TYPE, oldAggregationType, aggregationType)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case MetricsPackage.AGGREGATION_METRIC_VALUE_OPTION__DURATION: + return getDuration(); + case MetricsPackage.AGGREGATION_METRIC_VALUE_OPTION__AGGREGATION_TYPE: + return getAggregationType(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case MetricsPackage.AGGREGATION_METRIC_VALUE_OPTION__DURATION: + setDuration((String)newValue); + return; + case MetricsPackage.AGGREGATION_METRIC_VALUE_OPTION__AGGREGATION_TYPE: + setAggregationType((AggregationMetricValueOptionType)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case MetricsPackage.AGGREGATION_METRIC_VALUE_OPTION__DURATION: + setDuration(DURATION_EDEFAULT); + return; + case MetricsPackage.AGGREGATION_METRIC_VALUE_OPTION__AGGREGATION_TYPE: + setAggregationType(AGGREGATION_TYPE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case MetricsPackage.AGGREGATION_METRIC_VALUE_OPTION__DURATION: + return DURATION_EDEFAULT == null ? duration != null : !DURATION_EDEFAULT.equals(duration); + case MetricsPackage.AGGREGATION_METRIC_VALUE_OPTION__AGGREGATION_TYPE: + return aggregationType != AGGREGATION_TYPE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (duration: "); + result.append(duration); + result.append(", aggregationType: "); + result.append(aggregationType); + result.append(')'); + return result.toString(); + } + +} //AggregationMetricValueOptionImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicDoubleMetricImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicDoubleMetricImpl.java new file mode 100644 index 0000000..b9fed13 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicDoubleMetricImpl.java @@ -0,0 +1,185 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics.impl; + +import org.openecomp.ncomp.core.metrics.BasicDoubleMetric; +import org.openecomp.ncomp.core.metrics.MetricsPackage; + +import org.openecomp.ncomp.core.types.metrics.DoubleMetricAttribute; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Basic Double Metric'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.metrics.impl.BasicDoubleMetricImpl#getValue Value}
  • + *
+ *

+ * + * @generated + */ +public class BasicDoubleMetricImpl extends BasicMetricImpl implements BasicDoubleMetric { + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected DoubleMetricAttribute value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected BasicDoubleMetricImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.BASIC_DOUBLE_METRIC; + } + + /** + * + * + * @generated + */ + public DoubleMetricAttribute getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(DoubleMetricAttribute newValue) { + DoubleMetricAttribute oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, MetricsPackage.BASIC_DOUBLE_METRIC__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case MetricsPackage.BASIC_DOUBLE_METRIC__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case MetricsPackage.BASIC_DOUBLE_METRIC__VALUE: + setValue((DoubleMetricAttribute)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case MetricsPackage.BASIC_DOUBLE_METRIC__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case MetricsPackage.BASIC_DOUBLE_METRIC__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //BasicDoubleMetricImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicIncreasingULongMetricImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicIncreasingULongMetricImpl.java new file mode 100644 index 0000000..7cd3e08 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicIncreasingULongMetricImpl.java @@ -0,0 +1,185 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics.impl; + +import org.openecomp.ncomp.core.metrics.BasicIncreasingULongMetric; +import org.openecomp.ncomp.core.metrics.MetricsPackage; + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Basic Increasing ULong Metric'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.metrics.impl.BasicIncreasingULongMetricImpl#getValue Value}
  • + *
+ *

+ * + * @generated + */ +public class BasicIncreasingULongMetricImpl extends BasicMetricImpl implements BasicIncreasingULongMetric { + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected BasicIncreasingULongMetricImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.BASIC_INCREASING_ULONG_METRIC; + } + + /** + * + * + * @generated + */ + public IncreasingULongMetricAttribute getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(IncreasingULongMetricAttribute newValue) { + IncreasingULongMetricAttribute oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, MetricsPackage.BASIC_INCREASING_ULONG_METRIC__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case MetricsPackage.BASIC_INCREASING_ULONG_METRIC__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case MetricsPackage.BASIC_INCREASING_ULONG_METRIC__VALUE: + setValue((IncreasingULongMetricAttribute)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case MetricsPackage.BASIC_INCREASING_ULONG_METRIC__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case MetricsPackage.BASIC_INCREASING_ULONG_METRIC__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //BasicIncreasingULongMetricImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicLongMetricImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicLongMetricImpl.java new file mode 100644 index 0000000..edea889 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicLongMetricImpl.java @@ -0,0 +1,185 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics.impl; + +import org.openecomp.ncomp.core.metrics.BasicLongMetric; +import org.openecomp.ncomp.core.metrics.MetricsPackage; + +import org.openecomp.ncomp.core.types.metrics.LongMetricAttribute; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Basic Long Metric'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.metrics.impl.BasicLongMetricImpl#getValue Value}
  • + *
+ *

+ * + * @generated + */ +public class BasicLongMetricImpl extends BasicMetricImpl implements BasicLongMetric { + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final LongMetricAttribute VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected LongMetricAttribute value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected BasicLongMetricImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.BASIC_LONG_METRIC; + } + + /** + * + * + * @generated + */ + public LongMetricAttribute getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(LongMetricAttribute newValue) { + LongMetricAttribute oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, MetricsPackage.BASIC_LONG_METRIC__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case MetricsPackage.BASIC_LONG_METRIC__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case MetricsPackage.BASIC_LONG_METRIC__VALUE: + setValue((LongMetricAttribute)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case MetricsPackage.BASIC_LONG_METRIC__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case MetricsPackage.BASIC_LONG_METRIC__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //BasicLongMetricImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicMetricImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicMetricImpl.java new file mode 100644 index 0000000..4e1e550 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicMetricImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics.impl; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.core.metrics.BasicMetric; +import org.openecomp.ncomp.core.metrics.MetricsPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Basic Metric'. + * + *

+ *

+ * + * @generated + */ +public abstract class BasicMetricImpl extends NamedEntityImpl implements BasicMetric { + /** + * + * + * @generated + */ + protected BasicMetricImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.BASIC_METRIC; + } + +} //BasicMetricImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicMetricValueOptionImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicMetricValueOptionImpl.java new file mode 100644 index 0000000..5855129 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicMetricValueOptionImpl.java @@ -0,0 +1,60 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics.impl; + +import org.openecomp.ncomp.core.metrics.BasicMetricValueOption; +import org.openecomp.ncomp.core.metrics.MetricsPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Basic Metric Value Option'. + * + *

+ *

+ * + * @generated + */ +public class BasicMetricValueOptionImpl extends MetricValueOptionImpl implements BasicMetricValueOption { + /** + * + * + * @generated + */ + protected BasicMetricValueOptionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.BASIC_METRIC_VALUE_OPTION; + } + +} //BasicMetricValueOptionImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicMetricsImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicMetricsImpl.java new file mode 100644 index 0000000..9818fff --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/BasicMetricsImpl.java @@ -0,0 +1,171 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics.impl; + +import org.openecomp.ncomp.core.metrics.BasicMetric; +import org.openecomp.ncomp.core.metrics.BasicMetrics; +import org.openecomp.ncomp.core.metrics.MetricsPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Basic Metrics'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.metrics.impl.BasicMetricsImpl#getMetrics Metrics}
  • + *
+ *

+ * + * @generated + */ +public class BasicMetricsImpl extends MetricsContainerImpl implements BasicMetrics { + /** + * The cached value of the '{@link #getMetrics() Metrics}' containment reference list. + * + * + * @see #getMetrics() + * @generated + * @ordered + */ + protected EList metrics; + + /** + * + * + * @generated + */ + protected BasicMetricsImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.BASIC_METRICS; + } + + /** + * + * + * @generated + */ + public EList getMetrics() { + if (metrics == null) { + metrics = new EObjectContainmentEList(BasicMetric.class, this, MetricsPackage.BASIC_METRICS__METRICS); + } + return metrics; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case MetricsPackage.BASIC_METRICS__METRICS: + return ((InternalEList)getMetrics()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case MetricsPackage.BASIC_METRICS__METRICS: + return getMetrics(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case MetricsPackage.BASIC_METRICS__METRICS: + getMetrics().clear(); + getMetrics().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case MetricsPackage.BASIC_METRICS__METRICS: + getMetrics().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case MetricsPackage.BASIC_METRICS__METRICS: + return metrics != null && !metrics.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //BasicMetricsImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/DoubleMetricImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/DoubleMetricImpl.java new file mode 100644 index 0000000..94a3b4b --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/DoubleMetricImpl.java @@ -0,0 +1,183 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics.impl; + +import org.openecomp.ncomp.core.metrics.DoubleMetric; +import org.openecomp.ncomp.core.metrics.MetricsPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Double Metric'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.metrics.impl.DoubleMetricImpl#getValue Value}
  • + *
+ *

+ * + * @generated + */ +public class DoubleMetricImpl extends MetricImpl implements DoubleMetric { + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final double VALUE_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected double value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected DoubleMetricImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.DOUBLE_METRIC; + } + + /** + * + * + * @generated + */ + public double getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(double newValue) { + double oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, MetricsPackage.DOUBLE_METRIC__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case MetricsPackage.DOUBLE_METRIC__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case MetricsPackage.DOUBLE_METRIC__VALUE: + setValue((Double)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case MetricsPackage.DOUBLE_METRIC__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case MetricsPackage.DOUBLE_METRIC__VALUE: + return value != VALUE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //DoubleMetricImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/LongMetricImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/LongMetricImpl.java new file mode 100644 index 0000000..c2d422f --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/LongMetricImpl.java @@ -0,0 +1,291 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics.impl; + +import org.openecomp.ncomp.core.metrics.LongMetric; +import org.openecomp.ncomp.core.metrics.MetricsPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'Long Metric'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.metrics.impl.LongMetricImpl#isIncreasing Increasing}
  • + *
  • {@link org.openecomp.ncomp.core.metrics.impl.LongMetricImpl#isDelta Delta}
  • + *
  • {@link org.openecomp.ncomp.core.metrics.impl.LongMetricImpl#getValue Value}
  • + *
+ *

+ * + * @generated + */ +public class LongMetricImpl extends MetricImpl implements LongMetric { + /** + * The default value of the '{@link #isIncreasing() Increasing}' attribute. + * + * + * @see #isIncreasing() + * @generated + * @ordered + */ + protected static final boolean INCREASING_EDEFAULT = false; + + /** + * The cached value of the '{@link #isIncreasing() Increasing}' attribute. + * + * + * @see #isIncreasing() + * @generated + * @ordered + */ + protected boolean increasing = INCREASING_EDEFAULT; + + /** + * The default value of the '{@link #isDelta() Delta}' attribute. + * + * + * @see #isDelta() + * @generated + * @ordered + */ + protected static final boolean DELTA_EDEFAULT = false; + + /** + * The cached value of the '{@link #isDelta() Delta}' attribute. + * + * + * @see #isDelta() + * @generated + * @ordered + */ + protected boolean delta = DELTA_EDEFAULT; + + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final long VALUE_EDEFAULT = 0L; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected long value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected LongMetricImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.LONG_METRIC; + } + + /** + * + * + * @generated + */ + public boolean isIncreasing() { + return increasing; + } + + /** + * + * + * @generated + */ + public void setIncreasing(boolean newIncreasing) { + boolean oldIncreasing = increasing; + increasing = newIncreasing; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, MetricsPackage.LONG_METRIC__INCREASING, oldIncreasing, increasing)); + } + + /** + * + * + * @generated + */ + public boolean isDelta() { + return delta; + } + + /** + * + * + * @generated + */ + public void setDelta(boolean newDelta) { + boolean oldDelta = delta; + delta = newDelta; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, MetricsPackage.LONG_METRIC__DELTA, oldDelta, delta)); + } + + /** + * + * + * @generated + */ + public long getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(long newValue) { + long oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, MetricsPackage.LONG_METRIC__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case MetricsPackage.LONG_METRIC__INCREASING: + return isIncreasing(); + case MetricsPackage.LONG_METRIC__DELTA: + return isDelta(); + case MetricsPackage.LONG_METRIC__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case MetricsPackage.LONG_METRIC__INCREASING: + setIncreasing((Boolean)newValue); + return; + case MetricsPackage.LONG_METRIC__DELTA: + setDelta((Boolean)newValue); + return; + case MetricsPackage.LONG_METRIC__VALUE: + setValue((Long)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case MetricsPackage.LONG_METRIC__INCREASING: + setIncreasing(INCREASING_EDEFAULT); + return; + case MetricsPackage.LONG_METRIC__DELTA: + setDelta(DELTA_EDEFAULT); + return; + case MetricsPackage.LONG_METRIC__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case MetricsPackage.LONG_METRIC__INCREASING: + return increasing != INCREASING_EDEFAULT; + case MetricsPackage.LONG_METRIC__DELTA: + return delta != DELTA_EDEFAULT; + case MetricsPackage.LONG_METRIC__VALUE: + return value != VALUE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (increasing: "); + result.append(increasing); + result.append(", delta: "); + result.append(delta); + result.append(", value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //LongMetricImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/MetricImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/MetricImpl.java new file mode 100644 index 0000000..cdafd34 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/MetricImpl.java @@ -0,0 +1,292 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics.impl; + +import org.openecomp.ncomp.core.metrics.Metric; +import org.openecomp.ncomp.core.metrics.MetricsPackage; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Metric'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.metrics.impl.MetricImpl#getTime Time}
  • + *
  • {@link org.openecomp.ncomp.core.metrics.impl.MetricImpl#getResourceName Resource Name}
  • + *
  • {@link org.openecomp.ncomp.core.metrics.impl.MetricImpl#getMetricName Metric Name}
  • + *
+ *

+ * + * @generated + */ +public abstract class MetricImpl extends MinimalEObjectImpl.Container implements Metric { + /** + * The default value of the '{@link #getTime() Time}' attribute. + * + * + * @see #getTime() + * @generated + * @ordered + */ + protected static final long TIME_EDEFAULT = 0L; + + /** + * The cached value of the '{@link #getTime() Time}' attribute. + * + * + * @see #getTime() + * @generated + * @ordered + */ + protected long time = TIME_EDEFAULT; + + /** + * The default value of the '{@link #getResourceName() Resource Name}' attribute. + * + * + * @see #getResourceName() + * @generated + * @ordered + */ + protected static final String RESOURCE_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getResourceName() Resource Name}' attribute. + * + * + * @see #getResourceName() + * @generated + * @ordered + */ + protected String resourceName = RESOURCE_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getMetricName() Metric Name}' attribute. + * + * + * @see #getMetricName() + * @generated + * @ordered + */ + protected static final String METRIC_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMetricName() Metric Name}' attribute. + * + * + * @see #getMetricName() + * @generated + * @ordered + */ + protected String metricName = METRIC_NAME_EDEFAULT; + + /** + * + * + * @generated + */ + protected MetricImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.METRIC; + } + + /** + * + * + * @generated + */ + public long getTime() { + return time; + } + + /** + * + * + * @generated + */ + public void setTime(long newTime) { + long oldTime = time; + time = newTime; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, MetricsPackage.METRIC__TIME, oldTime, time)); + } + + /** + * + * + * @generated + */ + public String getResourceName() { + return resourceName; + } + + /** + * + * + * @generated + */ + public void setResourceName(String newResourceName) { + String oldResourceName = resourceName; + resourceName = newResourceName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, MetricsPackage.METRIC__RESOURCE_NAME, oldResourceName, resourceName)); + } + + /** + * + * + * @generated + */ + public String getMetricName() { + return metricName; + } + + /** + * + * + * @generated + */ + public void setMetricName(String newMetricName) { + String oldMetricName = metricName; + metricName = newMetricName; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, MetricsPackage.METRIC__METRIC_NAME, oldMetricName, metricName)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case MetricsPackage.METRIC__TIME: + return getTime(); + case MetricsPackage.METRIC__RESOURCE_NAME: + return getResourceName(); + case MetricsPackage.METRIC__METRIC_NAME: + return getMetricName(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case MetricsPackage.METRIC__TIME: + setTime((Long)newValue); + return; + case MetricsPackage.METRIC__RESOURCE_NAME: + setResourceName((String)newValue); + return; + case MetricsPackage.METRIC__METRIC_NAME: + setMetricName((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case MetricsPackage.METRIC__TIME: + setTime(TIME_EDEFAULT); + return; + case MetricsPackage.METRIC__RESOURCE_NAME: + setResourceName(RESOURCE_NAME_EDEFAULT); + return; + case MetricsPackage.METRIC__METRIC_NAME: + setMetricName(METRIC_NAME_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case MetricsPackage.METRIC__TIME: + return time != TIME_EDEFAULT; + case MetricsPackage.METRIC__RESOURCE_NAME: + return RESOURCE_NAME_EDEFAULT == null ? resourceName != null : !RESOURCE_NAME_EDEFAULT.equals(resourceName); + case MetricsPackage.METRIC__METRIC_NAME: + return METRIC_NAME_EDEFAULT == null ? metricName != null : !METRIC_NAME_EDEFAULT.equals(metricName); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (time: "); + result.append(time); + result.append(", resourceName: "); + result.append(resourceName); + result.append(", metricName: "); + result.append(metricName); + result.append(')'); + return result.toString(); + } + +} //MetricImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/MetricValueOptionImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/MetricValueOptionImpl.java new file mode 100644 index 0000000..153a4ea --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/MetricValueOptionImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics.impl; + +import org.openecomp.ncomp.core.impl.NamedEntityImpl; + +import org.openecomp.ncomp.core.metrics.MetricValueOption; +import org.openecomp.ncomp.core.metrics.MetricsPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Metric Value Option'. + * + *

+ *

+ * + * @generated + */ +public abstract class MetricValueOptionImpl extends NamedEntityImpl implements MetricValueOption { + /** + * + * + * @generated + */ + protected MetricValueOptionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.METRIC_VALUE_OPTION; + } + +} //MetricValueOptionImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/MetricsContainerImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/MetricsContainerImpl.java new file mode 100644 index 0000000..b8c88ce --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/MetricsContainerImpl.java @@ -0,0 +1,62 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics.impl; + +import org.openecomp.ncomp.core.metrics.MetricsContainer; +import org.openecomp.ncomp.core.metrics.MetricsPackage; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'Container'. + * + *

+ *

+ * + * @generated + */ +public abstract class MetricsContainerImpl extends MinimalEObjectImpl.Container implements MetricsContainer { + /** + * + * + * @generated + */ + protected MetricsContainerImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.METRICS_CONTAINER; + } + +} //MetricsContainerImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/MetricsFactoryImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/MetricsFactoryImpl.java new file mode 100644 index 0000000..0fdfd2c --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/MetricsFactoryImpl.java @@ -0,0 +1,266 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics.impl; + +import org.openecomp.ncomp.core.metrics.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class MetricsFactoryImpl extends EFactoryImpl implements MetricsFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static MetricsFactory init() { + try { + MetricsFactory theMetricsFactory = (MetricsFactory)EPackage.Registry.INSTANCE.getEFactory(MetricsPackage.eNS_URI); + if (theMetricsFactory != null) { + return theMetricsFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new MetricsFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public MetricsFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case MetricsPackage.DOUBLE_METRIC: return createDoubleMetric(); + case MetricsPackage.LONG_METRIC: return createLongMetric(); + case MetricsPackage.STRING_METRIC: return createStringMetric(); + case MetricsPackage.AGGREGATION_METRIC_VALUE_OPTION: return createAggregationMetricValueOption(); + case MetricsPackage.BASIC_METRIC_VALUE_OPTION: return createBasicMetricValueOption(); + case MetricsPackage.SEQUENCE_METRIC_VALUE_OPTION: return createSequenceMetricValueOption(); + case MetricsPackage.BASIC_METRICS: return createBasicMetrics(); + case MetricsPackage.BASIC_INCREASING_ULONG_METRIC: return createBasicIncreasingULongMetric(); + case MetricsPackage.BASIC_LONG_METRIC: return createBasicLongMetric(); + case MetricsPackage.BASIC_DOUBLE_METRIC: return createBasicDoubleMetric(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case MetricsPackage.AGGREGATION_METRIC_VALUE_OPTION_TYPE: + return createAggregationMetricValueOptionTypeFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case MetricsPackage.AGGREGATION_METRIC_VALUE_OPTION_TYPE: + return convertAggregationMetricValueOptionTypeToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public DoubleMetric createDoubleMetric() { + DoubleMetricImpl doubleMetric = new DoubleMetricImpl(); + return doubleMetric; + } + + /** + * + * + * @generated + */ + public LongMetric createLongMetric() { + LongMetricImpl longMetric = new LongMetricImpl(); + return longMetric; + } + + /** + * + * + * @generated + */ + public StringMetric createStringMetric() { + StringMetricImpl stringMetric = new StringMetricImpl(); + return stringMetric; + } + + /** + * + * + * @generated + */ + public AggregationMetricValueOption createAggregationMetricValueOption() { + AggregationMetricValueOptionImpl aggregationMetricValueOption = new AggregationMetricValueOptionImpl(); + return aggregationMetricValueOption; + } + + /** + * + * + * @generated + */ + public BasicMetricValueOption createBasicMetricValueOption() { + BasicMetricValueOptionImpl basicMetricValueOption = new BasicMetricValueOptionImpl(); + return basicMetricValueOption; + } + + /** + * + * + * @generated + */ + public SequenceMetricValueOption createSequenceMetricValueOption() { + SequenceMetricValueOptionImpl sequenceMetricValueOption = new SequenceMetricValueOptionImpl(); + return sequenceMetricValueOption; + } + + /** + * + * + * @generated + */ + public BasicMetrics createBasicMetrics() { + BasicMetricsImpl basicMetrics = new BasicMetricsImpl(); + return basicMetrics; + } + + /** + * + * + * @generated + */ + public BasicIncreasingULongMetric createBasicIncreasingULongMetric() { + BasicIncreasingULongMetricImpl basicIncreasingULongMetric = new BasicIncreasingULongMetricImpl(); + return basicIncreasingULongMetric; + } + + /** + * + * + * @generated + */ + public BasicLongMetric createBasicLongMetric() { + BasicLongMetricImpl basicLongMetric = new BasicLongMetricImpl(); + return basicLongMetric; + } + + /** + * + * + * @generated + */ + public BasicDoubleMetric createBasicDoubleMetric() { + BasicDoubleMetricImpl basicDoubleMetric = new BasicDoubleMetricImpl(); + return basicDoubleMetric; + } + + /** + * + * + * @generated + */ + public AggregationMetricValueOptionType createAggregationMetricValueOptionTypeFromString(EDataType eDataType, String initialValue) { + AggregationMetricValueOptionType result = AggregationMetricValueOptionType.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertAggregationMetricValueOptionTypeToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public MetricsPackage getMetricsPackage() { + return (MetricsPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static MetricsPackage getPackage() { + return MetricsPackage.eINSTANCE; + } + +} //MetricsFactoryImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/MetricsPackageImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/MetricsPackageImpl.java new file mode 100644 index 0000000..3a321dd --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/MetricsPackageImpl.java @@ -0,0 +1,677 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics.impl; + +import org.openecomp.ncomp.core.CorePackage; + +import org.openecomp.ncomp.core.metrics.AggregationMetricValueOption; +import org.openecomp.ncomp.core.metrics.AggregationMetricValueOptionType; +import org.openecomp.ncomp.core.metrics.BasicDoubleMetric; +import org.openecomp.ncomp.core.metrics.BasicIncreasingULongMetric; +import org.openecomp.ncomp.core.metrics.BasicLongMetric; +import org.openecomp.ncomp.core.metrics.BasicMetric; +import org.openecomp.ncomp.core.metrics.BasicMetricValueOption; +import org.openecomp.ncomp.core.metrics.BasicMetrics; +import org.openecomp.ncomp.core.metrics.DoubleMetric; +import org.openecomp.ncomp.core.metrics.LongMetric; +import org.openecomp.ncomp.core.metrics.Metric; +import org.openecomp.ncomp.core.metrics.MetricValueOption; +import org.openecomp.ncomp.core.metrics.MetricsContainer; +import org.openecomp.ncomp.core.metrics.MetricsFactory; +import org.openecomp.ncomp.core.metrics.MetricsPackage; +import org.openecomp.ncomp.core.metrics.SequenceMetricValueOption; + +import org.openecomp.ncomp.core.metrics.StringMetric; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.EcorePackage; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class MetricsPackageImpl extends EPackageImpl implements MetricsPackage { + /** + * + * + * @generated + */ + private EClass metricEClass = null; + + /** + * + * + * @generated + */ + private EClass doubleMetricEClass = null; + + /** + * + * + * @generated + */ + private EClass longMetricEClass = null; + + /** + * + * + * @generated + */ + private EClass stringMetricEClass = null; + + /** + * + * + * @generated + */ + private EClass metricValueOptionEClass = null; + + /** + * + * + * @generated + */ + private EClass aggregationMetricValueOptionEClass = null; + + /** + * + * + * @generated + */ + private EClass basicMetricValueOptionEClass = null; + + /** + * + * + * @generated + */ + private EClass sequenceMetricValueOptionEClass = null; + + /** + * + * + * @generated + */ + private EClass metricsContainerEClass = null; + + /** + * + * + * @generated + */ + private EClass basicMetricsEClass = null; + + /** + * + * + * @generated + */ + private EClass basicMetricEClass = null; + + /** + * + * + * @generated + */ + private EClass basicIncreasingULongMetricEClass = null; + + /** + * + * + * @generated + */ + private EClass basicLongMetricEClass = null; + + /** + * + * + * @generated + */ + private EClass basicDoubleMetricEClass = null; + + /** + * + * + * @generated + */ + private EEnum aggregationMetricValueOptionTypeEEnum = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#eNS_URI + * @see #init() + * @generated + */ + private MetricsPackageImpl() { + super(eNS_URI, MetricsFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link MetricsPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static MetricsPackage init() { + if (isInited) return (MetricsPackage)EPackage.Registry.INSTANCE.getEPackage(MetricsPackage.eNS_URI); + + // Obtain or create and register package + MetricsPackageImpl theMetricsPackage = (MetricsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof MetricsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new MetricsPackageImpl()); + + isInited = true; + + // Initialize simple dependencies + CorePackage.eINSTANCE.eClass(); + + // Create package meta-data objects + theMetricsPackage.createPackageContents(); + + // Initialize created meta-data + theMetricsPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theMetricsPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(MetricsPackage.eNS_URI, theMetricsPackage); + return theMetricsPackage; + } + + /** + * + * + * @generated + */ + public EClass getMetric() { + return metricEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getMetric_Time() { + return (EAttribute)metricEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getMetric_ResourceName() { + return (EAttribute)metricEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getMetric_MetricName() { + return (EAttribute)metricEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getDoubleMetric() { + return doubleMetricEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getDoubleMetric_Value() { + return (EAttribute)doubleMetricEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getLongMetric() { + return longMetricEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getLongMetric_Increasing() { + return (EAttribute)longMetricEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getLongMetric_Delta() { + return (EAttribute)longMetricEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EAttribute getLongMetric_Value() { + return (EAttribute)longMetricEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getStringMetric() { + return stringMetricEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getStringMetric_Value() { + return (EAttribute)stringMetricEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getMetricValueOption() { + return metricValueOptionEClass; + } + + /** + * + * + * @generated + */ + public EClass getAggregationMetricValueOption() { + return aggregationMetricValueOptionEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getAggregationMetricValueOption_Duration() { + return (EAttribute)aggregationMetricValueOptionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getAggregationMetricValueOption_AggregationType() { + return (EAttribute)aggregationMetricValueOptionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getBasicMetricValueOption() { + return basicMetricValueOptionEClass; + } + + /** + * + * + * @generated + */ + public EClass getSequenceMetricValueOption() { + return sequenceMetricValueOptionEClass; + } + + /** + * + * + * @generated + */ + public EReference getSequenceMetricValueOption_Options() { + return (EReference)sequenceMetricValueOptionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getMetricsContainer() { + return metricsContainerEClass; + } + + /** + * + * + * @generated + */ + public EClass getBasicMetrics() { + return basicMetricsEClass; + } + + /** + * + * + * @generated + */ + public EReference getBasicMetrics_Metrics() { + return (EReference)basicMetricsEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getBasicMetric() { + return basicMetricEClass; + } + + /** + * + * + * @generated + */ + public EClass getBasicIncreasingULongMetric() { + return basicIncreasingULongMetricEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getBasicIncreasingULongMetric_Value() { + return (EAttribute)basicIncreasingULongMetricEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getBasicLongMetric() { + return basicLongMetricEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getBasicLongMetric_Value() { + return (EAttribute)basicLongMetricEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getBasicDoubleMetric() { + return basicDoubleMetricEClass; + } + + /** + * + * + * @generated + */ + public EAttribute getBasicDoubleMetric_Value() { + return (EAttribute)basicDoubleMetricEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EEnum getAggregationMetricValueOptionType() { + return aggregationMetricValueOptionTypeEEnum; + } + + /** + * + * + * @generated + */ + public MetricsFactory getMetricsFactory() { + return (MetricsFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + metricEClass = createEClass(METRIC); + createEAttribute(metricEClass, METRIC__TIME); + createEAttribute(metricEClass, METRIC__RESOURCE_NAME); + createEAttribute(metricEClass, METRIC__METRIC_NAME); + + doubleMetricEClass = createEClass(DOUBLE_METRIC); + createEAttribute(doubleMetricEClass, DOUBLE_METRIC__VALUE); + + longMetricEClass = createEClass(LONG_METRIC); + createEAttribute(longMetricEClass, LONG_METRIC__INCREASING); + createEAttribute(longMetricEClass, LONG_METRIC__DELTA); + createEAttribute(longMetricEClass, LONG_METRIC__VALUE); + + stringMetricEClass = createEClass(STRING_METRIC); + createEAttribute(stringMetricEClass, STRING_METRIC__VALUE); + + metricValueOptionEClass = createEClass(METRIC_VALUE_OPTION); + + aggregationMetricValueOptionEClass = createEClass(AGGREGATION_METRIC_VALUE_OPTION); + createEAttribute(aggregationMetricValueOptionEClass, AGGREGATION_METRIC_VALUE_OPTION__DURATION); + createEAttribute(aggregationMetricValueOptionEClass, AGGREGATION_METRIC_VALUE_OPTION__AGGREGATION_TYPE); + + basicMetricValueOptionEClass = createEClass(BASIC_METRIC_VALUE_OPTION); + + sequenceMetricValueOptionEClass = createEClass(SEQUENCE_METRIC_VALUE_OPTION); + createEReference(sequenceMetricValueOptionEClass, SEQUENCE_METRIC_VALUE_OPTION__OPTIONS); + + metricsContainerEClass = createEClass(METRICS_CONTAINER); + + basicMetricsEClass = createEClass(BASIC_METRICS); + createEReference(basicMetricsEClass, BASIC_METRICS__METRICS); + + basicMetricEClass = createEClass(BASIC_METRIC); + + basicIncreasingULongMetricEClass = createEClass(BASIC_INCREASING_ULONG_METRIC); + createEAttribute(basicIncreasingULongMetricEClass, BASIC_INCREASING_ULONG_METRIC__VALUE); + + basicLongMetricEClass = createEClass(BASIC_LONG_METRIC); + createEAttribute(basicLongMetricEClass, BASIC_LONG_METRIC__VALUE); + + basicDoubleMetricEClass = createEClass(BASIC_DOUBLE_METRIC); + createEAttribute(basicDoubleMetricEClass, BASIC_DOUBLE_METRIC__VALUE); + + // Create enums + aggregationMetricValueOptionTypeEEnum = createEEnum(AGGREGATION_METRIC_VALUE_OPTION_TYPE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Obtain other dependent packages + EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); + CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + doubleMetricEClass.getESuperTypes().add(this.getMetric()); + longMetricEClass.getESuperTypes().add(this.getMetric()); + stringMetricEClass.getESuperTypes().add(this.getMetric()); + metricValueOptionEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + aggregationMetricValueOptionEClass.getESuperTypes().add(this.getMetricValueOption()); + basicMetricValueOptionEClass.getESuperTypes().add(this.getMetricValueOption()); + sequenceMetricValueOptionEClass.getESuperTypes().add(this.getMetricValueOption()); + basicMetricsEClass.getESuperTypes().add(this.getMetricsContainer()); + basicMetricEClass.getESuperTypes().add(theCorePackage.getNamedEntity()); + basicIncreasingULongMetricEClass.getESuperTypes().add(this.getBasicMetric()); + basicLongMetricEClass.getESuperTypes().add(this.getBasicMetric()); + basicDoubleMetricEClass.getESuperTypes().add(this.getBasicMetric()); + + // Initialize classes, features, and operations; add parameters + initEClass(metricEClass, Metric.class, "Metric", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getMetric_Time(), theEcorePackage.getELong(), "time", null, 0, 1, Metric.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getMetric_ResourceName(), theEcorePackage.getEString(), "resourceName", null, 0, 1, Metric.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getMetric_MetricName(), theEcorePackage.getEString(), "metricName", null, 0, 1, Metric.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(doubleMetricEClass, DoubleMetric.class, "DoubleMetric", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDoubleMetric_Value(), theEcorePackage.getEDouble(), "value", null, 0, 1, DoubleMetric.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(longMetricEClass, LongMetric.class, "LongMetric", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getLongMetric_Increasing(), theEcorePackage.getEBoolean(), "increasing", "false", 0, 1, LongMetric.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLongMetric_Delta(), theEcorePackage.getEBoolean(), "delta", "false", 0, 1, LongMetric.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getLongMetric_Value(), theEcorePackage.getELong(), "value", null, 0, 1, LongMetric.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(stringMetricEClass, StringMetric.class, "StringMetric", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getStringMetric_Value(), theEcorePackage.getEString(), "value", null, 0, 1, StringMetric.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(metricValueOptionEClass, MetricValueOption.class, "MetricValueOption", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(aggregationMetricValueOptionEClass, AggregationMetricValueOption.class, "AggregationMetricValueOption", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getAggregationMetricValueOption_Duration(), theEcorePackage.getEString(), "duration", null, 0, 1, AggregationMetricValueOption.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getAggregationMetricValueOption_AggregationType(), this.getAggregationMetricValueOptionType(), "aggregationType", null, 0, 1, AggregationMetricValueOption.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(basicMetricValueOptionEClass, BasicMetricValueOption.class, "BasicMetricValueOption", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(sequenceMetricValueOptionEClass, SequenceMetricValueOption.class, "SequenceMetricValueOption", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getSequenceMetricValueOption_Options(), this.getMetricValueOption(), null, "options", null, 0, -1, SequenceMetricValueOption.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(metricsContainerEClass, MetricsContainer.class, "MetricsContainer", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(basicMetricsEClass, BasicMetrics.class, "BasicMetrics", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getBasicMetrics_Metrics(), this.getBasicMetric(), null, "metrics", null, 0, -1, BasicMetrics.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(basicMetricEClass, BasicMetric.class, "BasicMetric", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(basicIncreasingULongMetricEClass, BasicIncreasingULongMetric.class, "BasicIncreasingULongMetric", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getBasicIncreasingULongMetric_Value(), theCorePackage.getIncreasingULongMetricAttribute(), "value", null, 0, 1, BasicIncreasingULongMetric.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(basicLongMetricEClass, BasicLongMetric.class, "BasicLongMetric", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getBasicLongMetric_Value(), theCorePackage.getLongMetricAttribute(), "value", null, 0, 1, BasicLongMetric.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(basicDoubleMetricEClass, BasicDoubleMetric.class, "BasicDoubleMetric", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getBasicDoubleMetric_Value(), theCorePackage.getDoubleMetricAttribute(), "value", null, 0, 1, BasicDoubleMetric.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(aggregationMetricValueOptionTypeEEnum, AggregationMetricValueOptionType.class, "AggregationMetricValueOptionType"); + addEEnumLiteral(aggregationMetricValueOptionTypeEEnum, AggregationMetricValueOptionType.SUM); + addEEnumLiteral(aggregationMetricValueOptionTypeEEnum, AggregationMetricValueOptionType.AVERAGE); + addEEnumLiteral(aggregationMetricValueOptionTypeEEnum, AggregationMetricValueOptionType.COUNT); + addEEnumLiteral(aggregationMetricValueOptionTypeEEnum, AggregationMetricValueOptionType.MAX); + addEEnumLiteral(aggregationMetricValueOptionTypeEEnum, AggregationMetricValueOptionType.MIN); + + // Create resource + createResource(eNS_URI); + } + +} //MetricsPackageImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/SequenceMetricValueOptionImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/SequenceMetricValueOptionImpl.java new file mode 100644 index 0000000..ef2ce4d --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/SequenceMetricValueOptionImpl.java @@ -0,0 +1,171 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics.impl; + +import org.openecomp.ncomp.core.metrics.MetricValueOption; +import org.openecomp.ncomp.core.metrics.MetricsPackage; +import org.openecomp.ncomp.core.metrics.SequenceMetricValueOption; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Sequence Metric Value Option'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.metrics.impl.SequenceMetricValueOptionImpl#getOptions Options}
  • + *
+ *

+ * + * @generated + */ +public class SequenceMetricValueOptionImpl extends MetricValueOptionImpl implements SequenceMetricValueOption { + /** + * The cached value of the '{@link #getOptions() Options}' containment reference list. + * + * + * @see #getOptions() + * @generated + * @ordered + */ + protected EList options; + + /** + * + * + * @generated + */ + protected SequenceMetricValueOptionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.SEQUENCE_METRIC_VALUE_OPTION; + } + + /** + * + * + * @generated + */ + public EList getOptions() { + if (options == null) { + options = new EObjectContainmentEList(MetricValueOption.class, this, MetricsPackage.SEQUENCE_METRIC_VALUE_OPTION__OPTIONS); + } + return options; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case MetricsPackage.SEQUENCE_METRIC_VALUE_OPTION__OPTIONS: + return ((InternalEList)getOptions()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case MetricsPackage.SEQUENCE_METRIC_VALUE_OPTION__OPTIONS: + return getOptions(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case MetricsPackage.SEQUENCE_METRIC_VALUE_OPTION__OPTIONS: + getOptions().clear(); + getOptions().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case MetricsPackage.SEQUENCE_METRIC_VALUE_OPTION__OPTIONS: + getOptions().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case MetricsPackage.SEQUENCE_METRIC_VALUE_OPTION__OPTIONS: + return options != null && !options.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //SequenceMetricValueOptionImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/StringMetricImpl.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/StringMetricImpl.java new file mode 100644 index 0000000..479f0f0 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/impl/StringMetricImpl.java @@ -0,0 +1,183 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics.impl; + +import org.openecomp.ncomp.core.metrics.MetricsPackage; +import org.openecomp.ncomp.core.metrics.StringMetric; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; + +/** + * + * An implementation of the model object 'String Metric'. + * + *

+ * The following features are implemented: + *

    + *
  • {@link org.openecomp.ncomp.core.metrics.impl.StringMetricImpl#getValue Value}
  • + *
+ *

+ * + * @generated + */ +public class StringMetricImpl extends MetricImpl implements StringMetric { + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * + * + * @generated + */ + protected StringMetricImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.STRING_METRIC; + } + + /** + * + * + * @generated + */ + public String getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(String newValue) { + String oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, MetricsPackage.STRING_METRIC__VALUE, oldValue, value)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case MetricsPackage.STRING_METRIC__VALUE: + return getValue(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case MetricsPackage.STRING_METRIC__VALUE: + setValue((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case MetricsPackage.STRING_METRIC__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case MetricsPackage.STRING_METRIC__VALUE: + return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuffer result = new StringBuffer(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + +} //StringMetricImpl diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/util/MetricsAdapterFactory.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/util/MetricsAdapterFactory.java new file mode 100644 index 0000000..82ce308 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/util/MetricsAdapterFactory.java @@ -0,0 +1,395 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics.util; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.metrics.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage + * @generated + */ +public class MetricsAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static MetricsPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public MetricsAdapterFactory() { + if (modelPackage == null) { + modelPackage = MetricsPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected MetricsSwitch modelSwitch = + new MetricsSwitch() { + @Override + public Adapter caseMetric(Metric object) { + return createMetricAdapter(); + } + @Override + public Adapter caseDoubleMetric(DoubleMetric object) { + return createDoubleMetricAdapter(); + } + @Override + public Adapter caseLongMetric(LongMetric object) { + return createLongMetricAdapter(); + } + @Override + public Adapter caseStringMetric(StringMetric object) { + return createStringMetricAdapter(); + } + @Override + public Adapter caseMetricValueOption(MetricValueOption object) { + return createMetricValueOptionAdapter(); + } + @Override + public Adapter caseAggregationMetricValueOption(AggregationMetricValueOption object) { + return createAggregationMetricValueOptionAdapter(); + } + @Override + public Adapter caseBasicMetricValueOption(BasicMetricValueOption object) { + return createBasicMetricValueOptionAdapter(); + } + @Override + public Adapter caseSequenceMetricValueOption(SequenceMetricValueOption object) { + return createSequenceMetricValueOptionAdapter(); + } + @Override + public Adapter caseMetricsContainer(MetricsContainer object) { + return createMetricsContainerAdapter(); + } + @Override + public Adapter caseBasicMetrics(BasicMetrics object) { + return createBasicMetricsAdapter(); + } + @Override + public Adapter caseBasicMetric(BasicMetric object) { + return createBasicMetricAdapter(); + } + @Override + public Adapter caseBasicIncreasingULongMetric(BasicIncreasingULongMetric object) { + return createBasicIncreasingULongMetricAdapter(); + } + @Override + public Adapter caseBasicLongMetric(BasicLongMetric object) { + return createBasicLongMetricAdapter(); + } + @Override + public Adapter caseBasicDoubleMetric(BasicDoubleMetric object) { + return createBasicDoubleMetricAdapter(); + } + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.metrics.Metric Metric}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.metrics.Metric + * @generated + */ + public Adapter createMetricAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.metrics.DoubleMetric Double Metric}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.metrics.DoubleMetric + * @generated + */ + public Adapter createDoubleMetricAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.metrics.LongMetric Long Metric}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.metrics.LongMetric + * @generated + */ + public Adapter createLongMetricAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.metrics.StringMetric String Metric}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.metrics.StringMetric + * @generated + */ + public Adapter createStringMetricAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.metrics.MetricValueOption Metric Value Option}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.metrics.MetricValueOption + * @generated + */ + public Adapter createMetricValueOptionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.metrics.AggregationMetricValueOption Aggregation Metric Value Option}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.metrics.AggregationMetricValueOption + * @generated + */ + public Adapter createAggregationMetricValueOptionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.metrics.BasicMetricValueOption Basic Metric Value Option}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.metrics.BasicMetricValueOption + * @generated + */ + public Adapter createBasicMetricValueOptionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.metrics.SequenceMetricValueOption Sequence Metric Value Option}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.metrics.SequenceMetricValueOption + * @generated + */ + public Adapter createSequenceMetricValueOptionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.metrics.MetricsContainer Container}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.metrics.MetricsContainer + * @generated + */ + public Adapter createMetricsContainerAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.metrics.BasicMetrics Basic Metrics}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.metrics.BasicMetrics + * @generated + */ + public Adapter createBasicMetricsAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.metrics.BasicMetric Basic Metric}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.metrics.BasicMetric + * @generated + */ + public Adapter createBasicMetricAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.metrics.BasicIncreasingULongMetric Basic Increasing ULong Metric}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.metrics.BasicIncreasingULongMetric + * @generated + */ + public Adapter createBasicIncreasingULongMetricAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.metrics.BasicLongMetric Basic Long Metric}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.metrics.BasicLongMetric + * @generated + */ + public Adapter createBasicLongMetricAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.metrics.BasicDoubleMetric Basic Double Metric}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.metrics.BasicDoubleMetric + * @generated + */ + public Adapter createBasicDoubleMetricAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //MetricsAdapterFactory diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/util/MetricsSwitch.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/util/MetricsSwitch.java new file mode 100644 index 0000000..cf1188a --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/metrics/util/MetricsSwitch.java @@ -0,0 +1,439 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.metrics.util; + +import org.openecomp.ncomp.core.NamedEntity; + +import org.openecomp.ncomp.core.metrics.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage + * @generated + */ +public class MetricsSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static MetricsPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public MetricsSwitch() { + if (modelPackage == null) { + modelPackage = MetricsPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case MetricsPackage.METRIC: { + Metric metric = (Metric)theEObject; + T result = caseMetric(metric); + if (result == null) result = defaultCase(theEObject); + return result; + } + case MetricsPackage.DOUBLE_METRIC: { + DoubleMetric doubleMetric = (DoubleMetric)theEObject; + T result = caseDoubleMetric(doubleMetric); + if (result == null) result = caseMetric(doubleMetric); + if (result == null) result = defaultCase(theEObject); + return result; + } + case MetricsPackage.LONG_METRIC: { + LongMetric longMetric = (LongMetric)theEObject; + T result = caseLongMetric(longMetric); + if (result == null) result = caseMetric(longMetric); + if (result == null) result = defaultCase(theEObject); + return result; + } + case MetricsPackage.STRING_METRIC: { + StringMetric stringMetric = (StringMetric)theEObject; + T result = caseStringMetric(stringMetric); + if (result == null) result = caseMetric(stringMetric); + if (result == null) result = defaultCase(theEObject); + return result; + } + case MetricsPackage.METRIC_VALUE_OPTION: { + MetricValueOption metricValueOption = (MetricValueOption)theEObject; + T result = caseMetricValueOption(metricValueOption); + if (result == null) result = caseNamedEntity(metricValueOption); + if (result == null) result = defaultCase(theEObject); + return result; + } + case MetricsPackage.AGGREGATION_METRIC_VALUE_OPTION: { + AggregationMetricValueOption aggregationMetricValueOption = (AggregationMetricValueOption)theEObject; + T result = caseAggregationMetricValueOption(aggregationMetricValueOption); + if (result == null) result = caseMetricValueOption(aggregationMetricValueOption); + if (result == null) result = caseNamedEntity(aggregationMetricValueOption); + if (result == null) result = defaultCase(theEObject); + return result; + } + case MetricsPackage.BASIC_METRIC_VALUE_OPTION: { + BasicMetricValueOption basicMetricValueOption = (BasicMetricValueOption)theEObject; + T result = caseBasicMetricValueOption(basicMetricValueOption); + if (result == null) result = caseMetricValueOption(basicMetricValueOption); + if (result == null) result = caseNamedEntity(basicMetricValueOption); + if (result == null) result = defaultCase(theEObject); + return result; + } + case MetricsPackage.SEQUENCE_METRIC_VALUE_OPTION: { + SequenceMetricValueOption sequenceMetricValueOption = (SequenceMetricValueOption)theEObject; + T result = caseSequenceMetricValueOption(sequenceMetricValueOption); + if (result == null) result = caseMetricValueOption(sequenceMetricValueOption); + if (result == null) result = caseNamedEntity(sequenceMetricValueOption); + if (result == null) result = defaultCase(theEObject); + return result; + } + case MetricsPackage.METRICS_CONTAINER: { + MetricsContainer metricsContainer = (MetricsContainer)theEObject; + T result = caseMetricsContainer(metricsContainer); + if (result == null) result = defaultCase(theEObject); + return result; + } + case MetricsPackage.BASIC_METRICS: { + BasicMetrics basicMetrics = (BasicMetrics)theEObject; + T result = caseBasicMetrics(basicMetrics); + if (result == null) result = caseMetricsContainer(basicMetrics); + if (result == null) result = defaultCase(theEObject); + return result; + } + case MetricsPackage.BASIC_METRIC: { + BasicMetric basicMetric = (BasicMetric)theEObject; + T result = caseBasicMetric(basicMetric); + if (result == null) result = caseNamedEntity(basicMetric); + if (result == null) result = defaultCase(theEObject); + return result; + } + case MetricsPackage.BASIC_INCREASING_ULONG_METRIC: { + BasicIncreasingULongMetric basicIncreasingULongMetric = (BasicIncreasingULongMetric)theEObject; + T result = caseBasicIncreasingULongMetric(basicIncreasingULongMetric); + if (result == null) result = caseBasicMetric(basicIncreasingULongMetric); + if (result == null) result = caseNamedEntity(basicIncreasingULongMetric); + if (result == null) result = defaultCase(theEObject); + return result; + } + case MetricsPackage.BASIC_LONG_METRIC: { + BasicLongMetric basicLongMetric = (BasicLongMetric)theEObject; + T result = caseBasicLongMetric(basicLongMetric); + if (result == null) result = caseBasicMetric(basicLongMetric); + if (result == null) result = caseNamedEntity(basicLongMetric); + if (result == null) result = defaultCase(theEObject); + return result; + } + case MetricsPackage.BASIC_DOUBLE_METRIC: { + BasicDoubleMetric basicDoubleMetric = (BasicDoubleMetric)theEObject; + T result = caseBasicDoubleMetric(basicDoubleMetric); + if (result == null) result = caseBasicMetric(basicDoubleMetric); + if (result == null) result = caseNamedEntity(basicDoubleMetric); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Metric'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Metric'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMetric(Metric object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Double Metric'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Double Metric'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDoubleMetric(DoubleMetric object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Long Metric'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Long Metric'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseLongMetric(LongMetric object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'String Metric'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'String Metric'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseStringMetric(StringMetric object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Metric Value Option'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Metric Value Option'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMetricValueOption(MetricValueOption object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Aggregation Metric Value Option'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Aggregation Metric Value Option'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseAggregationMetricValueOption(AggregationMetricValueOption object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Basic Metric Value Option'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Basic Metric Value Option'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseBasicMetricValueOption(BasicMetricValueOption object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Sequence Metric Value Option'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Sequence Metric Value Option'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSequenceMetricValueOption(SequenceMetricValueOption object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Container'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Container'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseMetricsContainer(MetricsContainer object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Basic Metrics'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Basic Metrics'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseBasicMetrics(BasicMetrics object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Basic Metric'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Basic Metric'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseBasicMetric(BasicMetric object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Basic Increasing ULong Metric'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Basic Increasing ULong Metric'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseBasicIncreasingULongMetric(BasicIncreasingULongMetric object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Basic Long Metric'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Basic Long Metric'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseBasicLongMetric(BasicLongMetric object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Basic Double Metric'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Basic Double Metric'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseBasicDoubleMetric(BasicDoubleMetric object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //MetricsSwitch diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/util/.gitignore b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/util/.gitignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/util/.gitignore @@ -0,0 +1 @@ + diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/util/CoreAdapterFactory.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/util/CoreAdapterFactory.java new file mode 100644 index 0000000..e58f2e9 --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/util/CoreAdapterFactory.java @@ -0,0 +1,195 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.util; + +import org.openecomp.ncomp.core.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see org.openecomp.ncomp.core.CorePackage + * @generated + */ +public class CoreAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static CorePackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public CoreAdapterFactory() { + if (modelPackage == null) { + modelPackage = CorePackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected CoreSwitch modelSwitch = + new CoreSwitch() { + @Override + public Adapter caseNamedEntity(NamedEntity object) { + return createNamedEntityAdapter(); + } + @Override + public Adapter caseEvent(Event object) { + return createEventAdapter(); + } + @Override + public Adapter caseHasOperationalState(HasOperationalState object) { + return createHasOperationalStateAdapter(); + } + @Override + public Adapter caseUser(User object) { + return createUserAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.NamedEntity Named Entity}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.Event Event}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.Event + * @generated + */ + public Adapter createEventAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.HasOperationalState Has Operational State}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.HasOperationalState + * @generated + */ + public Adapter createHasOperationalStateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link org.openecomp.ncomp.core.User User}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see org.openecomp.ncomp.core.User + * @generated + */ + public Adapter createUserAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //CoreAdapterFactory diff --git a/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/util/CoreSwitch.java b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/util/CoreSwitch.java new file mode 100644 index 0000000..3eab46f --- /dev/null +++ b/ncomp-core-model/src/main/xcore-gen/org/openecomp/ncomp/core/util/CoreSwitch.java @@ -0,0 +1,195 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +/** + */ +package org.openecomp.ncomp.core.util; + +import org.openecomp.ncomp.core.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see org.openecomp.ncomp.core.CorePackage + * @generated + */ +public class CoreSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static CorePackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public CoreSwitch() { + if (modelPackage == null) { + modelPackage = CorePackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @parameter ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case CorePackage.NAMED_ENTITY: { + NamedEntity namedEntity = (NamedEntity)theEObject; + T result = caseNamedEntity(namedEntity); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CorePackage.EVENT: { + Event event = (Event)theEObject; + T result = caseEvent(event); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CorePackage.HAS_OPERATIONAL_STATE: { + HasOperationalState hasOperationalState = (HasOperationalState)theEObject; + T result = caseHasOperationalState(hasOperationalState); + if (result == null) result = defaultCase(theEObject); + return result; + } + case CorePackage.USER: { + User user = (User)theEObject; + T result = caseUser(user); + if (result == null) result = caseNamedEntity(user); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Named Entity'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Named Entity'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseNamedEntity(NamedEntity object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Event'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Event'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEvent(Event object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Has Operational State'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Has Operational State'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseHasOperationalState(HasOperationalState object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'User'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'User'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseUser(User object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //CoreSwitch diff --git a/ncomp-core-model/src/main/xcore/alerts.xcore b/ncomp-core-model/src/main/xcore/alerts.xcore new file mode 100644 index 0000000..2680b6f --- /dev/null +++ b/ncomp-core-model/src/main/xcore/alerts.xcore @@ -0,0 +1,66 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/ncomp-core-model/src/main/xcore-gen") + +package org.openecomp.ncomp.core.alerts + +import org.openecomp.ncomp.core.NamedEntity +import org.openecomp.ncomp.core.logs.LogSeverity +import org.openecomp.ncomp.core.IncreasingULongMetricAttribute +import org.openecomp.ncomp.core.HasOperationalState + +abstract class Alert extends NamedEntity, HasOperationalState { + LogSeverity severity + contains DampingRule dampingRule + IncreasingULongMetricAttribute numAlerts + IncreasingULongMetricAttribute numAlertsSuppressed +} + +class ThresholdAlert extends Alert { + String metricName + Double lowerBound + Double upperBound + String duration + String maxDelay +} + +abstract class AlertContainer { + contains Alert[] alerts + refers AlertingTemplate alertingTemplate +} + +class AlertingTemplate extends NamedEntity { + contains Alert[] alerts +} + +abstract class DampingRule { + +} + +class MaxAlertPerInterval extends DampingRule { + String interval + int maxAlerts = "1" +} + + + + diff --git a/ncomp-core-model/src/main/xcore/component.xcore b/ncomp-core-model/src/main/xcore/component.xcore new file mode 100644 index 0000000..7b2eea8 --- /dev/null +++ b/ncomp-core-model/src/main/xcore/component.xcore @@ -0,0 +1,78 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/ncomp-core-model/src/main/xcore-gen") + +package org.openecomp.ncomp.component + +import org.openecomp.ncomp.core.NamedEntity +import org.openecomp.ncomp.core.LongMetricAttribute +import org.openecomp.ncomp.core.IncreasingULongMetricAttribute +import org.openecomp.ncomp.core.Event + +class Component extends NamedEntity { + contains ComponentClass[] classes + contains DroolsRuntime[] droolsRuntimes +} + +class ComponentClass extends NamedEntity { + contains Api[] apis + LongMetricAttribute numberOfResources + IncreasingULongMetricAttribute numberOfUpdateRequests + IncreasingULongMetricAttribute numberOfCreateRequests + IncreasingULongMetricAttribute numberOfDeleteRequests +} + +class Api extends NamedEntity { + IncreasingULongMetricAttribute numberOfRequests + IncreasingULongMetricAttribute numberOfErrorRequests + IncreasingULongMetricAttribute numberOfCompletedRequests + LongMetricAttribute outstandingRequests + LongMetricAttribute lastRequestDuration + op ApiRequest[] currentRequests() +} + +class ApiRequest extends Event { + String componentName + String resourcePath + String transactionId + String parentTransactionId + String action + Long duration + ApiRequestStatus status +} + + +enum ApiRequestStatus { + OKAY, ERROR, INPROGRESS, START +} + +class DroolsRuntime extends NamedEntity { + contains DroolsRule[] rules +} + +class DroolsRule extends NamedEntity { + IncreasingULongMetricAttribute numberOfFires +} + +enum DroolsObjectChange { + INSERTED,DELETED,UPDATED +} \ No newline at end of file diff --git a/ncomp-core-model/src/main/xcore/core.xcore b/ncomp-core-model/src/main/xcore/core.xcore new file mode 100644 index 0000000..7d32720 --- /dev/null +++ b/ncomp-core-model/src/main/xcore/core.xcore @@ -0,0 +1,98 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/ncomp-core-model/src/main/xcore-gen") + +package org.openecomp.ncomp.core + +import org.json.JSONObject + +import org.openecomp.ncomp.core.types.metrics.IncreasingULongMetricAttribute +import org.openecomp.ncomp.core.types.metrics.LongMetricAttribute +import org.openecomp.ncomp.core.types.metrics.DoubleMetricAttribute +import org.openecomp.ncomp.core.types.metrics.StringMetricAttribute +import org.openecomp.ncomp.core.types.metrics.DateMetricAttribute + +annotation "http://openecomp.org" as ecomp + +type JsonObject wraps JSONObject +create { + try { + if (it != null) new JSONObject(it) + } + catch (Exception e) { + throw new RuntimeException("Bad JSON String: " + it + " " + e) + } +} + +type RemoteContext wraps JSONObject +create { + try { + if (it != null) new JSONObject(it) + } + catch (Exception e) { + throw new RuntimeException("Bad JSON String: " + it + " " + e) + } +} + + +abstract class NamedEntity +{ + @ecomp(^type="configuration") + String name + Date lastPolled + Date lastChanged + Date created +} + +abstract class Event { + // TODO what should be the fields in all events. +} + +enum OperationalState { + OPERATIONAL, SUSPENDED +} + +abstract class HasOperationalState { + OperationalState operationalState +} + +enum DeploymentStatus { + UNDEPLOYED, DEPLOYED, DEPLOYED_PARTIALLY, DEPLOYED_ERRORS +} + + +class User extends NamedEntity { + String publicKey + DeploymentStatus deploymentStatus +} + + +type IncreasingULongMetricAttribute wraps IncreasingULongMetricAttribute +convert { try { return it.toStringValue() } catch (Exception e) {return null} } +type LongMetricAttribute wraps LongMetricAttribute +convert { try { return it.toStringValue() } catch (Exception e) {return null} } +type DoubleMetricAttribute wraps DoubleMetricAttribute +convert { try { return it.toStringValue() } catch (Exception e) {return null} } +type StringMetricAttribute wraps StringMetricAttribute +convert { try { return it.toStringValue() } catch (Exception e) {return null} } +type DateMetricAttribute wraps DateMetricAttribute +convert { try { return it.toStringValue() } catch (Exception e) {return null} } diff --git a/ncomp-core-model/src/main/xcore/function.xcore b/ncomp-core-model/src/main/xcore/function.xcore new file mode 100644 index 0000000..8e08add --- /dev/null +++ b/ncomp-core-model/src/main/xcore/function.xcore @@ -0,0 +1,112 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/ncomp-core-model/src/main/xcore-gen") + +package org.openecomp.ncomp.core.function + +import org.openecomp.ncomp.core.NamedEntity +import org.openecomp.ncomp.core.metrics.MetricValueOption + + + +abstract class Function extends NamedEntity { + +} + +abstract class Iterator extends NamedEntity { + +} + +class IteratorUsingFunction extends Iterator { + String[] paths + boolean recursive + contains Function filter +} + +class RuleFunction extends Function { + contains FunctionRule[] rules + +} + +class FunctionRule { + contains FunctionMatch[] matches + contains FunctionAction action +} + +class FunctionAction { + String value +} + +class RuleUpdateFunction extends Function { + contains FunctionUpdateRule[] rules + +} + +class FunctionUpdateRule { + contains FunctionMatch[] matches + contains FunctionUpdate [] updates +} + +abstract class FunctionUpdate { + +} + +class FunctionUpdateAttribute extends FunctionUpdate { + String path + String value +} + +abstract class FunctionMatch { +} + +class FunctionMatchAttribute extends FunctionMatch { + String path + String match + boolean negation +} + +class FunctionMatchMetric extends FunctionMatch { + String path + refers MetricValueOption option + Double lowerBound + Double upperBound + boolean negation +} + + +class FunctionMatchInstanceOf extends FunctionMatch { + String ePackage + String eName +} + + +abstract class ValuePair { + String path +} + +class StringValuePair extends ValuePair { + String value +} + + + + diff --git a/ncomp-core-model/src/main/xcore/logs.xcore b/ncomp-core-model/src/main/xcore/logs.xcore new file mode 100644 index 0000000..d786168 --- /dev/null +++ b/ncomp-core-model/src/main/xcore/logs.xcore @@ -0,0 +1,103 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/ncomp-core-model/src/main/xcore-gen") + +package org.openecomp.ncomp.core.logs + +import org.openecomp.ncomp.core.IncreasingULongMetricAttribute +import org.openecomp.ncomp.core.NamedEntity +import org.openecomp.ncomp.core.function.Function + +class LogMessage { + long time + String resourceName + LogSeverity severity + LogLevel level + String message + String category + int numberOfSuppressed = "0" + Long suppressedStartTime +} + +enum LogLevel { UNKNOWN, TRACE, DEBUG, INFO, WARN, ERROR, FATAL } +enum LogSeverity { UNKNOWN, SEV1, SEV2, SEV3, SEV4 } + + +class LogMessageRule extends NamedEntity { + String description + String messageFilter + String resourcePathFilter + LogLevel level + LogSeverity severity + LogLevel newLevel + LogSeverity newSeverity + String newCategory + boolean disabled = "false" + refers Function updateFunction +} + +abstract class LogMessageContainer { + contains LogMessageContainerConfiguration logMessageConfiguration + contains LogMessageCategory[] logMessageCategories + contains LogMessageStats[] logMessageStats +} + +class LogMessageContainerConfiguration { + +} + +class LogMessageCategory extends NamedEntity { + contains LogMessageStats[] stats +} + +class LogMessageStats extends NamedEntity { + LogLevel level + LogSeverity severity + IncreasingULongMetricAttribute count +} + +class LogMessageState { + boolean suspended + refers LogMessage log + refers LogMessageCategory category +} + +class LogConfiguration { + contains LogFile[] files +} + +class LogFile { + String filename + contains LogPattern[] patterns +} + +class LogPattern { + String pattern + String message + String level + String severity + String path +} + + + + diff --git a/ncomp-core-model/src/main/xcore/metrics.xcore b/ncomp-core-model/src/main/xcore/metrics.xcore new file mode 100644 index 0000000..bd77010 --- /dev/null +++ b/ncomp-core-model/src/main/xcore/metrics.xcore @@ -0,0 +1,92 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +@GenModel(modelDirectory="/ncomp-core-model/src/main/xcore-gen") + +package org.openecomp.ncomp.core.metrics + +import org.openecomp.ncomp.core.DoubleMetricAttribute +import org.openecomp.ncomp.core.IncreasingULongMetricAttribute +import org.openecomp.ncomp.core.LongMetricAttribute +import org.openecomp.ncomp.core.NamedEntity + + +abstract class Metric { + long time + String resourceName + String metricName +} + +class DoubleMetric extends Metric { + double value +} + +class LongMetric extends Metric { + boolean increasing = "false" + boolean delta = "false" + long value +} + +class StringMetric extends Metric { + String value +} + +abstract class MetricValueOption extends NamedEntity {} + + +enum AggregationMetricValueOptionType { SUM, AVERAGE, COUNT, MAX, MIN } + +class AggregationMetricValueOption extends MetricValueOption { + String duration + AggregationMetricValueOptionType aggregationType +} + +class BasicMetricValueOption extends MetricValueOption { + +} + +class SequenceMetricValueOption extends MetricValueOption { + contains MetricValueOption[] options +} + +abstract class MetricsContainer { + +} + +class BasicMetrics extends MetricsContainer { + contains BasicMetric[] metrics +} + +abstract class BasicMetric extends NamedEntity { + +} + +class BasicIncreasingULongMetric extends BasicMetric { + transient IncreasingULongMetricAttribute value +} + +class BasicLongMetric extends BasicMetric { + transient LongMetricAttribute value +} + +class BasicDoubleMetric extends BasicMetric { + transient DoubleMetricAttribute value +} diff --git a/ncomp-core-tools/.classpath b/ncomp-core-tools/.classpath new file mode 100644 index 0000000..07c2adc --- /dev/null +++ b/ncomp-core-tools/.classpath @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ncomp-core-tools/.gitignore b/ncomp-core-tools/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/ncomp-core-tools/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/ncomp-core-tools/.project b/ncomp-core-tools/.project new file mode 100644 index 0000000..618e25b --- /dev/null +++ b/ncomp-core-tools/.project @@ -0,0 +1,23 @@ + + + ncomp-core-tools + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/ncomp-core-tools/.settings/org.eclipse.core.resources.prefs b/ncomp-core-tools/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..f9fe345 --- /dev/null +++ b/ncomp-core-tools/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/test/java=UTF-8 +encoding/=UTF-8 diff --git a/ncomp-core-tools/.settings/org.eclipse.jdt.core.prefs b/ncomp-core-tools/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..443e085 --- /dev/null +++ b/ncomp-core-tools/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/ncomp-core-tools/.settings/org.eclipse.m2e.core.prefs b/ncomp-core-tools/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-core-tools/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-core-tools/LICENSE.txt b/ncomp-core-tools/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/ncomp-core-tools/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/ncomp-core-tools/pom.xml b/ncomp-core-tools/pom.xml new file mode 100644 index 0000000..b8fb083 --- /dev/null +++ b/ncomp-core-tools/pom.xml @@ -0,0 +1,127 @@ + + 4.0.0 + org.openecomp.ncomp.core + ncomp-core-tools + 0.1.0-SNAPSHOT + pom + + + UTF-8 + 1.7 + 1.7 + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-assembly-plugin + + + zipfile + + single + + package + + false + ${project.artifactId}-${project.version} + + src/assembly/assemble_zip.xml + + + + + + + + + + + + osecomp-nexus-releases + OSECOMP Release Repository + ${openecomp.nexus.releases} + + + osecomp-nexus-snapshots + OSECOMP Snapshot Repository + ${openecomp.nexus.snapshots} + + + dcae-javadoc + ${site.urlroot}/${project.artifactId}/${project.version}/ + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + false + org.umlgraph.doclet.UmlGraphDoc + + org.umlgraph + umlgraph + 5.6 + + -views + true + + + + + + diff --git a/ncomp-core-tools/src/assembly/assemble_zip.xml b/ncomp-core-tools/src/assembly/assemble_zip.xml new file mode 100644 index 0000000..e3f597c --- /dev/null +++ b/ncomp-core-tools/src/assembly/assemble_zip.xml @@ -0,0 +1,50 @@ + + + + + zip + + + + false + + + + target/assembly/ + . + + + + + . + lib + + *.jar + + + + src/main/server-gen/bin + bin + 0744 + + + + + src/main/server/bin + bin + 0744 + + + + + src/main/server/scripts + scripts + + + + diff --git a/ncomp-core-tools/src/main/server/bin/dcae-tool b/ncomp-core-tools/src/main/server/bin/dcae-tool new file mode 100644 index 0000000..eca3980 --- /dev/null +++ b/ncomp-core-tools/src/main/server/bin/dcae-tool @@ -0,0 +1,117 @@ +#!/bin/bash + +export BROWSER=chromium-browser +export NCOMPPROJECT=DCAE +export NCOMPNAME=dcae +export NCOMPBASE=org.openecomp.dcae + + +cd $HOME +case $USER in + vagrant) + PACKAGES=/vagrant/packages + ;; + *) + PACKAGES=/home/ubuntu/packages + ;; +esac + +case $(uname -p) in + *86) PACKAGES2=${PACKAGES}32 ;; + *) PACKAGES2=${PACKAGES}64 ;; +esac + +CMD=$1 +LOG=$HOME/logs/dcae-tool.log +mkdir -p `dirname $LOG` +echo `date` $0 $* >> $LOG + +case $CMD in + update-dcae-tool) + ncomp-tool update-ncomp-tool + ;; + install-eclipse) + VERSION=$2 + DIR=$HOME/eclipse-$VERSION + case $VERSION in + dcae) TAR=$PACKAGES2/eclipse-ncomp.tar.gz ;; + *) TAR=$PACKAGES2/eclipse-$VERSION.tar.gz ;; + esac + if [ ! -e $TAR ]; then echo $TAR does not exists; exit 1; fi + if [ -e $DIR ]; then echo $DIR already exists; exit 1; fi + mkdir $DIR + cd $DIR + tar xf $TAR + ;; + start-eclipse) + VERSION=$2 + DIR=$HOME/eclipse-$VERSION + if [ ! -e $DIR ]; then echo $DIR does not exists; exit 1; fi + $DIR/eclipse > $HOME/logs/eclipse.$VERSION.log & + ;; + uninstall-eclipse) + VERSION=$2 + DIR=$HOME/eclipse-$VERSION + 'rm' -r $DIR + ;; + restart-vncserver) + rm -f $HOME/.vnc/*{pid,log} /tmp/.X?-lock /tmp/.X11-unix/X? + ps -eaf | grep Xvnc4 | awk '{print $2}' | xargs kill -9 + vncserver + ;; + create-vm-manager) + NAME=$2 + (echo org.openecomp.dcae.controller ; echo dcae-controller-service-$NAME-model ; echo dcae-vm-manager) | ncomp-tool create-xcore-project + (echo org.openecomp.dcae.controller ; echo dcae-controller-service-$NAME-manager ; echo dcae-vm-manager ; echo Dcae) | ncomp-tool create-sirius-project + ncomp-tool create-parent-project org.openecomp.dcae.controller dcae-controller-service-$NAME + ;; + create-cdap-manager) + NAME=$2 + (echo org.openecomp.dcae.controller ; echo dcae-controller-service-$NAME-model ; echo dcae-cdap-manager) | ncomp-tool create-xcore-project + (echo org.openecomp.dcae.controller ; echo dcae-controller-service-$NAME-manager ; echo dcae-cdap-manager ; echo Dcae) | ncomp-tool create-sirius-project + ncomp-tool create-parent-project org.openecomp.dcae.controller dcae-controller-service-$NAME + ;; + create-docker-manager) + NAME=$2 + (echo org.openecomp.dcae.controller ; echo dcae-controller-service-$NAME-model ; echo dcae-docker-manager) | ncomp-tool create-xcore-project + (echo org.openecomp.dcae.controller ; echo dcae-controller-service-$NAME-manager ; echo dcae-docker-manager ; echo Dcae) | ncomp-tool create-sirius-project + ncomp-tool create-parent-project org.openecomp.dcae.controller dcae-controller-service-$NAME + ;; + install-dcae-manager) + shift + ncomp-tool install-sirius-controller "$@" + ;; + install-dcae-manager-gui) + if [ ! -e $HOME/tomcat ]; then + ncomp-tool install-tomcat + fi + ncomp-tool start-tomcat + shift + ncomp-tool install-sirius-controller-gui "$@" + ;; + install-dcae-manager-gui-eclipse) + if [ ! -e $HOME/tomcat ]; then + ncomp-tool install-tomcat + fi + ncomp-tool start-tomcat + shift + ncomp-tool install-sirius-controller-gui-eclipse "$@" + ;; + *) + echo Usages: + echo " #### tools for updating NCOMP development setup" + echo " $0 update-dcae-tool" + echo " $0 install-eclipse VERSION" + echo " $0 start-eclipse VERSION" + echo " $0 uninstall-eclipse VERSION" + echo " #### tools for using Sirius Operational Management Framework (SOMF)" + echo " $0 create-vm-manager NAME" + echo " $0 create-cdap-manager NAME" + echo " $0 create-docker-manager NAME" + echo " $0 install-dcae-manager GroupId ArtifactId PortNumber [Version]" + echo " $0 install-dcae-manager-gui ArtifactId PrettyName" + echo " #### utils" + echo " $0 restart-vncserver" + ;; +esac + diff --git a/ncomp-core-tools/src/main/server/bin/ncomp-tool b/ncomp-core-tools/src/main/server/bin/ncomp-tool new file mode 100644 index 0000000..c1b15d3 --- /dev/null +++ b/ncomp-core-tools/src/main/server/bin/ncomp-tool @@ -0,0 +1,385 @@ +#!/bin/bash + +export BROWSER=chromium-browser + +export NCOMPPROJECT=${NCOMPPROJECT:=NCOMP} +export NCOMPNAME=${NCOMPNAME:=ncomp} +export NCOMPBASE=${NCOMPBASE:=org.openecomp.ncomp} + +cd $HOME +case $USER in + vagrant) + PACKAGES=/vagrant/packages + ;; + *) + PACKAGES=/home/ubuntu/packages + ;; +esac + +case $(uname -p) in + *86) PACKAGES2=${PACKAGES}32 ;; + *) PACKAGES2=${PACKAGES}64 ;; +esac + + +CMD=$1 +LOG=$HOME/logs/ncomp-tool.log +mkdir -p `dirname $LOG` +echo `date` $0 $* >> $LOG + +case $CMD in + update-ncomp-tool) + GIT=git/dcae-org.openecomp.ncomp + ZIP=git/org.openecomp.ncomp.core/ncomp-core-tools/target/ncomp-core-tools-*.zip + for PROJECT in core maven; do + if [ ! -e $GIT.$PROJECT ]; then + echo need to clone $GIT.$PROJECT + exit 1 + else + (cd $GIT.$PROJECT ; git pull ) + fi + done + if [ -e $ZIP ]; then rm $ZIP; fi + (cd $GIT.core ; cd ncomp-core-tools && mvn clean install) + if [ ! -e $ZIP ]; then + echo Unable to find $ZIP. + exit 1 + fi + T=$(date +%Y-%m-%d-%H:%M) + find bin -type f | grep -v saved | xargs -I XX cp -p XX XX.saved.$T + unzip -o $ZIP + ;; + create-xcore-project) + GEN=git/dcae-org.openecomp.ncomp.maven/ncomp-maven-xcore-project/src/main/resources/new_project.sh + echo "$NCOMPPROJECT GroupId (e.g., $NCOMPBASE.hello.world):" + read GNAME + if [[ ! $GNAME =~ $NCOMPBASE[a-z.]+$ ]]; then echo 'need to match org.openecomp.ncomp[a-z.]+'; exit; fi + echo "$NCOMPPROJECT project name (e.g., $NCOMPNAME-hello-world-model):" + GPREFIX=$(echo $NCOMPNAME-$GNAME | sed s/-$NCOMPBASE// | sed 's/\./-/g')- + read PROJECTNAME + if [[ ! $PROJECTNAME =~ $GPREFIX[-a-z]+ ]]; then echo "need to match $GPREFIX\[a-z-\]+-model"; exit; fi + if [[ ! $PROJECTNAME =~ .*-model ]]; then echo "need to match $GPREFIX\[a-z-\]+-model"; exit; fi + echo "Type of project: server, adaptor, dcae-vm-manager" + read PROJECTTYPE + case $PROJECTTYPE in + adaptor|server|dcae-*-manager) + ;; + *) + echo "PROJECTTYPE $PROJECTTYPE not supported" + exit + ;; + esac + DIR=git/$GNAME + if [ ! -e $DIR ]; then echo GIT directory does not exists: $DIR; exit; fi + if [ -e $DIR/$PROJECTNAME ]; then echo Project directory already exists exists: $DIR/$PROJECTNAME; exit; fi + echo creating XCORE project in $DIR/$PROJECTNAME + X=$(echo $PROJECTNAME | sed s/$NCOMPNAME-// | sed s/-model$//) + for YY in $(echo $X | tr "-" "\n"); do + Y=$Y"$(tr '[:lower:]' '[:upper:]' <<< ${YY:0:1})${YY:1}" + done + #echo $X $Y + echo $(date) bash $GEN $DIR/$PROJECTNAME $X $PROJECTTYPE $Y $GNAME $NCOMPBASE $NCOMPNAME >> $LOG + bash $GEN $DIR/$PROJECTNAME $X $PROJECTTYPE $Y $GNAME $NCOMPBASE $NCOMPNAME + ;; + create-parent-project) + GEN=git/dcae-org.openecomp.ncomp.maven/ncomp-maven-parent-project/src/main/resources/new_project.sh + GNAME=$2 + PROJECTNAME=$3 + DIR=git/$GNAME + echo $GEN $DIR $PROJECTNAME $GNAME + bash $GEN $DIR $PROJECTNAME $GNAME + ;; + create-sirius-project) + GEN=git/dcae-org.openecomp.ncomp.maven/ncomp-maven-sirius-project/src/main/resources/new_project.sh + echo "$NCOMPPROJECT GroupId (e.g., $NCOMPBASE.hello.world):" + read GNAME + if [[ ! $GNAME =~ $NCOMPBASE[a-z.]+$ ]]; then echo 'need to match org.openecomp.ncomp[a-z.]+'; exit; fi + DIR=git/$GNAME + if [ ! -e $DIR ]; then echo GIT directory does not exists: $DIR; exit; fi + echo "$NCOMPPROJECT project name (e.g., $NCOMPNAME-hello-world-model):" + GPREFIX=$(echo $NCOMPNAME-$GNAME | sed s/-$NCOMPBASE// | sed 's/\./-/g')- + read PROJECTNAME + if [[ ! $PROJECTNAME =~ $GPREFIX[-a-z]+ ]]; then echo "need to match $GPREFIX\[a-z-\]+"; exit; fi + if [[ $PROJECTNAME =~ .*-model ]]; then echo "cannot match *-model"; exit; fi + if [ -e $DIR/$PROJECTNAME ]; then echo Project directory already exists: $DIR/$PROJECTNAME; exit; fi + MODELPROJECTNAME=$(echo $PROJECTNAME | sed 's/[a-z]*$/model/') + if [ ! -e $DIR/$MODELPROJECTNAME ]; then echo Model Project directory does not exists: $DIR/$MODELPROJECTNAME; exit; fi + echo "Type of project: server, adaptor" + read PROJECTTYPE + case $PROJECTTYPE in + adaptor|server|dcae-*-manager) + ;; + *) + echo "PROJECTTYPE $PROJECTTYPE not supported" + exit + ;; + esac + echo "Project Prefix" + read PROJECTPREFIX + if [ "$PROJECTPREFIX" == "" ]; then echo prefix cannot be empty; exit; fi + MODEL=$(echo $PROJECTNAME | sed s/.*-//) + echo creating XCORE project in $DIR/$PROJECTNAME + X=$(echo $PROJECTNAME | sed s/$NCOMPNAME-// | sed s/-$MODEL$//) + for YY in $(echo $X | tr "-" "\n"); do + Y=$Y"$(tr '[:lower:]' '[:upper:]' <<< ${YY:0:1})${YY:1}" + done + #echo $X $Y + echo $(date) bash $GEN $DIR/$PROJECTNAME $X $MODEL $PROJECTTYPE $Y $PROJECTPREFIX $GNAME $MODELPROJECTNAME $NCOMPBASE $NCOMPNAME >> $LOG + bash $GEN $DIR/$PROJECTNAME $X $MODEL $PROJECTTYPE $Y $PROJECTPREFIX $GNAME $MODELPROJECTNAME $NCOMPBASE $NCOMPNAME + ;; + create-sirius-runtime) + GEN=git/dcae-org.openecomp.ncomp.maven/ncomp-maven-sirius-runtime/src/main/resources/new_project.sh + DIR=$2 + GNAME=$3 + PROJECTNAME=$4 + PORT=$5 + if [ -e $DIR ]; then + echo "Directory exists: $DIR" + echo "Comparing config..." + SDIR=git/$GNAME/$PROJECTNAME/src/main/server + BBBB=`echo $PROJECTNAME | sed s/ncomp-//g` + for i in $(cd $SDIR; find config -type f -print); do + if [ $i = "config/pw.sh.sh" ]; then continue; fi + j=$i + if [ $i == "config/makefile" ]; then j="makefile"; fi + echo "Comparing $i..." + if [ -e $DIR/config/pw.sh ]; then + sed -e "s/AAAA/$PROJECTNAME/g" -e "s/PORT/$PORT/g" -e "s/BBBB/$BBBB/g" < $SDIR/$i | $DIR/config/pw.sh | diff - $DIR/$j + else + sed -e "s/AAAA/$PROJECTNAME/g" -e "s/PORT/$PORT/g" -e "s/BBBB/$BBBB/g" < $SDIR/$i | diff - $DIR/$j + fi + done + exit + fi + echo echo bash $GEN $DIR $PROJECTNAME $PORT >> $LOG + bash $GEN $DIR $GNAME $PROJECTNAME $PORT + ;; + install-sirius-controller-gui) + NAME=$2 + APPNAME=$3 + WEBAPPDIR=$HOME/tomcat/apache-tomcat-7.0.62/webapps + CONFIG=$HOME/controllers/$NAME/config/console.properties + if [ ! -e $WEBAPPDIR ]; then echo $WEBAPPDIR does not exists. Please install tomcat. ; exit 1; fi + if [ ! -e $CONFIG ]; then echo $CONFIG does not exists. Please install controller ; exit 1; fi + mkdir -p $WEBAPPDIR/$NAME + ( cd $WEBAPPDIR/$NAME ; rm -rf * ; jar xf $PACKAGES/SiriusPortal.war ) + sed -i 's/>Big Streaming Analytics .*APPNAME> $WEBAPPDIR/$NAME/WEB-INF/classes/gui.properties + touch $WEBAPPDIR/$NAME/WEB-INF/web.xml + if [ "$START" != "no" ]; then + echo URL "http://localhost:18080/$NAME" will automatically load in 30 seconds + (sleep 30; $BROWSER "http://localhost:18080/$NAME";) & + fi + ;; + install-sirius-controller-gui-eclipse) + NAME=$2 + APPNAME=$3 + WEBAPPDIR=$HOME/tomcat/apache-tomcat-7.0.62/webapps + CONFIG=$HOME/git/*/$NAME/config/console.properties + if [ ! -e $WEBAPPDIR ]; then echo $WEBAPPDIR does not exists. Please install tomcat. ; exit 1; fi + if [ ! -e $CONFIG ]; then echo $CONFIG does not exists. Please install controller ; exit 1; fi + mkdir -p $WEBAPPDIR/$NAME + ( cd $WEBAPPDIR/$NAME ; rm -rf * ; jar xf $PACKAGES/SiriusPortal.war ) + sed -i 's/>Big Streaming Analytics .*APPNAME> $WEBAPPDIR/$NAME/WEB-INF/classes/gui.properties + touch $WEBAPPDIR/$NAME/WEB-INF/web.xml + if [ "$START" != "no" ]; then + echo URL "http://localhost:18080/$NAME" will automatically load in 30 seconds + (sleep 30; $BROWSER "http://localhost:18080/$NAME";) & + fi + ;; + install-sirius-controller) + GNAME=$2 + NAME=$3 + PORT=$4 + VERSION=${5:-0.1.0-SNAPSHOT} + DIR=$HOME/controllers/$NAME + $HOME/bin/ncomp-tool create-sirius-runtime $DIR $GNAME $NAME $PORT + #mvn org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=$GNAME:$NAME:$VERSION:zip -DoutputDirectory=$DIR + FILE=$NAME-$VERSION.zip + FILE2=$NAME-$VERSION-runtime.zip + FFILE2=git/$GNAME/$NAME/target/$FILE2 + if [ -e $FFILE2 ]; then + cp $FFILE2 $DIR + rm -rf $DIR/lib $DIR/bin $DIR/scripts + cd $DIR + unzip -qo $FILE2 + else + FFILE=git/$GNAME/$NAME/target/$FILE + cp $FFILE $DIR + rm -rf $DIR/lib $DIR/bin $DIR/scripts + cd $DIR + unzip -qo $FILE + cp $HOME/git/$GNAME/$NAME/target/$NAME-$VERSION.jar $DIR/lib + fi + if [ -e $DIR/config/pw.sh ]; then + find $DIR/bin -type f | xargs -I X echo "cat X | $DIR/config/pw.sh > X.bak ; mv X.bak X ; chmod +x X" | bash + fi + ## ls -ld bin/* + if [ "$START" != "no" ]; then + make restart + fi + ;; + install-odl-controller) + DIR=$HOME/controllers/odl + VERSION=1.3.0 + rm -rf $DIR/bvc + if [ ! -e $DIR/bvc-$VERSION.zip ]; then + mvn org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=com.brocade.bvc:bvc:$VERSION:zip -DoutputDirectory=$DIR + mvn org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=com.brocade.bvc:bvc-dependencies:$VERSION:zip -DoutputDirectory=$DIR + fi + cd $DIR + unzip -q bvc-$VERSION.zip + unzip -q bvc-dependencies-$VERSION.zip + cd $DIR/bvc + if [ "$START" != "no" ]; then + ./install + fi + ;; + install-odl-plugin) + GNAME=$2 + NAME=$3 + APP=$4 + VERSION=${5:-0.1.0-SNAPSHOT} + DIR=$HOME/controllers/odl + FILE=$HOME/git/$GNAME/$NAME/*karaf?extension/target/$APP-$VERSION.zip + if [ ! -e $FILE ]; then echo $FILE does not exists; exit ; fi + unzip $FILE -d $DIR + cd $DIR/bvc + if [ "$START" != "no" ]; then + ./install + fi + ;; + install-eclipse) + VERSION=$2 + DIR=$HOME/eclipse-$VERSION + TAR=$PACKAGES2/eclipse-$VERSION.tar.gz + if [ ! -e $TAR ]; then echo $TAR does not exists; exit 1; fi + if [ -e $DIR ]; then echo $DIR already exists; exit 1; fi + mkdir $DIR + cd $DIR + tar xf $TAR + if [ "$START" != "no" ]; then + echo Starting Eclipse: $DIR/eclipse + $DIR/eclipse + fi + ;; + uninstall-eclipse) + VERSION=$2 + DIR=$HOME/eclipse-$VERSION + if [ ! -e $DIR ]; then echo $DIR does not exists; exit 1; fi + 'rm' -r $DIR + ;; + install-camunda) + DIR=$HOME/camunda-7.3.0 + if [ -e $DIR ]; then echo $DIR already exists; exit 1; fi + mkdir $DIR + cd $DIR + unzip $PACKAGES/camunda-bpm-tomcat-7.3.0.zip || exit + tar xf $PACKAGES/modeler-1.3.0-linux.gtk.x86_64.tar.gz || exit + if [ "$START" != "no" ]; then + JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom" ./start-camunda.sh + fi + ;; + uninstall-camunda) + DIR=$HOME/camunda-7.3.0 + if [ ! -e $DIR ]; then echo $DIR does not exists; exit 1; fi + ps -eaf | grep java | grep apache-tomcat-7.0.62 | awk '{print $2}' | xargs kill -9 + rm -r $DIR + ;; + start-camunda-modeler) + $HOME/camunda-7.3.0/modeler/modeler > /dev/null & + ;; + start-camunda) + DIR=$HOME/camunda-7.3.0 + cd $DIR + JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom" ./start-camunda.sh + ;; + stop-camunda) + ps -eaf | grep java | grep catalina.base=./server/apache-tomcat-7.0.62 | awk '{print $2}' | xargs kill -9 + ;; + shutdown-camunda) + DIR=$HOME/camunda-7.3.0 + cd $DIR + ./server/apache-tomcat-7.0.62/bin/shutdown.sh + ;; + install-tomcat) + DIR=$HOME/tomcat + if [ -e $DIR ]; then echo $DIR already exists; exit 1; fi + mkdir $DIR + cd $DIR + unzip $PACKAGES/apache-tomcat-7.0.62.zip + cd apache-tomcat-7.0.62 + sed -i s/8080/18080/ conf/server.xml + sed -i s/8005/18005/ conf/server.xml + sed -i s/8009/18009/ conf/server.xml + sed -i s/8443/18443/ conf/server.xml + chmod +x bin/startup.sh bin/catalina.sh bin/shutdown.sh + if [ "$START" != "no" ]; then + $HOME/bin/ncomp-tool start-tomcat + fi + ;; + uninstall-tomcat) + $HOME/bin/ncomp-tool stop-tomcat + DIR=$HOME/tomcat + if [ ! -e $DIR ]; then echo $DIR does not exists; exit 1; fi + rm -r $DIR + ;; + start-tomcat) + cd tomcat/apache-tomcat-7.0.62 + NUM_TOMCAT=$(ps -eaf | grep java | grep catalina.base=$HOME/tomcat/apache-tomcat-7.0.62 | wc -l) + if [ "$NUM_TOMCAT" != "0" ]; then echo Tomcat already running; exit; fi + JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom" bin/startup.sh + echo URL "http://localhost:18080/" will automatically load in 30 seconds + (sleep 30; $BROWSER "http://localhost:18080";) & + ;; + stop-tomcat) + ps -eaf | grep java | grep catalina.base=$HOME/tomcat/apache-tomcat-7.0.62 | awk '{print $2}' | xargs kill -9 + ;; + shutdown-tomcat) + /home/tomcat/apache-tomcat-7.0.62/bin/shutdown.sh + ;; + restart-vncserver) + rm -f $HOME/.vnc/*{pid,log} /tmp/.X?-lock /tmp/.X11-unix/X? + ps -eaf | grep Xvnc4 | awk '{print $2}' | xargs kill -9 + vncserver + ;; + *) + echo Usages: + echo " #### tools for updating NCOMP development setup" + echo " $0 update-ncomp-tool" + echo " $0 install-eclipse VERSION" + echo " $0 uninstall-eclipse VERSION" + echo " #### tools for using Eclipse Modeling Framework" + echo " $0 create-xcore-project" + echo " $0 create-sirius-project" + echo " $0 create-parent-project GroupId ArtifactIdPrefix" + echo " $0 install-sirius-controller GroupId ArtifactId PortNumber [Version]" + echo " $0 install-sirius-controller-gui ArtifactId PrettyName" + echo " #### tools for using ODL" + echo " $0 install-odl-controller" + echo " $0 install-odl-plugin GroupId ArtifactId [Version]" + echo " #### tools for using Tomcat" + echo " $0 install-tomcat" + echo " $0 uninstall-tomcat" + echo " $0 start-tomcat" + echo " $0 stop-tomcat" + echo " $0 shutdown-tomcat" + echo " #### tools for using Camunda Business Process Management Platform https://camunda.com/" + echo " $0 install-camunda" + echo " $0 uninstall-camunda" + echo " $0 start-camunda" + echo " $0 stop-camunda" + echo " $0 shutdown-camunda" + echo " $0 start-camunda-modeler" + echo " #### utils" + echo " $0 restart-vncserver" + ;; +esac + diff --git a/ncomp-core-types/.classpath b/ncomp-core-types/.classpath new file mode 100644 index 0000000..79ccca7 --- /dev/null +++ b/ncomp-core-types/.classpath @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ncomp-core-types/.gitignore b/ncomp-core-types/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/ncomp-core-types/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/ncomp-core-types/.project b/ncomp-core-types/.project new file mode 100644 index 0000000..76ada25 --- /dev/null +++ b/ncomp-core-types/.project @@ -0,0 +1,34 @@ + + + ncomp-core-types + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.pde.PluginNature + + diff --git a/ncomp-core-types/.settings/org.eclipse.core.resources.prefs b/ncomp-core-types/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..f9fe345 --- /dev/null +++ b/ncomp-core-types/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/test/java=UTF-8 +encoding/=UTF-8 diff --git a/ncomp-core-types/.settings/org.eclipse.jdt.core.prefs b/ncomp-core-types/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..443e085 --- /dev/null +++ b/ncomp-core-types/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,8 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/ncomp-core-types/.settings/org.eclipse.m2e.core.prefs b/ncomp-core-types/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000..f897a7f --- /dev/null +++ b/ncomp-core-types/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/ncomp-core-types/LICENSE.txt b/ncomp-core-types/LICENSE.txt new file mode 100644 index 0000000..30471b5 --- /dev/null +++ b/ncomp-core-types/LICENSE.txt @@ -0,0 +1,22 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +ECOMP and OpenECOMP are trademarks and service marks of AT&T Intellectual Property. diff --git a/ncomp-core-types/META-INF/MANIFEST.MF b/ncomp-core-types/META-INF/MANIFEST.MF new file mode 100644 index 0000000..9f2ce2b --- /dev/null +++ b/ncomp-core-types/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: ncomp-core-types +Bundle-Version: 0.1.0.qualifier +Export-Package: org.openecomp.ncomp.core.types.metrics +Require-Bundle: ncomp-utils-java;bundle-version="0.1.0", + ncomp-utils-journaling +Bundle-Vendor: %providerName diff --git a/ncomp-core-types/build.properties b/ncomp-core-types/build.properties new file mode 100644 index 0000000..a1ec8c4 --- /dev/null +++ b/ncomp-core-types/build.properties @@ -0,0 +1,3 @@ +source.. = src/main/java/ +bin.includes = META-INF/,\ + . diff --git a/ncomp-core-types/pom.xml b/ncomp-core-types/pom.xml new file mode 100644 index 0000000..18aeec0 --- /dev/null +++ b/ncomp-core-types/pom.xml @@ -0,0 +1,133 @@ + + 4.0.0 + org.openecomp.ncomp.core + ncomp-core-types + 0.1.0-SNAPSHOT + + + UTF-8 + 1.7 + 1.7 + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + maven-compiler-plugin + 3.1 + + + + + + + + + + + + log4j + log4j + 1.2.16 + + + org.openecomp.ncomp.utils + ncomp-utils-java + ${project.version} + + + org.openecomp.ncomp.utils + ncomp-utils-journaling + ${project.version} + + + + + + + osecomp-nexus-releases + OSECOMP Release Repository + ${openecomp.nexus.releases} + + + osecomp-nexus-snapshots + OSECOMP Snapshot Repository + ${openecomp.nexus.snapshots} + + + dcae-javadoc + ${site.urlroot}/${project.artifactId}/${project.version}/ + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.4 + + false + org.umlgraph.doclet.UmlGraphDoc + + org.umlgraph + umlgraph + 5.6 + + -views + true + + + + + + diff --git a/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/DateMetricAttribute.java b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/DateMetricAttribute.java new file mode 100644 index 0000000..9ad3d85 --- /dev/null +++ b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/DateMetricAttribute.java @@ -0,0 +1,71 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.core.types.metrics; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class DateMetricAttribute implements MetricAttribute { + private IMetricStore store = null; + private String path; + public Date last; + + @Override + public void setup(IMetricStore store, String path) { + this.store = store; + this.path = path; + } + public void add(Date d, long v) { + if (store == null) + throw new RuntimeException("Store is not setup"); + store.addLongValue(path, d, v, "DateMetricAttribute",false); + } + public Long getValue() { + LongMetricMeasurement m = (LongMetricMeasurement) store.getLast(path); + if (m != null) last = m.d; + return m == null ? null : m.v; + } + public String toStringValue() { + return Long.toString(getValue()); + } + + public List getValues(Date start, Date end) { + if (store == null) + throw new RuntimeException("Store is not setup"); + List res = new ArrayList(); + for (MetricMeasurement m : store.getValues(path,start,end)) res.add((LongMetricMeasurement) m); + return res; + } + public List getValuesDouble(Date start, Date end) { + List res = new ArrayList(); + for (LongMetricMeasurement l : getValues(start, end)) { + res.add(new DoubleMetricMeasurement(l.d, l.v)); + } + return res; + } + @Override + public void record() { + // TODO Auto-generated method stub + + } +} diff --git a/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/DoubleMetricAttribute.java b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/DoubleMetricAttribute.java new file mode 100644 index 0000000..8378f0c --- /dev/null +++ b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/DoubleMetricAttribute.java @@ -0,0 +1,101 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.core.types.metrics; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import org.apache.log4j.Logger; + +public class DoubleMetricAttribute implements MetricAttribute { + public static final Logger logger = Logger.getLogger(DoubleMetricAttribute.class); + private IMetricStore store = null; + private String path; + public Date last; + + @Override + public void setup(IMetricStore store, String path) { + this.store = store; + this.path = path; + } + public void add(Date d, double v) { + if (store == null) + throw new RuntimeException("Store is not setup"); + store.addDoubleValue(path, d, v,"DoubleMetricAttribute"); + } + public Double getValue() { + Object o = store.getLast(path); + if (o instanceof DoubleMetricMeasurement) { + DoubleMetricMeasurement x = (DoubleMetricMeasurement) o; + if (x != null) last = x.d; + return x == null ? 0.0 : x.v; + } +// System.err.println("ZZZ: " + path + o); + return -99999.0; + } + public String toStringValue() { + return Double.toString(getValue()); + } + public List getValues(Date start, Date end) { + if (store == null) + throw new RuntimeException("Store is not setup"); + List res = new ArrayList(); + MetricMeasurement error = null; + for (MetricMeasurement m : store.getValues(path,start,end)) { + if (m instanceof DoubleMetricMeasurement) { + res.add((DoubleMetricMeasurement) m); + continue; + } + error = m; + } + if (error != null) + logger.warn("Bad types for Double Metric: " + error.getClass() + " path: " + path); + return res; + } + @Override + public List getValuesDouble(Date start, Date end) { + return getValues(start, end); + } + Double currentValue = null; + public void setValue(double v, boolean force) { + if (force) { + if (store == null) { + logger.warn("Store is not setup"); + return; + } + store.addDoubleValue(path, new Date(), v, "DoubleMetricAttribute"); + store.save(30000); + } + else { + currentValue += v; + } + } + @Override + public void record() { + if (currentValue != null) { + setValue(currentValue.doubleValue(), true); +// System.err.println("XYZ record " + path + " " + incrementalValue); + currentValue = null; + } + } +} diff --git a/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/DoubleMetricMeasurement.java b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/DoubleMetricMeasurement.java new file mode 100644 index 0000000..751d4dd --- /dev/null +++ b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/DoubleMetricMeasurement.java @@ -0,0 +1,38 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.core.types.metrics; + +import java.io.Serializable; +import java.util.Date; + +public class DoubleMetricMeasurement extends MetricMeasurement implements Serializable { + /** + * + */ + private static final long serialVersionUID = 5551745712848374252L; + public double v; + + public DoubleMetricMeasurement(Date d, double v) { + this.d = d; + this.v = v; + } +} diff --git a/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/IMetricManager.java b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/IMetricManager.java new file mode 100644 index 0000000..78a8a52 --- /dev/null +++ b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/IMetricManager.java @@ -0,0 +1,26 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.core.types.metrics; + +public interface IMetricManager { + +} diff --git a/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/IMetricStore.java b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/IMetricStore.java new file mode 100644 index 0000000..c66fb59 --- /dev/null +++ b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/IMetricStore.java @@ -0,0 +1,42 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.core.types.metrics; + +import java.util.Date; +import java.util.List; + + +public interface IMetricStore { + + MetricMeasurement getLast(String path); + + void addLongValue(String path, Date d, Long v, String aType, boolean isDelta); + + List getValues(String path, Date start, Date end); + + void addDoubleValue(String path, Date d, Double v, String string); + + boolean save(long timeout); + + MetricMeasurement getLast2(String path); + +} diff --git a/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/IncreasingULongMetricAttribute.java b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/IncreasingULongMetricAttribute.java new file mode 100644 index 0000000..a7b5e4b --- /dev/null +++ b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/IncreasingULongMetricAttribute.java @@ -0,0 +1,133 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.core.types.metrics; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import org.apache.log4j.Logger; + +public class IncreasingULongMetricAttribute implements MetricAttribute { + public static final Logger logger = Logger.getLogger(IncreasingULongMetricAttribute.class); + private IMetricStore store = null; + private String path; + public Date last; + + @Override + public void setup(IMetricStore store, String path) { + this.store = store; + this.path = path; + } + public void add(Date d, long v) { + if (store == null) + throw new RuntimeException("Store is not setup"); + store.addLongValue(path, d, v, "IncreasingULongMetricAttribute",false); + } + public Double getValue() { + LongMetricMeasurement m1 = (LongMetricMeasurement) store.getLast(path); + LongMetricMeasurement m2 = (LongMetricMeasurement) store.getLast2(path); + if (m1 != null) last = m1.d; + return m2 == null ? null : 1000.0*(m1.v-m2.v)/(m1.d.getTime() - m2.d.getTime()); + } + public String toStringValue() { + return Double.toString(getValue()); + } + + public List getValues(Date start, Date end) { + if (store == null) + throw new RuntimeException("Store is not setup"); + List res = new ArrayList(); + LongMetricMeasurement prev = null; + // need to worry about the case that 2 values have the same timestamp + for (MetricMeasurement m : removeDublicateTime(store.getValues(path,start,end))) { + LongMetricMeasurement mm = (LongMetricMeasurement) m; + if (prev != null) { + double delta = 1000.0*(mm.v - prev.v)/(mm.d.getTime() - prev.d.getTime()) ; + if (delta < 0) { + logger.warn("negative value: " + delta + " mm=" + mm + " prev=" + prev); + } + else { + DoubleMetricMeasurement mmm = new DoubleMetricMeasurement(mm.d, delta); + res.add(mmm); + } + } + prev = mm; + } + return res; + + } + private List removeDublicateTime(List values) { + List res = new ArrayList(); + MetricMeasurement p = null; + for (MetricMeasurement m : values) { + if (p != null && p.d.getTime() != m.d.getTime()) res.add(p); + p = m; + } + if (p != null) res.add(p); + return res ; + } + public List getDeltaValues(Date start, Date end) { + if (store == null) + throw new RuntimeException("Store is not setup"); + List res = new ArrayList(); + LongMetricMeasurement prev = null; + for (MetricMeasurement m : store.getValues(path,start,end)) { + LongMetricMeasurement mm = (LongMetricMeasurement) m; + if (prev != null) { + long delta = mm.v - prev.v ; + LongMetricMeasurement mmm = new LongMetricMeasurement(mm.d, delta); + res.add(mmm); + } + prev = mm; + } + return res; + } + @Override + public List getValuesDouble(Date start, Date end) { + return getValues(start, end); + } + long incrementalValue = 0; + public void increase(long v, boolean force) { + if (force) { + if (store == null) { + logger.warn("Store is not setup"); + return; + } + store.addLongValue(path, new Date(), v, "IncreasingULongMetricAttribute",true); + store.save(30000); + } + else { + incrementalValue += v; + } + + } + @Override + public synchronized void record() { + // TODO this should be thought about more. + if (incrementalValue > 0) { + increase(incrementalValue, true); +// System.err.println("XYZ record " + path + " " + incrementalValue); + incrementalValue = 0; + } + } +} diff --git a/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/LongMetricAttribute.java b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/LongMetricAttribute.java new file mode 100644 index 0000000..21c33bd --- /dev/null +++ b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/LongMetricAttribute.java @@ -0,0 +1,99 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.core.types.metrics; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import org.apache.log4j.Logger; + +public class LongMetricAttribute implements MetricAttribute { + public static final Logger logger = Logger.getLogger(LongMetricAttribute.class); + private IMetricStore store = null; + private String path; + public Date last; + + @Override + public void setup(IMetricStore store, String path) { + this.store = store; + this.path = path; + } + public void add(Date d, long v) { + if (store == null) + throw new RuntimeException("Store is not setup"); + store.addLongValue(path, d, v, "LongMetricAttribute",false); + } + public Long getValue() { + LongMetricMeasurement m = (LongMetricMeasurement) store.getLast(path); + if (m != null) last = m.d; + return m == null ? null : m.v; + } + public String toStringValue() { + return Long.toString(getValue()); + } + + public List getValues(Date start, Date end) { + if (store == null) + throw new RuntimeException("Store is not setup"); + List res = new ArrayList(); + for (MetricMeasurement m : store.getValues(path,start,end)) res.add((LongMetricMeasurement) m); + return res; + } + public List getValuesDouble(Date start, Date end) { + List res = new ArrayList(); + for (LongMetricMeasurement l : getValues(start, end)) { + res.add(new DoubleMetricMeasurement(l.d, l.v)); + } + return res; + } + List monitoredList = null; + Long currentValue = null; + public void setValue(long v, boolean force) { + if (force) { + if (store == null) { + logger.warn("Store is not setup"); + return; + } + store.addLongValue(path, new Date(), v, "LongMetricAttribute", false); + store.save(30000); + } + else { + currentValue = v; + } + } + public void setMonitoredList(List l) { + monitoredList = l; + } + @Override + public void record() { + if (currentValue != null) { + setValue(currentValue.longValue(), true); +// System.err.println("XYZ record " + path + " " + currentValue); + currentValue = null; + } + if (monitoredList != null) { + setValue(monitoredList.size(), true); + } + } + +} diff --git a/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/LongMetricMeasurement.java b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/LongMetricMeasurement.java new file mode 100644 index 0000000..390a3d9 --- /dev/null +++ b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/LongMetricMeasurement.java @@ -0,0 +1,40 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.core.types.metrics; + +import java.io.Serializable; +import java.util.Date; + +public class LongMetricMeasurement extends MetricMeasurement implements Serializable { + private static final long serialVersionUID = -4665287013236612581L; + public long v; + + public LongMetricMeasurement(Date d, long v) { + this.d = d; + this.v = v; + } + + @Override + public String toString() { + return "LongMetricMeasurement [v=" + v + ", d=" + d + "]"; + } +} diff --git a/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/MetricAttribute.java b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/MetricAttribute.java new file mode 100644 index 0000000..66dc89e --- /dev/null +++ b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/MetricAttribute.java @@ -0,0 +1,31 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.core.types.metrics; + +import java.util.Date; +import java.util.List; + +public interface MetricAttribute { + public void setup(IMetricStore store, String path); + public List getValuesDouble(Date start, Date end); + public void record(); +} diff --git a/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/MetricDailyMeasurement.java b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/MetricDailyMeasurement.java new file mode 100644 index 0000000..bb1a165 --- /dev/null +++ b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/MetricDailyMeasurement.java @@ -0,0 +1,95 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.core.types.metrics; + +import java.io.Serializable; +import java.util.Date; + +import org.json.JSONObject; + +import org.openecomp.ncomp.utils.journaling.JournalingList; +import org.openecomp.ncomp.utils.journaling.JournalingObject; + +public class MetricDailyMeasurement extends JournalingObject implements Serializable { + private static final long serialVersionUID = 6485680539666136294L; + public JournalingList l; + private MetricMeasurement last; + private MetricMeasurement last2; + + public MetricDailyMeasurement(String context, JournalingObject parent) { + super(context,parent); + } + public MetricMeasurement getLast() { + return last; + } + public void setLast(MetricMeasurement m) { + logAttributeValue("last",m); + this.last = m; + } + public MetricMeasurement getLast2() { + return last2; + } + public void setLast2(MetricMeasurement m) { + logAttributeValue("last2",m); + this.last2 = m; + } + + + @Override + public void init() { + if (l == null) + l = new JournalingList("l",this); + else + initChild("l", l); + } + + public void add(Date d, Double v) { + l.add(new DoubleMetricMeasurement(d, v)); + if (last == null || d.after(last.d)) { + if (last != null) setLast2(last); + setLast(new DoubleMetricMeasurement(d, v)); + } + } + public void add(Date d, long v) { + l.add(new LongMetricMeasurement(d, v)); + if (last == null || d.after(last.d)) { + if (last != null) setLast2(last); + setLast(new LongMetricMeasurement(d, v)); + } + } + public void add(Date d, String v) { + l.add(new StringMetricMeasurement(d, v)); + if (last == null || d.after(last.d)) { + if (last != null) setLast2(last); + setLast(new StringMetricMeasurement(d, v)); + } + } + @Override + public JSONObject toJson() { + JSONObject json = super.toJson(); + json.put("last", last.toString()); + json.put("last2", last.toString()); + return json ; + } + + +} diff --git a/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/MetricMeasurement.java b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/MetricMeasurement.java new file mode 100644 index 0000000..db22494 --- /dev/null +++ b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/MetricMeasurement.java @@ -0,0 +1,31 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.core.types.metrics; + +import java.io.Serializable; +import java.util.Date; + +public abstract class MetricMeasurement implements Serializable { + private static final long serialVersionUID = -8197657840442411163L; + public Date d; + +} diff --git a/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/StringMetricAttribute.java b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/StringMetricAttribute.java new file mode 100644 index 0000000..2b31c09 --- /dev/null +++ b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/StringMetricAttribute.java @@ -0,0 +1,68 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.core.types.metrics; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class StringMetricAttribute implements MetricAttribute { + private IMetricStore store = null; + private String path; + public Date last; + + @Override + public void setup(IMetricStore store, String path) { + this.store = store; + this.path = path; + } + public void add(Date d, long v) { + if (store == null) + throw new RuntimeException("Store is not setup"); + store.addLongValue(path, d, v, "StringMetricAttribute",false); + } + public Long getValue() { + LongMetricMeasurement m = (LongMetricMeasurement) store.getLast(path); + if (m != null) last = m.d; + return m == null ? null : m.v; + } + public String toStringValue() { + return Long.toString(getValue()); + } + + public List getValues(Date start, Date end) { + if (store == null) + throw new RuntimeException("Store is not setup"); + List res = new ArrayList(); + for (MetricMeasurement m : store.getValues(path,start,end)) res.add((StringMetricMeasurement) m); + return res; + } + public List getValuesDouble(Date start, Date end) { + List res = new ArrayList(); + return res; + } + @Override + public void record() { + // TODO Auto-generated method stub + + } +} diff --git a/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/StringMetricMeasurement.java b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/StringMetricMeasurement.java new file mode 100644 index 0000000..18cbc1a --- /dev/null +++ b/ncomp-core-types/src/main/java/org/openecomp/ncomp/core/types/metrics/StringMetricMeasurement.java @@ -0,0 +1,40 @@ + +/*- + * ============LICENSE_START========================================== + * OPENECOMP - DCAE + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. + * =================================================================== + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END============================================ + */ + +package org.openecomp.ncomp.core.types.metrics; + +import java.io.Serializable; +import java.util.Date; + +public class StringMetricMeasurement extends MetricMeasurement implements Serializable { + private static final long serialVersionUID = -4665287013236612581L; + String v; + + public StringMetricMeasurement(Date d, String v) { + this.d = d; + this.v = v; + } + + @Override + public String toString() { + return "StringMetricMeasurement [v=" + v + ", d=" + d + "]"; + } +} diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..e4acd45 --- /dev/null +++ b/pom.xml @@ -0,0 +1,81 @@ + + 4.0.0 + org.openecomp.ncomp.core + ncomp-core + pom + + + UTF-8 + 1.7 + 1.7 + + + + + + + + JCenter + JCenter Repository + http://jcenter.bintray.com + + + + Restlet + Restlet Repository + http://maven.restlet.com + + + + + + + + com.blackducksoftware.integration + hub-maven-plugin + 1.4.0 + false + + ${project.name} + ${project.basedir} + + + + create-bdio-file + package + + createHubOutput + + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.6 + + + org.apache.maven.wagon + wagon-webdav-jackrabbit + 2.10 + + + + + + + + ncomp-core-types + ncomp-core-model + ncomp-core-tools + + + + org.openecomp.ncomp.maven + ncomp-maven-base + 0.1.0-SNAPSHOT + ../dcae-org.openecomp.ncomp.maven/ncomp-maven-base + + -- cgit 1.2.3-korg