diff options
author | lj1412 <lji@research.att.com> | 2017-02-14 15:11:15 +0000 |
---|---|---|
committer | lj1412 <lji@research.att.com> | 2017-02-14 15:11:17 +0000 |
commit | f7085ebbcc7947e1d690671e477aa4da17a3e347 (patch) | |
tree | e78e50ddbd723192afe7536e94005aabf0657e3c /ncomp-core-model | |
parent | 1d45e17b6bede73661c48bfddc995771b31edd2a (diff) |
Init ncomp.core
Change-Id: I9be77772eae659d9ef18b23ea634b5d656366090
Signed-off-by: lj1412 <lji@research.att.com>
Diffstat (limited to 'ncomp-core-model')
183 files changed, 40261 insertions, 0 deletions
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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src/main/xcore"/> + <classpathentry kind="src" path="src/main/xcore-gen"/> + <classpathentry kind="src" path="src/main/java"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" output="target/test-classes" path="src/test/java"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="output" path="target/classes"/> +</classpath> 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 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>ncomp-core-model</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+ </natures>
+</projectDescription>
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 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated core -->
+ <package
+ uri="org.openecomp.ncomp.core"
+ class="org.openecomp.ncomp.core.CorePackage"
+ genModel="src/main/xcore/core.xcore"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated function -->
+ <package
+ uri="org.openecomp.ncomp.core.function"
+ class="org.openecomp.ncomp.core.function.FunctionPackage"
+ genModel="src/main/xcore/function.xcore"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated metricOptions -->
+ <package
+ uri="org.openecomp.ncomp.core.metrics"
+ class="org.openecomp.ncomp.core.metrics.MetricsPackage"
+ genModel="src/main/xcore/metrics.xcore"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated logs -->
+ <package
+ uri="org.openecomp.ncomp.core.logs"
+ class="org.openecomp.ncomp.core.logs.LogsPackage"
+ genModel="src/main/xcore/logs.xcore"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated alerts -->
+ <package
+ uri="org.openecomp.ncomp.core.alerts"
+ class="org.openecomp.ncomp.core.alerts.AlertsPackage"
+ genModel="src/main/xcore/alerts.xcore"/>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated component -->
+ <package
+ uri="org.openecomp.ncomp.component"
+ class="org.openecomp.ncomp.component.ComponentPackage"
+ genModel="src/main/xcore/component.xcore"/>
+ </extension>
+
+</plugin>
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 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>org.openecomp.ncomp.core</groupId> + <artifactId>ncomp-core-model</artifactId> + <parent> + <groupId>org.openecomp.ncomp.maven</groupId> + <artifactId>ncomp-maven-xcore</artifactId> + <version>0.1.0-SNAPSHOT</version> + <relativePath>../../dcae-org.openecomp.ncomp.maven/ncomp-maven-xcore</relativePath> + </parent> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + + <pluginRepositories> + <!-- Black Duck plugin dependencies --> + <pluginRepository> + <id>JCenter</id> + <name>JCenter Repository</name> + <url>http://jcenter.bintray.com</url> + </pluginRepository> + + <pluginRepository> + <id>Restlet</id> + <name>Restlet Repository</name> + <url>http://maven.restlet.com</url> + </pluginRepository> + </pluginRepositories> +<build> + <sourceDirectory>src/main/xcore-gen</sourceDirectory> + <plugins> + <!-- blackduck maven plugin --> + <plugin> + <groupId>com.blackducksoftware.integration</groupId> + <artifactId>hub-maven-plugin</artifactId> + <version>1.4.0</version> + <inherited>false</inherited> + <configuration> + <hubProjectName>${project.name}</hubProjectName> + <outputDirectory>${project.basedir}</outputDirectory> + </configuration> + <executions> + <execution> + <id>create-bdio-file</id> + <phase>package</phase> + <goals> + <goal>createHubOutput</goal> + </goals> + </execution> + </executions> + </plugin> + <!-- site maven plugin --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-site-plugin</artifactId> + <version>3.6</version> + <dependencies> + <dependency> + <groupId>org.apache.maven.wagon</groupId> + <artifactId>wagon-webdav-jackrabbit</artifactId> + <version>2.10</version> + </dependency> + </dependencies> + </plugin> + + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.1</version> + <configuration> + <source /> + <target /> + </configuration> + </plugin> + </plugins> + + </build> + + <dependencies> + <dependency> + <groupId>org.openecomp.ncomp.core</groupId> + <artifactId>ncomp-core-types</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> +</project> 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Api</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.component.Api#getNumberOfRequests <em>Number Of Requests</em>}</li> + * <li>{@link org.openecomp.ncomp.component.Api#getNumberOfErrorRequests <em>Number Of Error Requests</em>}</li> + * <li>{@link org.openecomp.ncomp.component.Api#getNumberOfCompletedRequests <em>Number Of Completed Requests</em>}</li> + * <li>{@link org.openecomp.ncomp.component.Api#getOutstandingRequests <em>Outstanding Requests</em>}</li> + * <li>{@link org.openecomp.ncomp.component.Api#getLastRequestDuration <em>Last Request Duration</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.component.ComponentPackage#getApi() + * @model + * @generated + */ +public interface Api extends NamedEntity { + + /** + * Returns the value of the '<em><b>Number Of Requests</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Number Of Requests</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Number Of Requests</em>' 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 <em>Number Of Requests</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Number Of Requests</em>' attribute. + * @see #getNumberOfRequests() + * @generated + */ + void setNumberOfRequests(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the '<em><b>Number Of Error Requests</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Number Of Error Requests</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Number Of Error Requests</em>' 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 <em>Number Of Error Requests</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Number Of Error Requests</em>' attribute. + * @see #getNumberOfErrorRequests() + * @generated + */ + void setNumberOfErrorRequests(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the '<em><b>Number Of Completed Requests</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Number Of Completed Requests</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Number Of Completed Requests</em>' 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 <em>Number Of Completed Requests</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Number Of Completed Requests</em>' attribute. + * @see #getNumberOfCompletedRequests() + * @generated + */ + void setNumberOfCompletedRequests(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the '<em><b>Outstanding Requests</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Outstanding Requests</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Outstanding Requests</em>' 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 <em>Outstanding Requests</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Outstanding Requests</em>' attribute. + * @see #getOutstandingRequests() + * @generated + */ + void setOutstandingRequests(LongMetricAttribute value); + + /** + * Returns the value of the '<em><b>Last Request Duration</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Last Request Duration</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Last Request Duration</em>' 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 <em>Last Request Duration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Last Request Duration</em>' attribute. + * @see #getLastRequestDuration() + * @generated + */ + void setLastRequestDuration(LongMetricAttribute value); + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @model unique="false" + * @generated + */ + EList<ApiRequest> 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Api Request</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.component.ApiRequest#getComponentName <em>Component Name</em>}</li> + * <li>{@link org.openecomp.ncomp.component.ApiRequest#getResourcePath <em>Resource Path</em>}</li> + * <li>{@link org.openecomp.ncomp.component.ApiRequest#getTransactionId <em>Transaction Id</em>}</li> + * <li>{@link org.openecomp.ncomp.component.ApiRequest#getParentTransactionId <em>Parent Transaction Id</em>}</li> + * <li>{@link org.openecomp.ncomp.component.ApiRequest#getAction <em>Action</em>}</li> + * <li>{@link org.openecomp.ncomp.component.ApiRequest#getDuration <em>Duration</em>}</li> + * <li>{@link org.openecomp.ncomp.component.ApiRequest#getStatus <em>Status</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.component.ComponentPackage#getApiRequest() + * @model + * @generated + */ +public interface ApiRequest extends Event { + /** + * Returns the value of the '<em><b>Component Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Component Name</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Component Name</em>' 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 <em>Component Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Component Name</em>' attribute. + * @see #getComponentName() + * @generated + */ + void setComponentName(String value); + + /** + * Returns the value of the '<em><b>Resource Path</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Resource Path</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Resource Path</em>' 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 <em>Resource Path</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Resource Path</em>' attribute. + * @see #getResourcePath() + * @generated + */ + void setResourcePath(String value); + + /** + * Returns the value of the '<em><b>Transaction Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Transaction Id</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Transaction Id</em>' 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 <em>Transaction Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Transaction Id</em>' attribute. + * @see #getTransactionId() + * @generated + */ + void setTransactionId(String value); + + /** + * Returns the value of the '<em><b>Parent Transaction Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Parent Transaction Id</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Parent Transaction Id</em>' 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 <em>Parent Transaction Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Parent Transaction Id</em>' attribute. + * @see #getParentTransactionId() + * @generated + */ + void setParentTransactionId(String value); + + /** + * Returns the value of the '<em><b>Action</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Action</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Action</em>' 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 <em>Action</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Action</em>' attribute. + * @see #getAction() + * @generated + */ + void setAction(String value); + + /** + * Returns the value of the '<em><b>Duration</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Duration</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Duration</em>' 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 <em>Duration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Duration</em>' attribute. + * @see #getDuration() + * @generated + */ + void setDuration(Long value); + + /** + * Returns the value of the '<em><b>Status</b></em>' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.component.ApiRequestStatus}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Status</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Status</em>' 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 <em>Status</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Status</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the literals of the enumeration '<em><b>Api Request Status</b></em>', + * and utility methods for working with them. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.component.ComponentPackage#getApiRequestStatus() + * @model + * @generated + */ +public enum ApiRequestStatus implements Enumerator { + /** + * The '<em><b>OKAY</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #OKAY_VALUE + * @generated + * @ordered + */ + OKAY(0, "OKAY", "OKAY"), + + /** + * The '<em><b>ERROR</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #ERROR_VALUE + * @generated + * @ordered + */ + ERROR(0, "ERROR", "ERROR"), + + /** + * The '<em><b>INPROGRESS</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #INPROGRESS_VALUE + * @generated + * @ordered + */ + INPROGRESS(0, "INPROGRESS", "INPROGRESS"), /** + * The '<em><b>START</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #START_VALUE + * @generated + * @ordered + */ + START(0, "START", "START"); + + /** + * The '<em><b>OKAY</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>OKAY</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #OKAY + * @model + * @generated + * @ordered + */ + public static final int OKAY_VALUE = 0; + + /** + * The '<em><b>ERROR</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>ERROR</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #ERROR + * @model + * @generated + * @ordered + */ + public static final int ERROR_VALUE = 0; + + /** + * The '<em><b>INPROGRESS</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>INPROGRESS</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #INPROGRESS + * @model + * @generated + * @ordered + */ + public static final int INPROGRESS_VALUE = 0; + + /** + * The '<em><b>START</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>START</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #START + * @model + * @generated + * @ordered + */ + public static final int START_VALUE = 0; + + /** + * An array of all the '<em><b>Api Request Status</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static final ApiRequestStatus[] VALUES_ARRAY = + new ApiRequestStatus[] { + OKAY, + ERROR, + INPROGRESS, + START, + }; + + /** + * A public read-only list of all the '<em><b>Api Request Status</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static final List<ApiRequestStatus> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the '<em><b>Api Request Status</b></em>' literal with the specified literal value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Api Request Status</b></em>' literal with the specified name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Api Request Status</b></em>' literal with the specified integer value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static ApiRequestStatus get(int value) { + switch (value) { + case OKAY_VALUE: return OKAY; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private ApiRequestStatus(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Component</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.component.Component#getClasses <em>Classes</em>}</li> + * <li>{@link org.openecomp.ncomp.component.Component#getDroolsRuntimes <em>Drools Runtimes</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.component.ComponentPackage#getComponent() + * @model + * @generated + */ +public interface Component extends NamedEntity { + /** + * Returns the value of the '<em><b>Classes</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.component.ComponentClass}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Classes</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Classes</em>' containment reference list. + * @see org.openecomp.ncomp.component.ComponentPackage#getComponent_Classes() + * @model containment="true" + * @generated + */ + EList<ComponentClass> getClasses(); + + /** + * Returns the value of the '<em><b>Drools Runtimes</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.component.DroolsRuntime}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Drools Runtimes</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Drools Runtimes</em>' containment reference list. + * @see org.openecomp.ncomp.component.ComponentPackage#getComponent_DroolsRuntimes() + * @model containment="true" + * @generated + */ + EList<DroolsRuntime> 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Class</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.component.ComponentClass#getApis <em>Apis</em>}</li> + * <li>{@link org.openecomp.ncomp.component.ComponentClass#getNumberOfResources <em>Number Of Resources</em>}</li> + * <li>{@link org.openecomp.ncomp.component.ComponentClass#getNumberOfUpdateRequests <em>Number Of Update Requests</em>}</li> + * <li>{@link org.openecomp.ncomp.component.ComponentClass#getNumberOfCreateRequests <em>Number Of Create Requests</em>}</li> + * <li>{@link org.openecomp.ncomp.component.ComponentClass#getNumberOfDeleteRequests <em>Number Of Delete Requests</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.component.ComponentPackage#getComponentClass() + * @model + * @generated + */ +public interface ComponentClass extends NamedEntity { + /** + * Returns the value of the '<em><b>Apis</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.component.Api}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Apis</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Apis</em>' containment reference list. + * @see org.openecomp.ncomp.component.ComponentPackage#getComponentClass_Apis() + * @model containment="true" + * @generated + */ + EList<Api> getApis(); + + /** + * Returns the value of the '<em><b>Number Of Resources</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Number Of Resources</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Number Of Resources</em>' 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 <em>Number Of Resources</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Number Of Resources</em>' attribute. + * @see #getNumberOfResources() + * @generated + */ + void setNumberOfResources(LongMetricAttribute value); + + /** + * Returns the value of the '<em><b>Number Of Update Requests</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Number Of Update Requests</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Number Of Update Requests</em>' 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 <em>Number Of Update Requests</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Number Of Update Requests</em>' attribute. + * @see #getNumberOfUpdateRequests() + * @generated + */ + void setNumberOfUpdateRequests(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the '<em><b>Number Of Create Requests</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Number Of Create Requests</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Number Of Create Requests</em>' 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 <em>Number Of Create Requests</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Number Of Create Requests</em>' attribute. + * @see #getNumberOfCreateRequests() + * @generated + */ + void setNumberOfCreateRequests(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the '<em><b>Number Of Delete Requests</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Number Of Delete Requests</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Number Of Delete Requests</em>' 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 <em>Number Of Delete Requests</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Number Of Delete Requests</em>' 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; + +/** + * <!-- begin-user-doc --> + * The <b>Factory</b> for the model. + * It provides a create method for each non-abstract class of the model. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.component.ComponentPackage + * @generated + */ +public interface ComponentFactory extends EFactory { + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + ComponentFactory eINSTANCE = org.openecomp.ncomp.component.impl.ComponentFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Component</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Component</em>'. + * @generated + */ + Component createComponent(); + + /** + * Returns a new object of class '<em>Class</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Class</em>'. + * @generated + */ + ComponentClass createComponentClass(); + + /** + * Returns a new object of class '<em>Api</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Api</em>'. + * @generated + */ + Api createApi(); + + /** + * Returns a new object of class '<em>Api Request</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Api Request</em>'. + * @generated + */ + ApiRequest createApiRequest(); + + /** + * Returns a new object of class '<em>Drools Runtime</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Drools Runtime</em>'. + * @generated + */ + DroolsRuntime createDroolsRuntime(); + + /** + * Returns a new object of class '<em>Drools Rule</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Drools Rule</em>'. + * @generated + */ + DroolsRule createDroolsRule(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * The <b>Package</b> for the model. + * It contains accessors for the meta objects to represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNAME = "component"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.component"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_PREFIX = "component"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + ComponentPackage eINSTANCE = org.openecomp.ncomp.component.impl.ComponentPackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.ncomp.component.impl.ComponentImpl <em>Component</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.component.impl.ComponentImpl + * @see org.openecomp.ncomp.component.impl.ComponentPackageImpl#getComponent() + * @generated + */ + int COMPONENT = 0; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the '<em><b>Classes</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT__CLASSES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Drools Runtimes</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT__DROOLS_RUNTIMES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Component</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The number of operations of the '<em>Component</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Class</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT_CLASS__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT_CLASS__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT_CLASS__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT_CLASS__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the '<em><b>Apis</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT_CLASS__APIS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Number Of Resources</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT_CLASS__NUMBER_OF_RESOURCES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Number Of Update Requests</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT_CLASS__NUMBER_OF_UPDATE_REQUESTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Number Of Create Requests</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT_CLASS__NUMBER_OF_CREATE_REQUESTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Number Of Delete Requests</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT_CLASS__NUMBER_OF_DELETE_REQUESTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The number of structural features of the '<em>Class</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int COMPONENT_CLASS_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The number of operations of the '<em>Class</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Api</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.component.impl.ApiImpl + * @see org.openecomp.ncomp.component.impl.ComponentPackageImpl#getApi() + * @generated + */ + int API = 2; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int API__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int API__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int API__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int API__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the '<em><b>Number Of Requests</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int API__NUMBER_OF_REQUESTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Number Of Error Requests</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int API__NUMBER_OF_ERROR_REQUESTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Number Of Completed Requests</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int API__NUMBER_OF_COMPLETED_REQUESTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Outstanding Requests</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int API__OUTSTANDING_REQUESTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Last Request Duration</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int API__LAST_REQUEST_DURATION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The number of structural features of the '<em>Api</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int API_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The operation id for the '<em>Current Requests</em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int API___CURRENT_REQUESTS = CorePackage.NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The number of operations of the '<em>Api</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Api Request</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Component Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int API_REQUEST__COMPONENT_NAME = CorePackage.EVENT_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Resource Path</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int API_REQUEST__RESOURCE_PATH = CorePackage.EVENT_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Transaction Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int API_REQUEST__TRANSACTION_ID = CorePackage.EVENT_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Parent Transaction Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int API_REQUEST__PARENT_TRANSACTION_ID = CorePackage.EVENT_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Action</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int API_REQUEST__ACTION = CorePackage.EVENT_FEATURE_COUNT + 4; + + /** + * The feature id for the '<em><b>Duration</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int API_REQUEST__DURATION = CorePackage.EVENT_FEATURE_COUNT + 5; + + /** + * The feature id for the '<em><b>Status</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int API_REQUEST__STATUS = CorePackage.EVENT_FEATURE_COUNT + 6; + + /** + * The number of structural features of the '<em>Api Request</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int API_REQUEST_FEATURE_COUNT = CorePackage.EVENT_FEATURE_COUNT + 7; + + /** + * The number of operations of the '<em>Api Request</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Drools Runtime</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DROOLS_RUNTIME__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DROOLS_RUNTIME__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DROOLS_RUNTIME__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DROOLS_RUNTIME__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the '<em><b>Rules</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DROOLS_RUNTIME__RULES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Drools Runtime</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DROOLS_RUNTIME_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Drools Runtime</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Drools Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DROOLS_RULE__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DROOLS_RULE__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DROOLS_RULE__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DROOLS_RULE__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the '<em><b>Number Of Fires</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DROOLS_RULE__NUMBER_OF_FIRES = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Drools Rule</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DROOLS_RULE_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Drools Rule</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Api Request Status</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Drools Object Change</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Component</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Component</em>'. + * @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 <em>Classes</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Classes</em>'. + * @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 <em>Drools Runtimes</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Drools Runtimes</em>'. + * @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 <em>Class</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Class</em>'. + * @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 <em>Apis</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Apis</em>'. + * @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 <em>Number Of Resources</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Number Of Resources</em>'. + * @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 <em>Number Of Update Requests</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Number Of Update Requests</em>'. + * @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 <em>Number Of Create Requests</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Number Of Create Requests</em>'. + * @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 <em>Number Of Delete Requests</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Number Of Delete Requests</em>'. + * @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 <em>Api</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Api</em>'. + * @see org.openecomp.ncomp.component.Api + * @generated + */ + EClass getApi(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.component.Api#getNumberOfRequests <em>Number Of Requests</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Number Of Requests</em>'. + * @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 <em>Number Of Error Requests</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Number Of Error Requests</em>'. + * @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 <em>Number Of Completed Requests</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Number Of Completed Requests</em>'. + * @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 <em>Outstanding Requests</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Outstanding Requests</em>'. + * @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 <em>Last Request Duration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Last Request Duration</em>'. + * @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() <em>Current Requests</em>}' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the '<em>Current Requests</em>' operation. + * @see org.openecomp.ncomp.component.Api#currentRequests() + * @generated + */ + EOperation getApi__CurrentRequests(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.component.ApiRequest <em>Api Request</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Api Request</em>'. + * @see org.openecomp.ncomp.component.ApiRequest + * @generated + */ + EClass getApiRequest(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.component.ApiRequest#getComponentName <em>Component Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Component Name</em>'. + * @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 <em>Resource Path</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Resource Path</em>'. + * @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 <em>Transaction Id</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Transaction Id</em>'. + * @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 <em>Parent Transaction Id</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Parent Transaction Id</em>'. + * @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 <em>Action</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Action</em>'. + * @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 <em>Duration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Duration</em>'. + * @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 <em>Status</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Status</em>'. + * @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 <em>Drools Runtime</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Drools Runtime</em>'. + * @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 <em>Rules</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Rules</em>'. + * @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 <em>Drools Rule</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Drools Rule</em>'. + * @see org.openecomp.ncomp.component.DroolsRule + * @generated + */ + EClass getDroolsRule(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.component.DroolsRule#getNumberOfFires <em>Number Of Fires</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Number Of Fires</em>'. + * @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 <em>Api Request Status</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for enum '<em>Api Request Status</em>'. + * @see org.openecomp.ncomp.component.ApiRequestStatus + * @generated + */ + EEnum getApiRequestStatus(); + + /** + * Returns the meta object for enum '{@link org.openecomp.ncomp.component.DroolsObjectChange <em>Drools Object Change</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for enum '<em>Drools Object Change</em>'. + * @see org.openecomp.ncomp.component.DroolsObjectChange + * @generated + */ + EEnum getDroolsObjectChange(); + + /** + * Returns the factory that creates the instances of the model. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the factory that creates the instances of the model. + * @generated + */ + ComponentFactory getComponentFactory(); + + /** + * <!-- begin-user-doc --> + * Defines literals for the meta objects that represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.component.impl.ComponentImpl <em>Component</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Classes</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COMPONENT__CLASSES = eINSTANCE.getComponent_Classes(); + + /** + * The meta object literal for the '<em><b>Drools Runtimes</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COMPONENT__DROOLS_RUNTIMES = eINSTANCE.getComponent_DroolsRuntimes(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.component.impl.ComponentClassImpl <em>Class</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Apis</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference COMPONENT_CLASS__APIS = eINSTANCE.getComponentClass_Apis(); + + /** + * The meta object literal for the '<em><b>Number Of Resources</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COMPONENT_CLASS__NUMBER_OF_RESOURCES = eINSTANCE.getComponentClass_NumberOfResources(); + + /** + * The meta object literal for the '<em><b>Number Of Update Requests</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COMPONENT_CLASS__NUMBER_OF_UPDATE_REQUESTS = eINSTANCE.getComponentClass_NumberOfUpdateRequests(); + + /** + * The meta object literal for the '<em><b>Number Of Create Requests</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COMPONENT_CLASS__NUMBER_OF_CREATE_REQUESTS = eINSTANCE.getComponentClass_NumberOfCreateRequests(); + + /** + * The meta object literal for the '<em><b>Number Of Delete Requests</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute COMPONENT_CLASS__NUMBER_OF_DELETE_REQUESTS = eINSTANCE.getComponentClass_NumberOfDeleteRequests(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.component.impl.ApiImpl <em>Api</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Number Of Requests</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute API__NUMBER_OF_REQUESTS = eINSTANCE.getApi_NumberOfRequests(); + + /** + * The meta object literal for the '<em><b>Number Of Error Requests</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute API__NUMBER_OF_ERROR_REQUESTS = eINSTANCE.getApi_NumberOfErrorRequests(); + + /** + * The meta object literal for the '<em><b>Number Of Completed Requests</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute API__NUMBER_OF_COMPLETED_REQUESTS = eINSTANCE.getApi_NumberOfCompletedRequests(); + + /** + * The meta object literal for the '<em><b>Outstanding Requests</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute API__OUTSTANDING_REQUESTS = eINSTANCE.getApi_OutstandingRequests(); + + /** + * The meta object literal for the '<em><b>Last Request Duration</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute API__LAST_REQUEST_DURATION = eINSTANCE.getApi_LastRequestDuration(); + + /** + * The meta object literal for the '<em><b>Current Requests</b></em>' operation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EOperation API___CURRENT_REQUESTS = eINSTANCE.getApi__CurrentRequests(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.component.impl.ApiRequestImpl <em>Api Request</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Component Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute API_REQUEST__COMPONENT_NAME = eINSTANCE.getApiRequest_ComponentName(); + + /** + * The meta object literal for the '<em><b>Resource Path</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute API_REQUEST__RESOURCE_PATH = eINSTANCE.getApiRequest_ResourcePath(); + + /** + * The meta object literal for the '<em><b>Transaction Id</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute API_REQUEST__TRANSACTION_ID = eINSTANCE.getApiRequest_TransactionId(); + + /** + * The meta object literal for the '<em><b>Parent Transaction Id</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute API_REQUEST__PARENT_TRANSACTION_ID = eINSTANCE.getApiRequest_ParentTransactionId(); + + /** + * The meta object literal for the '<em><b>Action</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute API_REQUEST__ACTION = eINSTANCE.getApiRequest_Action(); + + /** + * The meta object literal for the '<em><b>Duration</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute API_REQUEST__DURATION = eINSTANCE.getApiRequest_Duration(); + + /** + * The meta object literal for the '<em><b>Status</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute API_REQUEST__STATUS = eINSTANCE.getApiRequest_Status(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.component.impl.DroolsRuntimeImpl <em>Drools Runtime</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Rules</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference DROOLS_RUNTIME__RULES = eINSTANCE.getDroolsRuntime_Rules(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.component.impl.DroolsRuleImpl <em>Drools Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Number Of Fires</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute DROOLS_RULE__NUMBER_OF_FIRES = eINSTANCE.getDroolsRule_NumberOfFires(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.component.ApiRequestStatus <em>Api Request Status</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Drools Object Change</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * A representation of the literals of the enumeration '<em><b>Drools Object Change</b></em>', + * and utility methods for working with them. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.component.ComponentPackage#getDroolsObjectChange() + * @model + * @generated + */ +public enum DroolsObjectChange implements Enumerator { + /** + * The '<em><b>INSERTED</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #INSERTED_VALUE + * @generated + * @ordered + */ + INSERTED(0, "INSERTED", "INSERTED"), + + /** + * The '<em><b>DELETED</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #DELETED_VALUE + * @generated + * @ordered + */ + DELETED(0, "DELETED", "DELETED"), + + /** + * The '<em><b>UPDATED</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #UPDATED_VALUE + * @generated + * @ordered + */ + UPDATED(0, "UPDATED", "UPDATED"); + + /** + * The '<em><b>INSERTED</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>INSERTED</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #INSERTED + * @model + * @generated + * @ordered + */ + public static final int INSERTED_VALUE = 0; + + /** + * The '<em><b>DELETED</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>DELETED</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #DELETED + * @model + * @generated + * @ordered + */ + public static final int DELETED_VALUE = 0; + + /** + * The '<em><b>UPDATED</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>UPDATED</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #UPDATED + * @model + * @generated + * @ordered + */ + public static final int UPDATED_VALUE = 0; + + /** + * An array of all the '<em><b>Drools Object Change</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static final DroolsObjectChange[] VALUES_ARRAY = + new DroolsObjectChange[] { + INSERTED, + DELETED, + UPDATED, + }; + + /** + * A public read-only list of all the '<em><b>Drools Object Change</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static final List<DroolsObjectChange> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the '<em><b>Drools Object Change</b></em>' literal with the specified literal value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Drools Object Change</b></em>' literal with the specified name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Drools Object Change</b></em>' literal with the specified integer value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static DroolsObjectChange get(int value) { + switch (value) { + case INSERTED_VALUE: return INSERTED; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private DroolsObjectChange(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Drools Rule</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.component.DroolsRule#getNumberOfFires <em>Number Of Fires</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.component.ComponentPackage#getDroolsRule() + * @model + * @generated + */ +public interface DroolsRule extends NamedEntity { + /** + * Returns the value of the '<em><b>Number Of Fires</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Number Of Fires</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Number Of Fires</em>' 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 <em>Number Of Fires</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Number Of Fires</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Drools Runtime</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.component.DroolsRuntime#getRules <em>Rules</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.component.ComponentPackage#getDroolsRuntime() + * @model + * @generated + */ +public interface DroolsRuntime extends NamedEntity { + + /** + * Returns the value of the '<em><b>Rules</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.component.DroolsRule}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Rules</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Rules</em>' containment reference list. + * @see org.openecomp.ncomp.component.ComponentPackage#getDroolsRuntime_Rules() + * @model containment="true" + * @generated + */ + EList<DroolsRule> 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Resource</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.component.Resource#getSubResources <em>Sub Resources</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.component.ComponentPackage#getResource() + * @model + * @generated + */ +public interface Resource extends NamedEntity { + /** + * Returns the value of the '<em><b>Sub Resources</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.component.Resource}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Sub Resources</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Sub Resources</em>' containment reference list. + * @see org.openecomp.ncomp.component.ComponentPackage#getResource_SubResources() + * @model containment="true" + * @generated + */ + EList<Resource> 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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Api</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.component.impl.ApiImpl#getNumberOfRequests <em>Number Of Requests</em>}</li> + * <li>{@link org.openecomp.ncomp.component.impl.ApiImpl#getNumberOfErrorRequests <em>Number Of Error Requests</em>}</li> + * <li>{@link org.openecomp.ncomp.component.impl.ApiImpl#getNumberOfCompletedRequests <em>Number Of Completed Requests</em>}</li> + * <li>{@link org.openecomp.ncomp.component.impl.ApiImpl#getOutstandingRequests <em>Outstanding Requests</em>}</li> + * <li>{@link org.openecomp.ncomp.component.impl.ApiImpl#getLastRequestDuration <em>Last Request Duration</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class ApiImpl extends NamedEntityImpl implements Api { + /** + * The default value of the '{@link #getNumberOfRequests() <em>Number Of Requests</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumberOfRequests() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_OF_REQUESTS_EDEFAULT = null; + /** + * The cached value of the '{@link #getNumberOfRequests() <em>Number Of Requests</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumberOfRequests() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberOfRequests = NUMBER_OF_REQUESTS_EDEFAULT; + /** + * The default value of the '{@link #getNumberOfErrorRequests() <em>Number Of Error Requests</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumberOfErrorRequests() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_OF_ERROR_REQUESTS_EDEFAULT = null; + /** + * The cached value of the '{@link #getNumberOfErrorRequests() <em>Number Of Error Requests</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumberOfErrorRequests() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberOfErrorRequests = NUMBER_OF_ERROR_REQUESTS_EDEFAULT; + /** + * The default value of the '{@link #getNumberOfCompletedRequests() <em>Number Of Completed Requests</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumberOfCompletedRequests() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_OF_COMPLETED_REQUESTS_EDEFAULT = null; + /** + * The cached value of the '{@link #getNumberOfCompletedRequests() <em>Number Of Completed Requests</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumberOfCompletedRequests() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberOfCompletedRequests = NUMBER_OF_COMPLETED_REQUESTS_EDEFAULT; + /** + * The default value of the '{@link #getOutstandingRequests() <em>Outstanding Requests</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getOutstandingRequests() + * @generated + * @ordered + */ + protected static final LongMetricAttribute OUTSTANDING_REQUESTS_EDEFAULT = null; + /** + * The cached value of the '{@link #getOutstandingRequests() <em>Outstanding Requests</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getOutstandingRequests() + * @generated + * @ordered + */ + protected LongMetricAttribute outstandingRequests = OUTSTANDING_REQUESTS_EDEFAULT; + /** + * The default value of the '{@link #getLastRequestDuration() <em>Last Request Duration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLastRequestDuration() + * @generated + * @ordered + */ + protected static final LongMetricAttribute LAST_REQUEST_DURATION_EDEFAULT = null; + /** + * The cached value of the '{@link #getLastRequestDuration() <em>Last Request Duration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLastRequestDuration() + * @generated + * @ordered + */ + protected LongMetricAttribute lastRequestDuration = LAST_REQUEST_DURATION_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ApiImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ComponentPackage.Literals.API; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public IncreasingULongMetricAttribute getNumberOfRequests() { + return numberOfRequests; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public IncreasingULongMetricAttribute getNumberOfErrorRequests() { + return numberOfErrorRequests; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public IncreasingULongMetricAttribute getNumberOfCompletedRequests() { + return numberOfCompletedRequests; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LongMetricAttribute getOutstandingRequests() { + return outstandingRequests; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LongMetricAttribute getLastRequestDuration() { + return lastRequestDuration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<ApiRequest> currentRequests() { + // TODO: implement this method + // Ensure that you remove @generated or mark it @generated NOT + throw new UnsupportedOperationException(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Api Request</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.component.impl.ApiRequestImpl#getComponentName <em>Component Name</em>}</li> + * <li>{@link org.openecomp.ncomp.component.impl.ApiRequestImpl#getResourcePath <em>Resource Path</em>}</li> + * <li>{@link org.openecomp.ncomp.component.impl.ApiRequestImpl#getTransactionId <em>Transaction Id</em>}</li> + * <li>{@link org.openecomp.ncomp.component.impl.ApiRequestImpl#getParentTransactionId <em>Parent Transaction Id</em>}</li> + * <li>{@link org.openecomp.ncomp.component.impl.ApiRequestImpl#getAction <em>Action</em>}</li> + * <li>{@link org.openecomp.ncomp.component.impl.ApiRequestImpl#getDuration <em>Duration</em>}</li> + * <li>{@link org.openecomp.ncomp.component.impl.ApiRequestImpl#getStatus <em>Status</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class ApiRequestImpl extends EventImpl implements ApiRequest { + /** + * The default value of the '{@link #getComponentName() <em>Component Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getComponentName() + * @generated + * @ordered + */ + protected static final String COMPONENT_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getComponentName() <em>Component Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getComponentName() + * @generated + * @ordered + */ + protected String componentName = COMPONENT_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getResourcePath() <em>Resource Path</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getResourcePath() + * @generated + * @ordered + */ + protected static final String RESOURCE_PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getResourcePath() <em>Resource Path</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getResourcePath() + * @generated + * @ordered + */ + protected String resourcePath = RESOURCE_PATH_EDEFAULT; + + /** + * The default value of the '{@link #getTransactionId() <em>Transaction Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTransactionId() + * @generated + * @ordered + */ + protected static final String TRANSACTION_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getTransactionId() <em>Transaction Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTransactionId() + * @generated + * @ordered + */ + protected String transactionId = TRANSACTION_ID_EDEFAULT; + + /** + * The default value of the '{@link #getParentTransactionId() <em>Parent Transaction Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getParentTransactionId() + * @generated + * @ordered + */ + protected static final String PARENT_TRANSACTION_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getParentTransactionId() <em>Parent Transaction Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getParentTransactionId() + * @generated + * @ordered + */ + protected String parentTransactionId = PARENT_TRANSACTION_ID_EDEFAULT; + + /** + * The default value of the '{@link #getAction() <em>Action</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAction() + * @generated + * @ordered + */ + protected static final String ACTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getAction() <em>Action</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAction() + * @generated + * @ordered + */ + protected String action = ACTION_EDEFAULT; + + /** + * The default value of the '{@link #getDuration() <em>Duration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDuration() + * @generated + * @ordered + */ + protected static final Long DURATION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDuration() <em>Duration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDuration() + * @generated + * @ordered + */ + protected Long duration = DURATION_EDEFAULT; + + /** + * The default value of the '{@link #getStatus() <em>Status</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getStatus() + * @generated + * @ordered + */ + protected static final ApiRequestStatus STATUS_EDEFAULT = ApiRequestStatus.OKAY; + + /** + * The cached value of the '{@link #getStatus() <em>Status</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getStatus() + * @generated + * @ordered + */ + protected ApiRequestStatus status = STATUS_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ApiRequestImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ComponentPackage.Literals.API_REQUEST; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getComponentName() { + return componentName; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getResourcePath() { + return resourcePath; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getTransactionId() { + return transactionId; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getParentTransactionId() { + return parentTransactionId; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getAction() { + return action; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Long getDuration() { + return duration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ApiRequestStatus getStatus() { + return status; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Class</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.component.impl.ComponentClassImpl#getApis <em>Apis</em>}</li> + * <li>{@link org.openecomp.ncomp.component.impl.ComponentClassImpl#getNumberOfResources <em>Number Of Resources</em>}</li> + * <li>{@link org.openecomp.ncomp.component.impl.ComponentClassImpl#getNumberOfUpdateRequests <em>Number Of Update Requests</em>}</li> + * <li>{@link org.openecomp.ncomp.component.impl.ComponentClassImpl#getNumberOfCreateRequests <em>Number Of Create Requests</em>}</li> + * <li>{@link org.openecomp.ncomp.component.impl.ComponentClassImpl#getNumberOfDeleteRequests <em>Number Of Delete Requests</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class ComponentClassImpl extends NamedEntityImpl implements ComponentClass { + /** + * The cached value of the '{@link #getApis() <em>Apis</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getApis() + * @generated + * @ordered + */ + protected EList<Api> apis; + + /** + * The default value of the '{@link #getNumberOfResources() <em>Number Of Resources</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumberOfResources() + * @generated + * @ordered + */ + protected static final LongMetricAttribute NUMBER_OF_RESOURCES_EDEFAULT = null; + /** + * The cached value of the '{@link #getNumberOfResources() <em>Number Of Resources</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumberOfResources() + * @generated + * @ordered + */ + protected LongMetricAttribute numberOfResources = NUMBER_OF_RESOURCES_EDEFAULT; + /** + * The default value of the '{@link #getNumberOfUpdateRequests() <em>Number Of Update Requests</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumberOfUpdateRequests() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_OF_UPDATE_REQUESTS_EDEFAULT = null; + /** + * The cached value of the '{@link #getNumberOfUpdateRequests() <em>Number Of Update Requests</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumberOfUpdateRequests() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberOfUpdateRequests = NUMBER_OF_UPDATE_REQUESTS_EDEFAULT; + /** + * The default value of the '{@link #getNumberOfCreateRequests() <em>Number Of Create Requests</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumberOfCreateRequests() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_OF_CREATE_REQUESTS_EDEFAULT = null; + /** + * The cached value of the '{@link #getNumberOfCreateRequests() <em>Number Of Create Requests</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumberOfCreateRequests() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberOfCreateRequests = NUMBER_OF_CREATE_REQUESTS_EDEFAULT; + /** + * The default value of the '{@link #getNumberOfDeleteRequests() <em>Number Of Delete Requests</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumberOfDeleteRequests() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_OF_DELETE_REQUESTS_EDEFAULT = null; + /** + * The cached value of the '{@link #getNumberOfDeleteRequests() <em>Number Of Delete Requests</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumberOfDeleteRequests() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberOfDeleteRequests = NUMBER_OF_DELETE_REQUESTS_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ComponentClassImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ComponentPackage.Literals.COMPONENT_CLASS; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<Api> getApis() { + if (apis == null) { + apis = new EObjectContainmentEList<Api>(Api.class, this, ComponentPackage.COMPONENT_CLASS__APIS); + } + return apis; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LongMetricAttribute getNumberOfResources() { + return numberOfResources; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public IncreasingULongMetricAttribute getNumberOfUpdateRequests() { + return numberOfUpdateRequests; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public IncreasingULongMetricAttribute getNumberOfCreateRequests() { + return numberOfCreateRequests; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public IncreasingULongMetricAttribute getNumberOfDeleteRequests() { + return numberOfDeleteRequests; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ComponentPackage.COMPONENT_CLASS__APIS: + getApis().clear(); + getApis().addAll((Collection<? extends Api>)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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Factory</b>. + * <!-- end-user-doc --> + * @generated + */ +public class ComponentFactoryImpl extends EFactoryImpl implements ComponentFactory { + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ComponentFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Component createComponent() { + ComponentImpl component = new ComponentImpl(); + return component; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ComponentClass createComponentClass() { + ComponentClassImpl componentClass = new ComponentClassImpl(); + return componentClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Api createApi() { + ApiImpl api = new ApiImpl(); + return api; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ApiRequest createApiRequest() { + ApiRequestImpl apiRequest = new ApiRequestImpl(); + return apiRequest; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DroolsRuntime createDroolsRuntime() { + DroolsRuntimeImpl droolsRuntime = new DroolsRuntimeImpl(); + return droolsRuntime; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DroolsRule createDroolsRule() { + DroolsRuleImpl droolsRule = new DroolsRuleImpl(); + return droolsRule; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertApiRequestStatusToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertDroolsObjectChangeToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ComponentPackage getComponentPackage() { + return (ComponentPackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Component</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.component.impl.ComponentImpl#getClasses <em>Classes</em>}</li> + * <li>{@link org.openecomp.ncomp.component.impl.ComponentImpl#getDroolsRuntimes <em>Drools Runtimes</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class ComponentImpl extends NamedEntityImpl implements Component { + /** + * The cached value of the '{@link #getClasses() <em>Classes</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getClasses() + * @generated + * @ordered + */ + protected EList<ComponentClass> classes; + /** + * The cached value of the '{@link #getDroolsRuntimes() <em>Drools Runtimes</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDroolsRuntimes() + * @generated + * @ordered + */ + protected EList<DroolsRuntime> droolsRuntimes; + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ComponentImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ComponentPackage.Literals.COMPONENT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<ComponentClass> getClasses() { + if (classes == null) { + classes = new EObjectContainmentEList<ComponentClass>(ComponentClass.class, this, ComponentPackage.COMPONENT__CLASSES); + } + return classes; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<DroolsRuntime> getDroolsRuntimes() { + if (droolsRuntimes == null) { + droolsRuntimes = new EObjectContainmentEList<DroolsRuntime>(DroolsRuntime.class, this, ComponentPackage.COMPONENT__DROOLS_RUNTIMES); + } + return droolsRuntimes; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ComponentPackage.COMPONENT__CLASSES: + getClasses().clear(); + getClasses().addAll((Collection<? extends ComponentClass>)newValue); + return; + case ComponentPackage.COMPONENT__DROOLS_RUNTIMES: + getDroolsRuntimes().clear(); + getDroolsRuntimes().addAll((Collection<? extends DroolsRuntime>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * @generated + */ +public class ComponentPackageImpl extends EPackageImpl implements ComponentPackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass componentEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass componentClassEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass apiEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass apiRequestEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass droolsRuntimeEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass droolsRuleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum apiRequestStatusEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum droolsObjectChangeEEnum = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + * <p>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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. + * + * <p>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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getComponent() { + return componentEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getComponent_Classes() { + return (EReference)componentEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getComponent_DroolsRuntimes() { + return (EReference)componentEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getComponentClass() { + return componentClassEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getComponentClass_Apis() { + return (EReference)componentClassEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getComponentClass_NumberOfResources() { + return (EAttribute)componentClassEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getComponentClass_NumberOfUpdateRequests() { + return (EAttribute)componentClassEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getComponentClass_NumberOfCreateRequests() { + return (EAttribute)componentClassEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getComponentClass_NumberOfDeleteRequests() { + return (EAttribute)componentClassEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getApi() { + return apiEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getApi_NumberOfRequests() { + return (EAttribute)apiEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getApi_NumberOfErrorRequests() { + return (EAttribute)apiEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getApi_NumberOfCompletedRequests() { + return (EAttribute)apiEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getApi_OutstandingRequests() { + return (EAttribute)apiEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getApi_LastRequestDuration() { + return (EAttribute)apiEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EOperation getApi__CurrentRequests() { + return apiEClass.getEOperations().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getApiRequest() { + return apiRequestEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getApiRequest_ComponentName() { + return (EAttribute)apiRequestEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getApiRequest_ResourcePath() { + return (EAttribute)apiRequestEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getApiRequest_TransactionId() { + return (EAttribute)apiRequestEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getApiRequest_ParentTransactionId() { + return (EAttribute)apiRequestEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getApiRequest_Action() { + return (EAttribute)apiRequestEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getApiRequest_Duration() { + return (EAttribute)apiRequestEClass.getEStructuralFeatures().get(5); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getApiRequest_Status() { + return (EAttribute)apiRequestEClass.getEStructuralFeatures().get(6); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getDroolsRuntime() { + return droolsRuntimeEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getDroolsRuntime_Rules() { + return (EReference)droolsRuntimeEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getDroolsRule() { + return droolsRuleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getDroolsRule_NumberOfFires() { + return (EAttribute)droolsRuleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getApiRequestStatus() { + return apiRequestStatusEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getDroolsObjectChange() { + return droolsObjectChangeEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ComponentFactory getComponentFactory() { + return (ComponentFactory)getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Drools Rule</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.component.impl.DroolsRuleImpl#getNumberOfFires <em>Number Of Fires</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class DroolsRuleImpl extends NamedEntityImpl implements DroolsRule { + /** + * The default value of the '{@link #getNumberOfFires() <em>Number Of Fires</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumberOfFires() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUMBER_OF_FIRES_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNumberOfFires() <em>Number Of Fires</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumberOfFires() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numberOfFires = NUMBER_OF_FIRES_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected DroolsRuleImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ComponentPackage.Literals.DROOLS_RULE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public IncreasingULongMetricAttribute getNumberOfFires() { + return numberOfFires; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Drools Runtime</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.component.impl.DroolsRuntimeImpl#getRules <em>Rules</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class DroolsRuntimeImpl extends NamedEntityImpl implements DroolsRuntime { + /** + * The cached value of the '{@link #getRules() <em>Rules</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRules() + * @generated + * @ordered + */ + protected EList<DroolsRule> rules; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected DroolsRuntimeImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return ComponentPackage.Literals.DROOLS_RUNTIME; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<DroolsRule> getRules() { + if (rules == null) { + rules = new EObjectContainmentEList<DroolsRule>(DroolsRule.class, this, ComponentPackage.DROOLS_RUNTIME__RULES); + } + return rules; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case ComponentPackage.DROOLS_RUNTIME__RULES: + getRules().clear(); + getRules().addAll((Collection<? extends DroolsRule>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case ComponentPackage.DROOLS_RUNTIME__RULES: + getRules().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * The <b>Adapter Factory</b> for the model. + * It provides an adapter <code>createXXX</code> method for each class of the model. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.component.ComponentPackage + * @generated + */ +public class ComponentAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static ComponentPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ComponentAdapterFactory() { + if (modelPackage == null) { + modelPackage = ComponentPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * <!-- begin-user-doc --> + * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. + * <!-- end-user-doc --> + * @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 <code>createXXX</code> methods. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ComponentSwitch<Adapter> modelSwitch = + new ComponentSwitch<Adapter>() { + @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 <code>target</code>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param target the object to adapt. + * @return the adapter for the <code>target</code>. + * @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 <em>Component</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Class</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Api</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Api Request</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Drools Runtime</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Drools Rule</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Named Entity</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Event</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.ncomp.core.Event + * @generated + */ + public Adapter createEventAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * <!-- begin-user-doc --> + * This default implementation returns null. + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * The <b>Switch</b> for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the <code>caseXXX</code> 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. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.component.ComponentPackage + * @generated + */ +public class ComponentSwitch<T> extends Switch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static ComponentPackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ComponentSwitch() { + if (modelPackage == null) { + modelPackage = ComponentPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the first non-null result returned by a <code>caseXXX</code> 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 '<em>Component</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Component</em>'. + * @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 '<em>Class</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Class</em>'. + * @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 '<em>Api</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Api</em>'. + * @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 '<em>Api Request</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Api Request</em>'. + * @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 '<em>Drools Runtime</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Drools Runtime</em>'. + * @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 '<em>Drools Rule</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Drools Rule</em>'. + * @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 '<em>Named Entity</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Named Entity</em>'. + * @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 '<em>Event</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Event</em>'. + * @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 '<em>EObject</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EObject</em>'. + * @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; + +/** + * <!-- begin-user-doc --> + * The <b>Factory</b> for the model. + * It provides a create method for each non-abstract class of the model. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.CorePackage + * @generated + */ +public interface CoreFactory extends EFactory { + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + CoreFactory eINSTANCE = org.openecomp.ncomp.core.impl.CoreFactoryImpl.init(); + + /** + * Returns a new object of class '<em>User</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>User</em>'. + * @generated + */ + User createUser(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * The <b>Package</b> for the model. + * It contains accessors for the meta objects to represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNAME = "core"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.core"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_PREFIX = "core"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + CorePackage eINSTANCE = org.openecomp.ncomp.core.impl.CorePackageImpl.init(); + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.impl.NamedEntityImpl <em>Named Entity</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int NAMED_ENTITY__NAME = 0; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int NAMED_ENTITY__LAST_POLLED = 1; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int NAMED_ENTITY__LAST_CHANGED = 2; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int NAMED_ENTITY__CREATED = 3; + + /** + * The number of structural features of the '<em>Named Entity</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int NAMED_ENTITY_FEATURE_COUNT = 4; + + /** + * The number of operations of the '<em>Named Entity</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int NAMED_ENTITY_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.impl.EventImpl <em>Event</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em>Event</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int EVENT_FEATURE_COUNT = 0; + + /** + * The number of operations of the '<em>Event</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int EVENT_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.impl.HasOperationalStateImpl <em>Has Operational State</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Operational State</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int HAS_OPERATIONAL_STATE__OPERATIONAL_STATE = 0; + + /** + * The number of structural features of the '<em>Has Operational State</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int HAS_OPERATIONAL_STATE_FEATURE_COUNT = 1; + + /** + * The number of operations of the '<em>Has Operational State</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int HAS_OPERATIONAL_STATE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.impl.UserImpl <em>User</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.impl.UserImpl + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getUser() + * @generated + */ + int USER = 3; + + /** + * The feature id for the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int USER__NAME = NAMED_ENTITY__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int USER__LAST_POLLED = NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int USER__LAST_CHANGED = NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int USER__CREATED = NAMED_ENTITY__CREATED; + + /** + * The feature id for the '<em><b>Public Key</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int USER__PUBLIC_KEY = NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Deployment Status</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int USER__DEPLOYMENT_STATUS = NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>User</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int USER_FEATURE_COUNT = NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The number of operations of the '<em>User</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int USER_OPERATION_COUNT = NAMED_ENTITY_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.OperationalState <em>Operational State</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Deployment Status</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em>Json Object</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.json.JSONObject + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getJsonObject() + * @generated + */ + int JSON_OBJECT = 6; + + /** + * The meta object id for the '<em>Remote Context</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.json.JSONObject + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getRemoteContext() + * @generated + */ + int REMOTE_CONTEXT = 7; + + /** + * The meta object id for the '<em>Increasing ULong Metric Attribute</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em>Long Metric Attribute</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em>Double Metric Attribute</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em>String Metric Attribute</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em>Date Metric Attribute</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Named Entity</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Named Entity</em>'. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + EClass getNamedEntity(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.NamedEntity#getName <em>Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Name</em>'. + * @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 <em>Last Polled</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Last Polled</em>'. + * @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 <em>Last Changed</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Last Changed</em>'. + * @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 <em>Created</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Created</em>'. + * @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 <em>Event</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Event</em>'. + * @see org.openecomp.ncomp.core.Event + * @generated + */ + EClass getEvent(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.HasOperationalState <em>Has Operational State</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Has Operational State</em>'. + * @see org.openecomp.ncomp.core.HasOperationalState + * @generated + */ + EClass getHasOperationalState(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.HasOperationalState#getOperationalState <em>Operational State</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Operational State</em>'. + * @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 <em>User</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>User</em>'. + * @see org.openecomp.ncomp.core.User + * @generated + */ + EClass getUser(); + + /** + * Returns the meta object for the attribute '{@link org.openecomp.ncomp.core.User#getPublicKey <em>Public Key</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Public Key</em>'. + * @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 <em>Deployment Status</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Deployment Status</em>'. + * @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 <em>Operational State</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for enum '<em>Operational State</em>'. + * @see org.openecomp.ncomp.core.OperationalState + * @generated + */ + EEnum getOperationalState(); + + /** + * Returns the meta object for enum '{@link org.openecomp.ncomp.core.DeploymentStatus <em>Deployment Status</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for enum '<em>Deployment Status</em>'. + * @see org.openecomp.ncomp.core.DeploymentStatus + * @generated + */ + EEnum getDeploymentStatus(); + + /** + * Returns the meta object for data type '{@link org.json.JSONObject <em>Json Object</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for data type '<em>Json Object</em>'. + * @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 <em>Remote Context</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for data type '<em>Remote Context</em>'. + * @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 <em>Increasing ULong Metric Attribute</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for data type '<em>Increasing ULong Metric Attribute</em>'. + * @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 <em>Long Metric Attribute</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for data type '<em>Long Metric Attribute</em>'. + * @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 <em>Double Metric Attribute</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for data type '<em>Double Metric Attribute</em>'. + * @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 <em>String Metric Attribute</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for data type '<em>String Metric Attribute</em>'. + * @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 <em>Date Metric Attribute</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for data type '<em>Date Metric Attribute</em>'. + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the factory that creates the instances of the model. + * @generated + */ + CoreFactory getCoreFactory(); + + /** + * <!-- begin-user-doc --> + * Defines literals for the meta objects that represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.impl.NamedEntityImpl <em>Named Entity</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute NAMED_ENTITY__NAME = eINSTANCE.getNamedEntity_Name(); + + /** + * The meta object literal for the '<em><b>Last Polled</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute NAMED_ENTITY__LAST_POLLED = eINSTANCE.getNamedEntity_LastPolled(); + + /** + * The meta object literal for the '<em><b>Last Changed</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute NAMED_ENTITY__LAST_CHANGED = eINSTANCE.getNamedEntity_LastChanged(); + + /** + * The meta object literal for the '<em><b>Created</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute NAMED_ENTITY__CREATED = eINSTANCE.getNamedEntity_Created(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.impl.EventImpl <em>Event</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Has Operational State</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Operational State</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute HAS_OPERATIONAL_STATE__OPERATIONAL_STATE = eINSTANCE.getHasOperationalState_OperationalState(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.impl.UserImpl <em>User</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Public Key</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute USER__PUBLIC_KEY = eINSTANCE.getUser_PublicKey(); + + /** + * The meta object literal for the '<em><b>Deployment Status</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute USER__DEPLOYMENT_STATUS = eINSTANCE.getUser_DeploymentStatus(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.OperationalState <em>Operational State</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Deployment Status</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em>Json Object</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.json.JSONObject + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getJsonObject() + * @generated + */ + EDataType JSON_OBJECT = eINSTANCE.getJsonObject(); + + /** + * The meta object literal for the '<em>Remote Context</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see org.json.JSONObject + * @see org.openecomp.ncomp.core.impl.CorePackageImpl#getRemoteContext() + * @generated + */ + EDataType REMOTE_CONTEXT = eINSTANCE.getRemoteContext(); + + /** + * The meta object literal for the '<em>Increasing ULong Metric Attribute</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em>Long Metric Attribute</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em>Double Metric Attribute</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em>String Metric Attribute</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em>Date Metric Attribute</em>' data type. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * A representation of the literals of the enumeration '<em><b>Deployment Status</b></em>', + * and utility methods for working with them. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.CorePackage#getDeploymentStatus() + * @model + * @generated + */ +public enum DeploymentStatus implements Enumerator { + /** + * The '<em><b>UNDEPLOYED</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #UNDEPLOYED_VALUE + * @generated + * @ordered + */ + UNDEPLOYED(0, "UNDEPLOYED", "UNDEPLOYED"), + + /** + * The '<em><b>DEPLOYED</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #DEPLOYED_VALUE + * @generated + * @ordered + */ + DEPLOYED(0, "DEPLOYED", "DEPLOYED"), + + /** + * The '<em><b>DEPLOYED PARTIALLY</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #DEPLOYED_PARTIALLY_VALUE + * @generated + * @ordered + */ + DEPLOYED_PARTIALLY(0, "DEPLOYED_PARTIALLY", "DEPLOYED_PARTIALLY"), + + /** + * The '<em><b>DEPLOYED ERRORS</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #DEPLOYED_ERRORS_VALUE + * @generated + * @ordered + */ + DEPLOYED_ERRORS(0, "DEPLOYED_ERRORS", "DEPLOYED_ERRORS"); + + /** + * The '<em><b>UNDEPLOYED</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>UNDEPLOYED</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #UNDEPLOYED + * @model + * @generated + * @ordered + */ + public static final int UNDEPLOYED_VALUE = 0; + + /** + * The '<em><b>DEPLOYED</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>DEPLOYED</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #DEPLOYED + * @model + * @generated + * @ordered + */ + public static final int DEPLOYED_VALUE = 0; + + /** + * The '<em><b>DEPLOYED PARTIALLY</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>DEPLOYED PARTIALLY</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #DEPLOYED_PARTIALLY + * @model + * @generated + * @ordered + */ + public static final int DEPLOYED_PARTIALLY_VALUE = 0; + + /** + * The '<em><b>DEPLOYED ERRORS</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>DEPLOYED ERRORS</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #DEPLOYED_ERRORS + * @model + * @generated + * @ordered + */ + public static final int DEPLOYED_ERRORS_VALUE = 0; + + /** + * An array of all the '<em><b>Deployment Status</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static final DeploymentStatus[] VALUES_ARRAY = + new DeploymentStatus[] { + UNDEPLOYED, + DEPLOYED, + DEPLOYED_PARTIALLY, + DEPLOYED_ERRORS, + }; + + /** + * A public read-only list of all the '<em><b>Deployment Status</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static final List<DeploymentStatus> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the '<em><b>Deployment Status</b></em>' literal with the specified literal value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Deployment Status</b></em>' literal with the specified name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Deployment Status</b></em>' literal with the specified integer value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static DeploymentStatus get(int value) { + switch (value) { + case UNDEPLOYED_VALUE: return UNDEPLOYED; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private DeploymentStatus(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Event</b></em>'. + * <!-- end-user-doc --> + * + * + * @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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Has Operational State</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.HasOperationalState#getOperationalState <em>Operational State</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.CorePackage#getHasOperationalState() + * @model abstract="true" + * @generated + */ +public interface HasOperationalState extends EObject { + /** + * Returns the value of the '<em><b>Operational State</b></em>' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.OperationalState}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Operational State</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Operational State</em>' 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 <em>Operational State</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Operational State</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the literals of the enumeration '<em><b>Log Level</b></em>', + * and utility methods for working with them. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.CorePackage#getLogLevel() + * @model + * @generated + */ +public enum LogLevel implements Enumerator { + /** + * The '<em><b>UNKNOWN</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #UNKNOWN_VALUE + * @generated + * @ordered + */ + UNKNOWN(0, "UNKNOWN", "UNKNOWN"), + + /** + * The '<em><b>TRACE</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #TRACE_VALUE + * @generated + * @ordered + */ + TRACE(0, "TRACE", "TRACE"), + + /** + * The '<em><b>DEBUG</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #DEBUG_VALUE + * @generated + * @ordered + */ + DEBUG(0, "DEBUG", "DEBUG"), + + /** + * The '<em><b>INFO</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #INFO_VALUE + * @generated + * @ordered + */ + INFO(0, "INFO", "INFO"), + + /** + * The '<em><b>WARN</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #WARN_VALUE + * @generated + * @ordered + */ + WARN(0, "WARN", "WARN"), + + /** + * The '<em><b>ERROR</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #ERROR_VALUE + * @generated + * @ordered + */ + ERROR(0, "ERROR", "ERROR"), + + /** + * The '<em><b>FATAL</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #FATAL_VALUE + * @generated + * @ordered + */ + FATAL(0, "FATAL", "FATAL"); + + /** + * The '<em><b>UNKNOWN</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>UNKNOWN</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #UNKNOWN + * @model + * @generated + * @ordered + */ + public static final int UNKNOWN_VALUE = 0; + + /** + * The '<em><b>TRACE</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>TRACE</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #TRACE + * @model + * @generated + * @ordered + */ + public static final int TRACE_VALUE = 0; + + /** + * The '<em><b>DEBUG</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>DEBUG</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #DEBUG + * @model + * @generated + * @ordered + */ + public static final int DEBUG_VALUE = 0; + + /** + * The '<em><b>INFO</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>INFO</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #INFO + * @model + * @generated + * @ordered + */ + public static final int INFO_VALUE = 0; + + /** + * The '<em><b>WARN</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>WARN</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #WARN + * @model + * @generated + * @ordered + */ + public static final int WARN_VALUE = 0; + + /** + * The '<em><b>ERROR</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>ERROR</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #ERROR + * @model + * @generated + * @ordered + */ + public static final int ERROR_VALUE = 0; + + /** + * The '<em><b>FATAL</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>FATAL</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #FATAL + * @model + * @generated + * @ordered + */ + public static final int FATAL_VALUE = 0; + + /** + * An array of all the '<em><b>Log Level</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static final LogLevel[] VALUES_ARRAY = + new LogLevel[] { + UNKNOWN, + TRACE, + DEBUG, + INFO, + WARN, + ERROR, + FATAL, + }; + + /** + * A public read-only list of all the '<em><b>Log Level</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static final List<LogLevel> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the '<em><b>Log Level</b></em>' literal with the specified literal value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Log Level</b></em>' literal with the specified name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Log Level</b></em>' literal with the specified integer value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static LogLevel get(int value) { + switch (value) { + case UNKNOWN_VALUE: return UNKNOWN; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private LogLevel(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * A representation of the literals of the enumeration '<em><b>Log Severity</b></em>', + * and utility methods for working with them. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.CorePackage#getLogSeverity() + * @model + * @generated + */ +public enum LogSeverity implements Enumerator { + /** + * The '<em><b>UNKNOWN</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #UNKNOWN_VALUE + * @generated + * @ordered + */ + UNKNOWN(0, "UNKNOWN", "UNKNOWN"), + + /** + * The '<em><b>SEV1</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #SEV1_VALUE + * @generated + * @ordered + */ + SEV1(0, "SEV1", "SEV1"), + + /** + * The '<em><b>SEV2</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #SEV2_VALUE + * @generated + * @ordered + */ + SEV2(0, "SEV2", "SEV2"), + + /** + * The '<em><b>SEV3</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #SEV3_VALUE + * @generated + * @ordered + */ + SEV3(0, "SEV3", "SEV3"), + + /** + * The '<em><b>SEV4</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #SEV4_VALUE + * @generated + * @ordered + */ + SEV4(0, "SEV4", "SEV4"); + + /** + * The '<em><b>UNKNOWN</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>UNKNOWN</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #UNKNOWN + * @model + * @generated + * @ordered + */ + public static final int UNKNOWN_VALUE = 0; + + /** + * The '<em><b>SEV1</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>SEV1</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #SEV1 + * @model + * @generated + * @ordered + */ + public static final int SEV1_VALUE = 0; + + /** + * The '<em><b>SEV2</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>SEV2</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #SEV2 + * @model + * @generated + * @ordered + */ + public static final int SEV2_VALUE = 0; + + /** + * The '<em><b>SEV3</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>SEV3</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #SEV3 + * @model + * @generated + * @ordered + */ + public static final int SEV3_VALUE = 0; + + /** + * The '<em><b>SEV4</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>SEV4</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #SEV4 + * @model + * @generated + * @ordered + */ + public static final int SEV4_VALUE = 0; + + /** + * An array of all the '<em><b>Log Severity</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static final LogSeverity[] VALUES_ARRAY = + new LogSeverity[] { + UNKNOWN, + SEV1, + SEV2, + SEV3, + SEV4, + }; + + /** + * A public read-only list of all the '<em><b>Log Severity</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static final List<LogSeverity> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the '<em><b>Log Severity</b></em>' literal with the specified literal value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Log Severity</b></em>' literal with the specified name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Log Severity</b></em>' literal with the specified integer value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static LogSeverity get(int value) { + switch (value) { + case UNKNOWN_VALUE: return UNKNOWN; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private LogSeverity(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Named Entity</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.NamedEntity#getName <em>Name</em>}</li> + * <li>{@link org.openecomp.ncomp.core.NamedEntity#getLastPolled <em>Last Polled</em>}</li> + * <li>{@link org.openecomp.ncomp.core.NamedEntity#getLastChanged <em>Last Changed</em>}</li> + * <li>{@link org.openecomp.ncomp.core.NamedEntity#getCreated <em>Created</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.CorePackage#getNamedEntity() + * @model abstract="true" + * @generated + */ +public interface NamedEntity extends EObject { + /** + * Returns the value of the '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Name</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Name</em>' 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 <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Name</em>' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + + /** + * Returns the value of the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Last Polled</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Last Polled</em>' 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 <em>Last Polled</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Last Polled</em>' attribute. + * @see #getLastPolled() + * @generated + */ + void setLastPolled(Date value); + + /** + * Returns the value of the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Last Changed</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Last Changed</em>' 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 <em>Last Changed</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Last Changed</em>' attribute. + * @see #getLastChanged() + * @generated + */ + void setLastChanged(Date value); + + /** + * Returns the value of the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Created</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Created</em>' 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 <em>Created</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Created</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the literals of the enumeration '<em><b>Operational State</b></em>', + * and utility methods for working with them. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.CorePackage#getOperationalState() + * @model + * @generated + */ +public enum OperationalState implements Enumerator { + /** + * The '<em><b>OPERATIONAL</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #OPERATIONAL_VALUE + * @generated + * @ordered + */ + OPERATIONAL(0, "OPERATIONAL", "OPERATIONAL"), + + /** + * The '<em><b>SUSPENDED</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #SUSPENDED_VALUE + * @generated + * @ordered + */ + SUSPENDED(0, "SUSPENDED", "SUSPENDED"); + + /** + * The '<em><b>OPERATIONAL</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>OPERATIONAL</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #OPERATIONAL + * @model + * @generated + * @ordered + */ + public static final int OPERATIONAL_VALUE = 0; + + /** + * The '<em><b>SUSPENDED</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>SUSPENDED</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #SUSPENDED + * @model + * @generated + * @ordered + */ + public static final int SUSPENDED_VALUE = 0; + + /** + * An array of all the '<em><b>Operational State</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static final OperationalState[] VALUES_ARRAY = + new OperationalState[] { + OPERATIONAL, + SUSPENDED, + }; + + /** + * A public read-only list of all the '<em><b>Operational State</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static final List<OperationalState> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the '<em><b>Operational State</b></em>' literal with the specified literal value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Operational State</b></em>' literal with the specified name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Operational State</b></em>' literal with the specified integer value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static OperationalState get(int value) { + switch (value) { + case OPERATIONAL_VALUE: return OPERATIONAL; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private OperationalState(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>User</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.User#getPublicKey <em>Public Key</em>}</li> + * <li>{@link org.openecomp.ncomp.core.User#getDeploymentStatus <em>Deployment Status</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.CorePackage#getUser() + * @model + * @generated + */ +public interface User extends NamedEntity { + /** + * Returns the value of the '<em><b>Public Key</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Public Key</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Public Key</em>' 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 <em>Public Key</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Public Key</em>' attribute. + * @see #getPublicKey() + * @generated + */ + void setPublicKey(String value); + + /** + * Returns the value of the '<em><b>Deployment Status</b></em>' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.DeploymentStatus}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Deployment Status</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Deployment Status</em>' 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 <em>Deployment Status</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Deployment Status</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Alert</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.alerts.Alert#getSeverity <em>Severity</em>}</li> + * <li>{@link org.openecomp.ncomp.core.alerts.Alert#getDampingRule <em>Damping Rule</em>}</li> + * <li>{@link org.openecomp.ncomp.core.alerts.Alert#getNumAlerts <em>Num Alerts</em>}</li> + * <li>{@link org.openecomp.ncomp.core.alerts.Alert#getNumAlertsSuppressed <em>Num Alerts Suppressed</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getAlert() + * @model abstract="true" + * @generated + */ +public interface Alert extends NamedEntity, HasOperationalState { + /** + * Returns the value of the '<em><b>Severity</b></em>' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.logs.LogSeverity}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Severity</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Severity</em>' 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 <em>Severity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Severity</em>' attribute. + * @see org.openecomp.ncomp.core.logs.LogSeverity + * @see #getSeverity() + * @generated + */ + void setSeverity(LogSeverity value); + + /** + * Returns the value of the '<em><b>Damping Rule</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Damping Rule</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Damping Rule</em>' 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 <em>Damping Rule</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Damping Rule</em>' containment reference. + * @see #getDampingRule() + * @generated + */ + void setDampingRule(DampingRule value); + + /** + * Returns the value of the '<em><b>Num Alerts</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Num Alerts</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Num Alerts</em>' 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 <em>Num Alerts</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Num Alerts</em>' attribute. + * @see #getNumAlerts() + * @generated + */ + void setNumAlerts(IncreasingULongMetricAttribute value); + + /** + * Returns the value of the '<em><b>Num Alerts Suppressed</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Num Alerts Suppressed</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Num Alerts Suppressed</em>' 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 <em>Num Alerts Suppressed</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Num Alerts Suppressed</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Alert Container</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.alerts.AlertContainer#getAlerts <em>Alerts</em>}</li> + * <li>{@link org.openecomp.ncomp.core.alerts.AlertContainer#getAlertingTemplate <em>Alerting Template</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getAlertContainer() + * @model abstract="true" + * @generated + */ +public interface AlertContainer extends EObject { + /** + * Returns the value of the '<em><b>Alerts</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.alerts.Alert}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Alerts</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Alerts</em>' containment reference list. + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getAlertContainer_Alerts() + * @model containment="true" + * @generated + */ + EList<Alert> getAlerts(); + + /** + * Returns the value of the '<em><b>Alerting Template</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Alerting Template</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Alerting Template</em>' 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 <em>Alerting Template</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Alerting Template</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Alerting Template</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.alerts.AlertingTemplate#getAlerts <em>Alerts</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getAlertingTemplate() + * @model + * @generated + */ +public interface AlertingTemplate extends NamedEntity { + /** + * Returns the value of the '<em><b>Alerts</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.alerts.Alert}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Alerts</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Alerts</em>' containment reference list. + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getAlertingTemplate_Alerts() + * @model containment="true" + * @generated + */ + EList<Alert> 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; + +/** + * <!-- begin-user-doc --> + * The <b>Factory</b> for the model. + * It provides a create method for each non-abstract class of the model. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.alerts.AlertsPackage + * @generated + */ +public interface AlertsFactory extends EFactory { + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + AlertsFactory eINSTANCE = org.openecomp.ncomp.core.alerts.impl.AlertsFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Threshold Alert</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Threshold Alert</em>'. + * @generated + */ + ThresholdAlert createThresholdAlert(); + + /** + * Returns a new object of class '<em>Alerting Template</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Alerting Template</em>'. + * @generated + */ + AlertingTemplate createAlertingTemplate(); + + /** + * Returns a new object of class '<em>Max Alert Per Interval</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Max Alert Per Interval</em>'. + * @generated + */ + MaxAlertPerInterval createMaxAlertPerInterval(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * The <b>Package</b> for the model. + * It contains accessors for the meta objects to represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNAME = "alerts"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.core.alerts"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_PREFIX = "alerts"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Alert</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ALERT__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ALERT__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ALERT__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ALERT__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the '<em><b>Operational State</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ALERT__OPERATIONAL_STATE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Severity</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ALERT__SEVERITY = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Damping Rule</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ALERT__DAMPING_RULE = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Num Alerts</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ALERT__NUM_ALERTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Num Alerts Suppressed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ALERT__NUM_ALERTS_SUPPRESSED = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The number of structural features of the '<em>Alert</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ALERT_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The number of operations of the '<em>Alert</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Threshold Alert</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int THRESHOLD_ALERT__NAME = ALERT__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int THRESHOLD_ALERT__LAST_POLLED = ALERT__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int THRESHOLD_ALERT__LAST_CHANGED = ALERT__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int THRESHOLD_ALERT__CREATED = ALERT__CREATED; + + /** + * The feature id for the '<em><b>Operational State</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int THRESHOLD_ALERT__OPERATIONAL_STATE = ALERT__OPERATIONAL_STATE; + + /** + * The feature id for the '<em><b>Severity</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int THRESHOLD_ALERT__SEVERITY = ALERT__SEVERITY; + + /** + * The feature id for the '<em><b>Damping Rule</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int THRESHOLD_ALERT__DAMPING_RULE = ALERT__DAMPING_RULE; + + /** + * The feature id for the '<em><b>Num Alerts</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int THRESHOLD_ALERT__NUM_ALERTS = ALERT__NUM_ALERTS; + + /** + * The feature id for the '<em><b>Num Alerts Suppressed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int THRESHOLD_ALERT__NUM_ALERTS_SUPPRESSED = ALERT__NUM_ALERTS_SUPPRESSED; + + /** + * The feature id for the '<em><b>Metric Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int THRESHOLD_ALERT__METRIC_NAME = ALERT_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Lower Bound</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int THRESHOLD_ALERT__LOWER_BOUND = ALERT_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Upper Bound</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int THRESHOLD_ALERT__UPPER_BOUND = ALERT_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Duration</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int THRESHOLD_ALERT__DURATION = ALERT_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Max Delay</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int THRESHOLD_ALERT__MAX_DELAY = ALERT_FEATURE_COUNT + 4; + + /** + * The number of structural features of the '<em>Threshold Alert</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int THRESHOLD_ALERT_FEATURE_COUNT = ALERT_FEATURE_COUNT + 5; + + /** + * The number of operations of the '<em>Threshold Alert</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Alert Container</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Alerts</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ALERT_CONTAINER__ALERTS = 0; + + /** + * The feature id for the '<em><b>Alerting Template</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ALERT_CONTAINER__ALERTING_TEMPLATE = 1; + + /** + * The number of structural features of the '<em>Alert Container</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ALERT_CONTAINER_FEATURE_COUNT = 2; + + /** + * The number of operations of the '<em>Alert Container</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ALERT_CONTAINER_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.alerts.impl.AlertingTemplateImpl <em>Alerting Template</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ALERTING_TEMPLATE__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ALERTING_TEMPLATE__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ALERTING_TEMPLATE__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ALERTING_TEMPLATE__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the '<em><b>Alerts</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ALERTING_TEMPLATE__ALERTS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Alerting Template</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ALERTING_TEMPLATE_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Alerting Template</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Damping Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em>Damping Rule</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DAMPING_RULE_FEATURE_COUNT = 0; + + /** + * The number of operations of the '<em>Damping Rule</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DAMPING_RULE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.alerts.impl.MaxAlertPerIntervalImpl <em>Max Alert Per Interval</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Interval</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MAX_ALERT_PER_INTERVAL__INTERVAL = DAMPING_RULE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Max Alerts</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MAX_ALERT_PER_INTERVAL__MAX_ALERTS = DAMPING_RULE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Max Alert Per Interval</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int MAX_ALERT_PER_INTERVAL_FEATURE_COUNT = DAMPING_RULE_FEATURE_COUNT + 2; + + /** + * The number of operations of the '<em>Max Alert Per Interval</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Alert</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Alert</em>'. + * @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 <em>Severity</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Severity</em>'. + * @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 <em>Damping Rule</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Damping Rule</em>'. + * @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 <em>Num Alerts</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Num Alerts</em>'. + * @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 <em>Num Alerts Suppressed</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Num Alerts Suppressed</em>'. + * @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 <em>Threshold Alert</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Threshold Alert</em>'. + * @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 <em>Metric Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Metric Name</em>'. + * @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 <em>Lower Bound</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Lower Bound</em>'. + * @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 <em>Upper Bound</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Upper Bound</em>'. + * @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 <em>Duration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Duration</em>'. + * @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 <em>Max Delay</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Max Delay</em>'. + * @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 <em>Alert Container</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Alert Container</em>'. + * @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 <em>Alerts</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Alerts</em>'. + * @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 <em>Alerting Template</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Alerting Template</em>'. + * @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 <em>Alerting Template</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Alerting Template</em>'. + * @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 <em>Alerts</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Alerts</em>'. + * @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 <em>Damping Rule</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Damping Rule</em>'. + * @see org.openecomp.ncomp.core.alerts.DampingRule + * @generated + */ + EClass getDampingRule(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.alerts.MaxAlertPerInterval <em>Max Alert Per Interval</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Max Alert Per Interval</em>'. + * @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 <em>Interval</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Interval</em>'. + * @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 <em>Max Alerts</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Max Alerts</em>'. + * @see org.openecomp.ncomp.core.alerts.MaxAlertPerInterval#getMaxAlerts() + * @see #getMaxAlertPerInterval() + * @generated + */ + EAttribute getMaxAlertPerInterval_MaxAlerts(); + + /** + * Returns the factory that creates the instances of the model. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the factory that creates the instances of the model. + * @generated + */ + AlertsFactory getAlertsFactory(); + + /** + * <!-- begin-user-doc --> + * Defines literals for the meta objects that represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.alerts.impl.AlertImpl <em>Alert</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Severity</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ALERT__SEVERITY = eINSTANCE.getAlert_Severity(); + + /** + * The meta object literal for the '<em><b>Damping Rule</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference ALERT__DAMPING_RULE = eINSTANCE.getAlert_DampingRule(); + + /** + * The meta object literal for the '<em><b>Num Alerts</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ALERT__NUM_ALERTS = eINSTANCE.getAlert_NumAlerts(); + + /** + * The meta object literal for the '<em><b>Num Alerts Suppressed</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ALERT__NUM_ALERTS_SUPPRESSED = eINSTANCE.getAlert_NumAlertsSuppressed(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.alerts.impl.ThresholdAlertImpl <em>Threshold Alert</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Metric Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute THRESHOLD_ALERT__METRIC_NAME = eINSTANCE.getThresholdAlert_MetricName(); + + /** + * The meta object literal for the '<em><b>Lower Bound</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute THRESHOLD_ALERT__LOWER_BOUND = eINSTANCE.getThresholdAlert_LowerBound(); + + /** + * The meta object literal for the '<em><b>Upper Bound</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute THRESHOLD_ALERT__UPPER_BOUND = eINSTANCE.getThresholdAlert_UpperBound(); + + /** + * The meta object literal for the '<em><b>Duration</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute THRESHOLD_ALERT__DURATION = eINSTANCE.getThresholdAlert_Duration(); + + /** + * The meta object literal for the '<em><b>Max Delay</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute THRESHOLD_ALERT__MAX_DELAY = eINSTANCE.getThresholdAlert_MaxDelay(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.alerts.impl.AlertContainerImpl <em>Alert Container</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Alerts</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference ALERT_CONTAINER__ALERTS = eINSTANCE.getAlertContainer_Alerts(); + + /** + * The meta object literal for the '<em><b>Alerting Template</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference ALERT_CONTAINER__ALERTING_TEMPLATE = eINSTANCE.getAlertContainer_AlertingTemplate(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.alerts.impl.AlertingTemplateImpl <em>Alerting Template</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Alerts</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference ALERTING_TEMPLATE__ALERTS = eINSTANCE.getAlertingTemplate_Alerts(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.alerts.impl.DampingRuleImpl <em>Damping Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Max Alert Per Interval</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Interval</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute MAX_ALERT_PER_INTERVAL__INTERVAL = eINSTANCE.getMaxAlertPerInterval_Interval(); + + /** + * The meta object literal for the '<em><b>Max Alerts</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Damping Rule</b></em>'. + * <!-- end-user-doc --> + * + * + * @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; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Max Alert Per Interval</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.alerts.MaxAlertPerInterval#getInterval <em>Interval</em>}</li> + * <li>{@link org.openecomp.ncomp.core.alerts.MaxAlertPerInterval#getMaxAlerts <em>Max Alerts</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getMaxAlertPerInterval() + * @model + * @generated + */ +public interface MaxAlertPerInterval extends DampingRule { + /** + * Returns the value of the '<em><b>Interval</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Interval</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Interval</em>' 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 <em>Interval</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Interval</em>' attribute. + * @see #getInterval() + * @generated + */ + void setInterval(String value); + + /** + * Returns the value of the '<em><b>Max Alerts</b></em>' attribute. + * The default value is <code>"1"</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Max Alerts</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Max Alerts</em>' 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 <em>Max Alerts</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Max Alerts</em>' 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; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Threshold Alert</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.alerts.ThresholdAlert#getMetricName <em>Metric Name</em>}</li> + * <li>{@link org.openecomp.ncomp.core.alerts.ThresholdAlert#getLowerBound <em>Lower Bound</em>}</li> + * <li>{@link org.openecomp.ncomp.core.alerts.ThresholdAlert#getUpperBound <em>Upper Bound</em>}</li> + * <li>{@link org.openecomp.ncomp.core.alerts.ThresholdAlert#getDuration <em>Duration</em>}</li> + * <li>{@link org.openecomp.ncomp.core.alerts.ThresholdAlert#getMaxDelay <em>Max Delay</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.alerts.AlertsPackage#getThresholdAlert() + * @model + * @generated + */ +public interface ThresholdAlert extends Alert { + /** + * Returns the value of the '<em><b>Metric Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Metric Name</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Metric Name</em>' 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 <em>Metric Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Metric Name</em>' attribute. + * @see #getMetricName() + * @generated + */ + void setMetricName(String value); + + /** + * Returns the value of the '<em><b>Lower Bound</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Lower Bound</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Lower Bound</em>' 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 <em>Lower Bound</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Lower Bound</em>' attribute. + * @see #getLowerBound() + * @generated + */ + void setLowerBound(Double value); + + /** + * Returns the value of the '<em><b>Upper Bound</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Upper Bound</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Upper Bound</em>' 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 <em>Upper Bound</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Upper Bound</em>' attribute. + * @see #getUpperBound() + * @generated + */ + void setUpperBound(Double value); + + /** + * Returns the value of the '<em><b>Duration</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Duration</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Duration</em>' 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 <em>Duration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Duration</em>' attribute. + * @see #getDuration() + * @generated + */ + void setDuration(String value); + + /** + * Returns the value of the '<em><b>Max Delay</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Max Delay</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Max Delay</em>' 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 <em>Max Delay</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Max Delay</em>' 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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Alert Container</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.alerts.impl.AlertContainerImpl#getAlerts <em>Alerts</em>}</li> + * <li>{@link org.openecomp.ncomp.core.alerts.impl.AlertContainerImpl#getAlertingTemplate <em>Alerting Template</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public abstract class AlertContainerImpl extends MinimalEObjectImpl.Container implements AlertContainer { + /** + * The cached value of the '{@link #getAlerts() <em>Alerts</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAlerts() + * @generated + * @ordered + */ + protected EList<Alert> alerts; + + /** + * The cached value of the '{@link #getAlertingTemplate() <em>Alerting Template</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAlertingTemplate() + * @generated + * @ordered + */ + protected AlertingTemplate alertingTemplate; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AlertContainerImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return AlertsPackage.Literals.ALERT_CONTAINER; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<Alert> getAlerts() { + if (alerts == null) { + alerts = new EObjectContainmentEList<Alert>(Alert.class, this, AlertsPackage.ALERT_CONTAINER__ALERTS); + } + return alerts; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AlertingTemplate basicGetAlertingTemplate() { + return alertingTemplate; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case AlertsPackage.ALERT_CONTAINER__ALERTS: + getAlerts().clear(); + getAlerts().addAll((Collection<? extends Alert>)newValue); + return; + case AlertsPackage.ALERT_CONTAINER__ALERTING_TEMPLATE: + setAlertingTemplate((AlertingTemplate)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Alert</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.alerts.impl.AlertImpl#getOperationalState <em>Operational State</em>}</li> + * <li>{@link org.openecomp.ncomp.core.alerts.impl.AlertImpl#getSeverity <em>Severity</em>}</li> + * <li>{@link org.openecomp.ncomp.core.alerts.impl.AlertImpl#getDampingRule <em>Damping Rule</em>}</li> + * <li>{@link org.openecomp.ncomp.core.alerts.impl.AlertImpl#getNumAlerts <em>Num Alerts</em>}</li> + * <li>{@link org.openecomp.ncomp.core.alerts.impl.AlertImpl#getNumAlertsSuppressed <em>Num Alerts Suppressed</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public abstract class AlertImpl extends NamedEntityImpl implements Alert { + /** + * The default value of the '{@link #getOperationalState() <em>Operational State</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getOperationalState() + * @generated + * @ordered + */ + protected static final OperationalState OPERATIONAL_STATE_EDEFAULT = OperationalState.OPERATIONAL; + + /** + * The cached value of the '{@link #getOperationalState() <em>Operational State</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getOperationalState() + * @generated + * @ordered + */ + protected OperationalState operationalState = OPERATIONAL_STATE_EDEFAULT; + + /** + * The default value of the '{@link #getSeverity() <em>Severity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSeverity() + * @generated + * @ordered + */ + protected static final LogSeverity SEVERITY_EDEFAULT = LogSeverity.UNKNOWN; + + /** + * The cached value of the '{@link #getSeverity() <em>Severity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSeverity() + * @generated + * @ordered + */ + protected LogSeverity severity = SEVERITY_EDEFAULT; + + /** + * The cached value of the '{@link #getDampingRule() <em>Damping Rule</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDampingRule() + * @generated + * @ordered + */ + protected DampingRule dampingRule; + + /** + * The default value of the '{@link #getNumAlerts() <em>Num Alerts</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumAlerts() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUM_ALERTS_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNumAlerts() <em>Num Alerts</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumAlerts() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numAlerts = NUM_ALERTS_EDEFAULT; + + /** + * The default value of the '{@link #getNumAlertsSuppressed() <em>Num Alerts Suppressed</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumAlertsSuppressed() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute NUM_ALERTS_SUPPRESSED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNumAlertsSuppressed() <em>Num Alerts Suppressed</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumAlertsSuppressed() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute numAlertsSuppressed = NUM_ALERTS_SUPPRESSED_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AlertImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return AlertsPackage.Literals.ALERT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public OperationalState getOperationalState() { + return operationalState; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogSeverity getSeverity() { + return severity; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DampingRule getDampingRule() { + return dampingRule; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public IncreasingULongMetricAttribute getNumAlerts() { + return numAlerts; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public IncreasingULongMetricAttribute getNumAlertsSuppressed() { + return numAlertsSuppressed; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Alerting Template</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.alerts.impl.AlertingTemplateImpl#getAlerts <em>Alerts</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class AlertingTemplateImpl extends NamedEntityImpl implements AlertingTemplate { + /** + * The cached value of the '{@link #getAlerts() <em>Alerts</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAlerts() + * @generated + * @ordered + */ + protected EList<Alert> alerts; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AlertingTemplateImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return AlertsPackage.Literals.ALERTING_TEMPLATE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<Alert> getAlerts() { + if (alerts == null) { + alerts = new EObjectContainmentEList<Alert>(Alert.class, this, AlertsPackage.ALERTING_TEMPLATE__ALERTS); + } + return alerts; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case AlertsPackage.ALERTING_TEMPLATE__ALERTS: + getAlerts().clear(); + getAlerts().addAll((Collection<? extends Alert>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case AlertsPackage.ALERTING_TEMPLATE__ALERTS: + getAlerts().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Factory</b>. + * <!-- end-user-doc --> + * @generated + */ +public class AlertsFactoryImpl extends EFactoryImpl implements AlertsFactory { + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AlertsFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ThresholdAlert createThresholdAlert() { + ThresholdAlertImpl thresholdAlert = new ThresholdAlertImpl(); + return thresholdAlert; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AlertingTemplate createAlertingTemplate() { + AlertingTemplateImpl alertingTemplate = new AlertingTemplateImpl(); + return alertingTemplate; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public MaxAlertPerInterval createMaxAlertPerInterval() { + MaxAlertPerIntervalImpl maxAlertPerInterval = new MaxAlertPerIntervalImpl(); + return maxAlertPerInterval; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AlertsPackage getAlertsPackage() { + return (AlertsPackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * @generated + */ +public class AlertsPackageImpl extends EPackageImpl implements AlertsPackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass alertEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass thresholdAlertEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass alertContainerEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass alertingTemplateEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass dampingRuleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass maxAlertPerIntervalEClass = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + * <p>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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. + * + * <p>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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getAlert() { + return alertEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getAlert_Severity() { + return (EAttribute)alertEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getAlert_DampingRule() { + return (EReference)alertEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getAlert_NumAlerts() { + return (EAttribute)alertEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getAlert_NumAlertsSuppressed() { + return (EAttribute)alertEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getThresholdAlert() { + return thresholdAlertEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getThresholdAlert_MetricName() { + return (EAttribute)thresholdAlertEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getThresholdAlert_LowerBound() { + return (EAttribute)thresholdAlertEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getThresholdAlert_UpperBound() { + return (EAttribute)thresholdAlertEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getThresholdAlert_Duration() { + return (EAttribute)thresholdAlertEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getThresholdAlert_MaxDelay() { + return (EAttribute)thresholdAlertEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getAlertContainer() { + return alertContainerEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getAlertContainer_Alerts() { + return (EReference)alertContainerEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getAlertContainer_AlertingTemplate() { + return (EReference)alertContainerEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getAlertingTemplate() { + return alertingTemplateEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getAlertingTemplate_Alerts() { + return (EReference)alertingTemplateEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getDampingRule() { + return dampingRuleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getMaxAlertPerInterval() { + return maxAlertPerIntervalEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getMaxAlertPerInterval_Interval() { + return (EAttribute)maxAlertPerIntervalEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getMaxAlertPerInterval_MaxAlerts() { + return (EAttribute)maxAlertPerIntervalEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AlertsFactory getAlertsFactory() { + return (AlertsFactory)getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Damping Rule</b></em>'. + * <!-- end-user-doc --> + * <p> + * </p> + * + * @generated + */ +public abstract class DampingRuleImpl extends MinimalEObjectImpl.Container implements DampingRule { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected DampingRuleImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Max Alert Per Interval</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.alerts.impl.MaxAlertPerIntervalImpl#getInterval <em>Interval</em>}</li> + * <li>{@link org.openecomp.ncomp.core.alerts.impl.MaxAlertPerIntervalImpl#getMaxAlerts <em>Max Alerts</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class MaxAlertPerIntervalImpl extends DampingRuleImpl implements MaxAlertPerInterval { + /** + * The default value of the '{@link #getInterval() <em>Interval</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getInterval() + * @generated + * @ordered + */ + protected static final String INTERVAL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getInterval() <em>Interval</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getInterval() + * @generated + * @ordered + */ + protected String interval = INTERVAL_EDEFAULT; + + /** + * The default value of the '{@link #getMaxAlerts() <em>Max Alerts</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMaxAlerts() + * @generated + * @ordered + */ + protected static final int MAX_ALERTS_EDEFAULT = 1; + + /** + * The cached value of the '{@link #getMaxAlerts() <em>Max Alerts</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMaxAlerts() + * @generated + * @ordered + */ + protected int maxAlerts = MAX_ALERTS_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected MaxAlertPerIntervalImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return AlertsPackage.Literals.MAX_ALERT_PER_INTERVAL; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getInterval() { + return interval; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getMaxAlerts() { + return maxAlerts; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Threshold Alert</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.alerts.impl.ThresholdAlertImpl#getMetricName <em>Metric Name</em>}</li> + * <li>{@link org.openecomp.ncomp.core.alerts.impl.ThresholdAlertImpl#getLowerBound <em>Lower Bound</em>}</li> + * <li>{@link org.openecomp.ncomp.core.alerts.impl.ThresholdAlertImpl#getUpperBound <em>Upper Bound</em>}</li> + * <li>{@link org.openecomp.ncomp.core.alerts.impl.ThresholdAlertImpl#getDuration <em>Duration</em>}</li> + * <li>{@link org.openecomp.ncomp.core.alerts.impl.ThresholdAlertImpl#getMaxDelay <em>Max Delay</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class ThresholdAlertImpl extends AlertImpl implements ThresholdAlert { + /** + * The default value of the '{@link #getMetricName() <em>Metric Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMetricName() + * @generated + * @ordered + */ + protected static final String METRIC_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMetricName() <em>Metric Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMetricName() + * @generated + * @ordered + */ + protected String metricName = METRIC_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getLowerBound() <em>Lower Bound</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLowerBound() + * @generated + * @ordered + */ + protected static final Double LOWER_BOUND_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLowerBound() <em>Lower Bound</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLowerBound() + * @generated + * @ordered + */ + protected Double lowerBound = LOWER_BOUND_EDEFAULT; + + /** + * The default value of the '{@link #getUpperBound() <em>Upper Bound</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getUpperBound() + * @generated + * @ordered + */ + protected static final Double UPPER_BOUND_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUpperBound() <em>Upper Bound</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getUpperBound() + * @generated + * @ordered + */ + protected Double upperBound = UPPER_BOUND_EDEFAULT; + + /** + * The default value of the '{@link #getDuration() <em>Duration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDuration() + * @generated + * @ordered + */ + protected static final String DURATION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDuration() <em>Duration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDuration() + * @generated + * @ordered + */ + protected String duration = DURATION_EDEFAULT; + + /** + * The default value of the '{@link #getMaxDelay() <em>Max Delay</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMaxDelay() + * @generated + * @ordered + */ + protected static final String MAX_DELAY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMaxDelay() <em>Max Delay</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMaxDelay() + * @generated + * @ordered + */ + protected String maxDelay = MAX_DELAY_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ThresholdAlertImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return AlertsPackage.Literals.THRESHOLD_ALERT; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getMetricName() { + return metricName; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Double getLowerBound() { + return lowerBound; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Double getUpperBound() { + return upperBound; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getDuration() { + return duration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getMaxDelay() { + return maxDelay; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * The <b>Adapter Factory</b> for the model. + * It provides an adapter <code>createXXX</code> method for each class of the model. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.alerts.AlertsPackage + * @generated + */ +public class AlertsAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static AlertsPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AlertsAdapterFactory() { + if (modelPackage == null) { + modelPackage = AlertsPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * <!-- begin-user-doc --> + * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. + * <!-- end-user-doc --> + * @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 <code>createXXX</code> methods. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AlertsSwitch<Adapter> modelSwitch = + new AlertsSwitch<Adapter>() { + @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 <code>target</code>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param target the object to adapt. + * @return the adapter for the <code>target</code>. + * @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 <em>Alert</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Threshold Alert</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Alert Container</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Alerting Template</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Damping Rule</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Max Alert Per Interval</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Named Entity</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Has Operational State</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.ncomp.core.HasOperationalState + * @generated + */ + public Adapter createHasOperationalStateAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * <!-- begin-user-doc --> + * This default implementation returns null. + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * The <b>Switch</b> for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the <code>caseXXX</code> 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. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.alerts.AlertsPackage + * @generated + */ +public class AlertsSwitch<T> extends Switch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static AlertsPackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AlertsSwitch() { + if (modelPackage == null) { + modelPackage = AlertsPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the first non-null result returned by a <code>caseXXX</code> 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 '<em>Alert</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Alert</em>'. + * @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 '<em>Threshold Alert</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Threshold Alert</em>'. + * @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 '<em>Alert Container</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Alert Container</em>'. + * @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 '<em>Alerting Template</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Alerting Template</em>'. + * @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 '<em>Damping Rule</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Damping Rule</em>'. + * @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 '<em>Max Alert Per Interval</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Max Alert Per Interval</em>'. + * @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 '<em>Named Entity</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Named Entity</em>'. + * @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 '<em>Has Operational State</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Has Operational State</em>'. + * @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 '<em>EObject</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EObject</em>'. + * @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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Function</b></em>'. + * <!-- end-user-doc --> + * + * + * @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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Action</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.FunctionAction#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionAction() + * @model + * @generated + */ +public interface FunctionAction extends EObject { + /** + * Returns the value of the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Value</em>' 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 <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Value</em>' 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; + +/** + * <!-- begin-user-doc --> + * The <b>Factory</b> for the model. + * It provides a create method for each non-abstract class of the model. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.function.FunctionPackage + * @generated + */ +public interface FunctionFactory extends EFactory { + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + FunctionFactory eINSTANCE = org.openecomp.ncomp.core.function.impl.FunctionFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Iterator Using Function</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Iterator Using Function</em>'. + * @generated + */ + IteratorUsingFunction createIteratorUsingFunction(); + + /** + * Returns a new object of class '<em>Rule Function</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Rule Function</em>'. + * @generated + */ + RuleFunction createRuleFunction(); + + /** + * Returns a new object of class '<em>Rule</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Rule</em>'. + * @generated + */ + FunctionRule createFunctionRule(); + + /** + * Returns a new object of class '<em>Action</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Action</em>'. + * @generated + */ + FunctionAction createFunctionAction(); + + /** + * Returns a new object of class '<em>Rule Update Function</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Rule Update Function</em>'. + * @generated + */ + RuleUpdateFunction createRuleUpdateFunction(); + + /** + * Returns a new object of class '<em>Update Rule</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Update Rule</em>'. + * @generated + */ + FunctionUpdateRule createFunctionUpdateRule(); + + /** + * Returns a new object of class '<em>Update Attribute</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Update Attribute</em>'. + * @generated + */ + FunctionUpdateAttribute createFunctionUpdateAttribute(); + + /** + * Returns a new object of class '<em>Match Attribute</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Match Attribute</em>'. + * @generated + */ + FunctionMatchAttribute createFunctionMatchAttribute(); + + /** + * Returns a new object of class '<em>Match Metric</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Match Metric</em>'. + * @generated + */ + FunctionMatchMetric createFunctionMatchMetric(); + + /** + * Returns a new object of class '<em>Match Instance Of</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Match Instance Of</em>'. + * @generated + */ + FunctionMatchInstanceOf createFunctionMatchInstanceOf(); + + /** + * Returns a new object of class '<em>String Value Pair</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>String Value Pair</em>'. + * @generated + */ + StringValuePair createStringValuePair(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Match</b></em>'. + * <!-- end-user-doc --> + * + * + * @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; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Match Attribute</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.FunctionMatchAttribute#getPath <em>Path</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.FunctionMatchAttribute#getMatch <em>Match</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.FunctionMatchAttribute#isNegation <em>Negation</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionMatchAttribute() + * @model + * @generated + */ +public interface FunctionMatchAttribute extends FunctionMatch { + /** + * Returns the value of the '<em><b>Path</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Path</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Path</em>' 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 <em>Path</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Path</em>' attribute. + * @see #getPath() + * @generated + */ + void setPath(String value); + + /** + * Returns the value of the '<em><b>Match</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Match</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Match</em>' 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 <em>Match</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Match</em>' attribute. + * @see #getMatch() + * @generated + */ + void setMatch(String value); + + /** + * Returns the value of the '<em><b>Negation</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Negation</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Negation</em>' 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 <em>Negation</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Negation</em>' 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; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Match Instance Of</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.FunctionMatchInstanceOf#getEPackage <em>EPackage</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.FunctionMatchInstanceOf#getEName <em>EName</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionMatchInstanceOf() + * @model + * @generated + */ +public interface FunctionMatchInstanceOf extends FunctionMatch { + /** + * Returns the value of the '<em><b>EPackage</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>EPackage</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>EPackage</em>' 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 <em>EPackage</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>EPackage</em>' attribute. + * @see #getEPackage() + * @generated + */ + void setEPackage(String value); + + /** + * Returns the value of the '<em><b>EName</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>EName</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>EName</em>' 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 <em>EName</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>EName</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Match Metric</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.FunctionMatchMetric#getPath <em>Path</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.FunctionMatchMetric#getOption <em>Option</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.FunctionMatchMetric#getLowerBound <em>Lower Bound</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.FunctionMatchMetric#getUpperBound <em>Upper Bound</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.FunctionMatchMetric#isNegation <em>Negation</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionMatchMetric() + * @model + * @generated + */ +public interface FunctionMatchMetric extends FunctionMatch { + /** + * Returns the value of the '<em><b>Path</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Path</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Path</em>' 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 <em>Path</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Path</em>' attribute. + * @see #getPath() + * @generated + */ + void setPath(String value); + + /** + * Returns the value of the '<em><b>Option</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Option</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Option</em>' 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 <em>Option</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Option</em>' reference. + * @see #getOption() + * @generated + */ + void setOption(MetricValueOption value); + + /** + * Returns the value of the '<em><b>Lower Bound</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Lower Bound</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Lower Bound</em>' 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 <em>Lower Bound</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Lower Bound</em>' attribute. + * @see #getLowerBound() + * @generated + */ + void setLowerBound(Double value); + + /** + * Returns the value of the '<em><b>Upper Bound</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Upper Bound</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Upper Bound</em>' 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 <em>Upper Bound</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Upper Bound</em>' attribute. + * @see #getUpperBound() + * @generated + */ + void setUpperBound(Double value); + + /** + * Returns the value of the '<em><b>Negation</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Negation</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Negation</em>' 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 <em>Negation</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Negation</em>' 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; + +/** + * <!-- begin-user-doc --> + * The <b>Package</b> for the model. + * It contains accessors for the meta objects to represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNAME = "function"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.core.function"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_PREFIX = "function"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Function</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The number of structural features of the '<em>Function</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of operations of the '<em>Function</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Iterator</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ITERATOR__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ITERATOR__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ITERATOR__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ITERATOR__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The number of structural features of the '<em>Iterator</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ITERATOR_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of operations of the '<em>Iterator</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Iterator Using Function</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ITERATOR_USING_FUNCTION__NAME = ITERATOR__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ITERATOR_USING_FUNCTION__LAST_POLLED = ITERATOR__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ITERATOR_USING_FUNCTION__LAST_CHANGED = ITERATOR__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ITERATOR_USING_FUNCTION__CREATED = ITERATOR__CREATED; + + /** + * The feature id for the '<em><b>Paths</b></em>' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ITERATOR_USING_FUNCTION__PATHS = ITERATOR_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Recursive</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ITERATOR_USING_FUNCTION__RECURSIVE = ITERATOR_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Filter</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ITERATOR_USING_FUNCTION__FILTER = ITERATOR_FEATURE_COUNT + 2; + + /** + * The number of structural features of the '<em>Iterator Using Function</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ITERATOR_USING_FUNCTION_FEATURE_COUNT = ITERATOR_FEATURE_COUNT + 3; + + /** + * The number of operations of the '<em>Iterator Using Function</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Rule Function</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int RULE_FUNCTION__NAME = FUNCTION__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int RULE_FUNCTION__LAST_POLLED = FUNCTION__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int RULE_FUNCTION__LAST_CHANGED = FUNCTION__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int RULE_FUNCTION__CREATED = FUNCTION__CREATED; + + /** + * The feature id for the '<em><b>Rules</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int RULE_FUNCTION__RULES = FUNCTION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Rule Function</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int RULE_FUNCTION_FEATURE_COUNT = FUNCTION_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Rule Function</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Matches</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_RULE__MATCHES = 0; + + /** + * The feature id for the '<em><b>Action</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_RULE__ACTION = 1; + + /** + * The number of structural features of the '<em>Rule</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_RULE_FEATURE_COUNT = 2; + + /** + * The number of operations of the '<em>Rule</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_RULE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.FunctionActionImpl <em>Action</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_ACTION__VALUE = 0; + + /** + * The number of structural features of the '<em>Action</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_ACTION_FEATURE_COUNT = 1; + + /** + * The number of operations of the '<em>Action</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_ACTION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.RuleUpdateFunctionImpl <em>Rule Update Function</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int RULE_UPDATE_FUNCTION__NAME = FUNCTION__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int RULE_UPDATE_FUNCTION__LAST_POLLED = FUNCTION__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int RULE_UPDATE_FUNCTION__LAST_CHANGED = FUNCTION__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int RULE_UPDATE_FUNCTION__CREATED = FUNCTION__CREATED; + + /** + * The feature id for the '<em><b>Rules</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int RULE_UPDATE_FUNCTION__RULES = FUNCTION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Rule Update Function</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int RULE_UPDATE_FUNCTION_FEATURE_COUNT = FUNCTION_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Rule Update Function</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Update Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Matches</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_UPDATE_RULE__MATCHES = 0; + + /** + * The feature id for the '<em><b>Updates</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_UPDATE_RULE__UPDATES = 1; + + /** + * The number of structural features of the '<em>Update Rule</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_UPDATE_RULE_FEATURE_COUNT = 2; + + /** + * The number of operations of the '<em>Update Rule</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_UPDATE_RULE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.FunctionUpdateImpl <em>Update</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em>Update</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_UPDATE_FEATURE_COUNT = 0; + + /** + * The number of operations of the '<em>Update</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_UPDATE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.FunctionUpdateAttributeImpl <em>Update Attribute</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Path</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_UPDATE_ATTRIBUTE__PATH = FUNCTION_UPDATE_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_UPDATE_ATTRIBUTE__VALUE = FUNCTION_UPDATE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Update Attribute</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_UPDATE_ATTRIBUTE_FEATURE_COUNT = FUNCTION_UPDATE_FEATURE_COUNT + 2; + + /** + * The number of operations of the '<em>Update Attribute</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Match</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em>Match</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_MATCH_FEATURE_COUNT = 0; + + /** + * The number of operations of the '<em>Match</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_MATCH_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.FunctionMatchAttributeImpl <em>Match Attribute</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Path</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_MATCH_ATTRIBUTE__PATH = FUNCTION_MATCH_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Match</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_MATCH_ATTRIBUTE__MATCH = FUNCTION_MATCH_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Negation</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_MATCH_ATTRIBUTE__NEGATION = FUNCTION_MATCH_FEATURE_COUNT + 2; + + /** + * The number of structural features of the '<em>Match Attribute</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_MATCH_ATTRIBUTE_FEATURE_COUNT = FUNCTION_MATCH_FEATURE_COUNT + 3; + + /** + * The number of operations of the '<em>Match Attribute</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Match Metric</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Path</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_MATCH_METRIC__PATH = FUNCTION_MATCH_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Option</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_MATCH_METRIC__OPTION = FUNCTION_MATCH_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Lower Bound</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_MATCH_METRIC__LOWER_BOUND = FUNCTION_MATCH_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Upper Bound</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_MATCH_METRIC__UPPER_BOUND = FUNCTION_MATCH_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Negation</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_MATCH_METRIC__NEGATION = FUNCTION_MATCH_FEATURE_COUNT + 4; + + /** + * The number of structural features of the '<em>Match Metric</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_MATCH_METRIC_FEATURE_COUNT = FUNCTION_MATCH_FEATURE_COUNT + 5; + + /** + * The number of operations of the '<em>Match Metric</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Match Instance Of</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>EPackage</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_MATCH_INSTANCE_OF__EPACKAGE = FUNCTION_MATCH_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>EName</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_MATCH_INSTANCE_OF__ENAME = FUNCTION_MATCH_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Match Instance Of</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int FUNCTION_MATCH_INSTANCE_OF_FEATURE_COUNT = FUNCTION_MATCH_FEATURE_COUNT + 2; + + /** + * The number of operations of the '<em>Match Instance Of</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Value Pair</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Path</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VALUE_PAIR__PATH = 0; + + /** + * The number of structural features of the '<em>Value Pair</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VALUE_PAIR_FEATURE_COUNT = 1; + + /** + * The number of operations of the '<em>Value Pair</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int VALUE_PAIR_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.function.impl.StringValuePairImpl <em>String Value Pair</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Path</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int STRING_VALUE_PAIR__PATH = VALUE_PAIR__PATH; + + /** + * The feature id for the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int STRING_VALUE_PAIR__VALUE = VALUE_PAIR_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>String Value Pair</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int STRING_VALUE_PAIR_FEATURE_COUNT = VALUE_PAIR_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>String Value Pair</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Function</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Function</em>'. + * @see org.openecomp.ncomp.core.function.Function + * @generated + */ + EClass getFunction(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.function.Iterator <em>Iterator</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Iterator</em>'. + * @see org.openecomp.ncomp.core.function.Iterator + * @generated + */ + EClass getIterator(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.function.IteratorUsingFunction <em>Iterator Using Function</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Iterator Using Function</em>'. + * @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 <em>Paths</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute list '<em>Paths</em>'. + * @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 <em>Recursive</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Recursive</em>'. + * @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 <em>Filter</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Filter</em>'. + * @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 <em>Rule Function</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Rule Function</em>'. + * @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 <em>Rules</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Rules</em>'. + * @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 <em>Rule</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Rule</em>'. + * @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 <em>Matches</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Matches</em>'. + * @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 <em>Action</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Action</em>'. + * @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 <em>Action</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Action</em>'. + * @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 <em>Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Value</em>'. + * @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 <em>Rule Update Function</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Rule Update Function</em>'. + * @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 <em>Rules</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Rules</em>'. + * @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 <em>Update Rule</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Update Rule</em>'. + * @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 <em>Matches</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Matches</em>'. + * @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 <em>Updates</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Updates</em>'. + * @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 <em>Update</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Update</em>'. + * @see org.openecomp.ncomp.core.function.FunctionUpdate + * @generated + */ + EClass getFunctionUpdate(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.function.FunctionUpdateAttribute <em>Update Attribute</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Update Attribute</em>'. + * @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 <em>Path</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Path</em>'. + * @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 <em>Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Value</em>'. + * @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 <em>Match</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Match</em>'. + * @see org.openecomp.ncomp.core.function.FunctionMatch + * @generated + */ + EClass getFunctionMatch(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.function.FunctionMatchAttribute <em>Match Attribute</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Match Attribute</em>'. + * @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 <em>Path</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Path</em>'. + * @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 <em>Match</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Match</em>'. + * @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 <em>Negation</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Negation</em>'. + * @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 <em>Match Metric</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Match Metric</em>'. + * @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 <em>Path</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Path</em>'. + * @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 <em>Option</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Option</em>'. + * @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 <em>Lower Bound</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Lower Bound</em>'. + * @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 <em>Upper Bound</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Upper Bound</em>'. + * @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 <em>Negation</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Negation</em>'. + * @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 <em>Match Instance Of</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Match Instance Of</em>'. + * @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 <em>EPackage</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>EPackage</em>'. + * @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 <em>EName</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>EName</em>'. + * @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 <em>Value Pair</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Value Pair</em>'. + * @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 <em>Path</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Path</em>'. + * @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 <em>String Value Pair</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>String Value Pair</em>'. + * @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 <em>Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Value</em>'. + * @see org.openecomp.ncomp.core.function.StringValuePair#getValue() + * @see #getStringValuePair() + * @generated + */ + EAttribute getStringValuePair_Value(); + + /** + * Returns the factory that creates the instances of the model. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the factory that creates the instances of the model. + * @generated + */ + FunctionFactory getFunctionFactory(); + + /** + * <!-- begin-user-doc --> + * Defines literals for the meta objects that represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.FunctionImpl <em>Function</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Iterator</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Iterator Using Function</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Paths</b></em>' attribute list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ITERATOR_USING_FUNCTION__PATHS = eINSTANCE.getIteratorUsingFunction_Paths(); + + /** + * The meta object literal for the '<em><b>Recursive</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ITERATOR_USING_FUNCTION__RECURSIVE = eINSTANCE.getIteratorUsingFunction_Recursive(); + + /** + * The meta object literal for the '<em><b>Filter</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference ITERATOR_USING_FUNCTION__FILTER = eINSTANCE.getIteratorUsingFunction_Filter(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.RuleFunctionImpl <em>Rule Function</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Rules</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference RULE_FUNCTION__RULES = eINSTANCE.getRuleFunction_Rules(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.FunctionRuleImpl <em>Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Matches</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference FUNCTION_RULE__MATCHES = eINSTANCE.getFunctionRule_Matches(); + + /** + * The meta object literal for the '<em><b>Action</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference FUNCTION_RULE__ACTION = eINSTANCE.getFunctionRule_Action(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.FunctionActionImpl <em>Action</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute FUNCTION_ACTION__VALUE = eINSTANCE.getFunctionAction_Value(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.RuleUpdateFunctionImpl <em>Rule Update Function</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Rules</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference RULE_UPDATE_FUNCTION__RULES = eINSTANCE.getRuleUpdateFunction_Rules(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.FunctionUpdateRuleImpl <em>Update Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Matches</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference FUNCTION_UPDATE_RULE__MATCHES = eINSTANCE.getFunctionUpdateRule_Matches(); + + /** + * The meta object literal for the '<em><b>Updates</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference FUNCTION_UPDATE_RULE__UPDATES = eINSTANCE.getFunctionUpdateRule_Updates(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.FunctionUpdateImpl <em>Update</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Update Attribute</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Path</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute FUNCTION_UPDATE_ATTRIBUTE__PATH = eINSTANCE.getFunctionUpdateAttribute_Path(); + + /** + * The meta object literal for the '<em><b>Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute FUNCTION_UPDATE_ATTRIBUTE__VALUE = eINSTANCE.getFunctionUpdateAttribute_Value(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.FunctionMatchImpl <em>Match</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Match Attribute</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Path</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute FUNCTION_MATCH_ATTRIBUTE__PATH = eINSTANCE.getFunctionMatchAttribute_Path(); + + /** + * The meta object literal for the '<em><b>Match</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute FUNCTION_MATCH_ATTRIBUTE__MATCH = eINSTANCE.getFunctionMatchAttribute_Match(); + + /** + * The meta object literal for the '<em><b>Negation</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute FUNCTION_MATCH_ATTRIBUTE__NEGATION = eINSTANCE.getFunctionMatchAttribute_Negation(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.FunctionMatchMetricImpl <em>Match Metric</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Path</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute FUNCTION_MATCH_METRIC__PATH = eINSTANCE.getFunctionMatchMetric_Path(); + + /** + * The meta object literal for the '<em><b>Option</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference FUNCTION_MATCH_METRIC__OPTION = eINSTANCE.getFunctionMatchMetric_Option(); + + /** + * The meta object literal for the '<em><b>Lower Bound</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute FUNCTION_MATCH_METRIC__LOWER_BOUND = eINSTANCE.getFunctionMatchMetric_LowerBound(); + + /** + * The meta object literal for the '<em><b>Upper Bound</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute FUNCTION_MATCH_METRIC__UPPER_BOUND = eINSTANCE.getFunctionMatchMetric_UpperBound(); + + /** + * The meta object literal for the '<em><b>Negation</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute FUNCTION_MATCH_METRIC__NEGATION = eINSTANCE.getFunctionMatchMetric_Negation(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.FunctionMatchInstanceOfImpl <em>Match Instance Of</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>EPackage</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute FUNCTION_MATCH_INSTANCE_OF__EPACKAGE = eINSTANCE.getFunctionMatchInstanceOf_EPackage(); + + /** + * The meta object literal for the '<em><b>EName</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute FUNCTION_MATCH_INSTANCE_OF__ENAME = eINSTANCE.getFunctionMatchInstanceOf_EName(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.ValuePairImpl <em>Value Pair</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Path</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute VALUE_PAIR__PATH = eINSTANCE.getValuePair_Path(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.function.impl.StringValuePairImpl <em>String Value Pair</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Rule</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.FunctionRule#getMatches <em>Matches</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.FunctionRule#getAction <em>Action</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionRule() + * @model + * @generated + */ +public interface FunctionRule extends EObject { + /** + * Returns the value of the '<em><b>Matches</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.function.FunctionMatch}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Matches</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Matches</em>' containment reference list. + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionRule_Matches() + * @model containment="true" + * @generated + */ + EList<FunctionMatch> getMatches(); + + /** + * Returns the value of the '<em><b>Action</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Action</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Action</em>' 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 <em>Action</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Action</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Update</b></em>'. + * <!-- end-user-doc --> + * + * + * @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; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Update Attribute</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.FunctionUpdateAttribute#getPath <em>Path</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.FunctionUpdateAttribute#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionUpdateAttribute() + * @model + * @generated + */ +public interface FunctionUpdateAttribute extends FunctionUpdate { + /** + * Returns the value of the '<em><b>Path</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Path</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Path</em>' 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 <em>Path</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Path</em>' attribute. + * @see #getPath() + * @generated + */ + void setPath(String value); + + /** + * Returns the value of the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Value</em>' 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 <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Value</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Update Rule</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.FunctionUpdateRule#getMatches <em>Matches</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.FunctionUpdateRule#getUpdates <em>Updates</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionUpdateRule() + * @model + * @generated + */ +public interface FunctionUpdateRule extends EObject { + /** + * Returns the value of the '<em><b>Matches</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.function.FunctionMatch}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Matches</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Matches</em>' containment reference list. + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionUpdateRule_Matches() + * @model containment="true" + * @generated + */ + EList<FunctionMatch> getMatches(); + + /** + * Returns the value of the '<em><b>Updates</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.function.FunctionUpdate}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Updates</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Updates</em>' containment reference list. + * @see org.openecomp.ncomp.core.function.FunctionPackage#getFunctionUpdateRule_Updates() + * @model containment="true" + * @generated + */ + EList<FunctionUpdate> 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Iterator</b></em>'. + * <!-- end-user-doc --> + * + * + * @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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Iterator Using Function</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.IteratorUsingFunction#getPaths <em>Paths</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.IteratorUsingFunction#isRecursive <em>Recursive</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.IteratorUsingFunction#getFilter <em>Filter</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getIteratorUsingFunction() + * @model + * @generated + */ +public interface IteratorUsingFunction extends Iterator { + /** + * Returns the value of the '<em><b>Paths</b></em>' attribute list. + * The list contents are of type {@link java.lang.String}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Paths</em>' attribute list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Paths</em>' attribute list. + * @see org.openecomp.ncomp.core.function.FunctionPackage#getIteratorUsingFunction_Paths() + * @model unique="false" + * @generated + */ + EList<String> getPaths(); + + /** + * Returns the value of the '<em><b>Recursive</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Recursive</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Recursive</em>' 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 <em>Recursive</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Recursive</em>' attribute. + * @see #isRecursive() + * @generated + */ + void setRecursive(boolean value); + + /** + * Returns the value of the '<em><b>Filter</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Filter</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Filter</em>' 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 <em>Filter</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Filter</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Rule Function</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.RuleFunction#getRules <em>Rules</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getRuleFunction() + * @model + * @generated + */ +public interface RuleFunction extends Function { + /** + * Returns the value of the '<em><b>Rules</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.function.FunctionRule}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Rules</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Rules</em>' containment reference list. + * @see org.openecomp.ncomp.core.function.FunctionPackage#getRuleFunction_Rules() + * @model containment="true" + * @generated + */ + EList<FunctionRule> 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Rule Update Function</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.RuleUpdateFunction#getRules <em>Rules</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getRuleUpdateFunction() + * @model + * @generated + */ +public interface RuleUpdateFunction extends Function { + /** + * Returns the value of the '<em><b>Rules</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.function.FunctionUpdateRule}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Rules</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Rules</em>' containment reference list. + * @see org.openecomp.ncomp.core.function.FunctionPackage#getRuleUpdateFunction_Rules() + * @model containment="true" + * @generated + */ + EList<FunctionUpdateRule> 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; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>String Value Pair</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.StringValuePair#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getStringValuePair() + * @model + * @generated + */ +public interface StringValuePair extends ValuePair { + /** + * Returns the value of the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Value</em>' 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 <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Value</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Value Pair</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.ValuePair#getPath <em>Path</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.function.FunctionPackage#getValuePair() + * @model abstract="true" + * @generated + */ +public interface ValuePair extends EObject { + /** + * Returns the value of the '<em><b>Path</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Path</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Path</em>' 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 <em>Path</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Path</em>' 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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Action</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.impl.FunctionActionImpl#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class FunctionActionImpl extends MinimalEObjectImpl.Container implements FunctionAction { + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FunctionActionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.FUNCTION_ACTION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionPackage.FUNCTION_ACTION__VALUE: + setValue((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionPackage.FUNCTION_ACTION__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Factory</b>. + * <!-- end-user-doc --> + * @generated + */ +public class FunctionFactoryImpl extends EFactoryImpl implements FunctionFactory { + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public FunctionFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public IteratorUsingFunction createIteratorUsingFunction() { + IteratorUsingFunctionImpl iteratorUsingFunction = new IteratorUsingFunctionImpl(); + return iteratorUsingFunction; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public RuleFunction createRuleFunction() { + RuleFunctionImpl ruleFunction = new RuleFunctionImpl(); + return ruleFunction; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public FunctionRule createFunctionRule() { + FunctionRuleImpl functionRule = new FunctionRuleImpl(); + return functionRule; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public FunctionAction createFunctionAction() { + FunctionActionImpl functionAction = new FunctionActionImpl(); + return functionAction; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public RuleUpdateFunction createRuleUpdateFunction() { + RuleUpdateFunctionImpl ruleUpdateFunction = new RuleUpdateFunctionImpl(); + return ruleUpdateFunction; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public FunctionUpdateRule createFunctionUpdateRule() { + FunctionUpdateRuleImpl functionUpdateRule = new FunctionUpdateRuleImpl(); + return functionUpdateRule; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public FunctionUpdateAttribute createFunctionUpdateAttribute() { + FunctionUpdateAttributeImpl functionUpdateAttribute = new FunctionUpdateAttributeImpl(); + return functionUpdateAttribute; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public FunctionMatchAttribute createFunctionMatchAttribute() { + FunctionMatchAttributeImpl functionMatchAttribute = new FunctionMatchAttributeImpl(); + return functionMatchAttribute; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public FunctionMatchMetric createFunctionMatchMetric() { + FunctionMatchMetricImpl functionMatchMetric = new FunctionMatchMetricImpl(); + return functionMatchMetric; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public FunctionMatchInstanceOf createFunctionMatchInstanceOf() { + FunctionMatchInstanceOfImpl functionMatchInstanceOf = new FunctionMatchInstanceOfImpl(); + return functionMatchInstanceOf; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public StringValuePair createStringValuePair() { + StringValuePairImpl stringValuePair = new StringValuePairImpl(); + return stringValuePair; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public FunctionPackage getFunctionPackage() { + return (FunctionPackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Function</b></em>'. + * <!-- end-user-doc --> + * <p> + * </p> + * + * @generated + */ +public abstract class FunctionImpl extends NamedEntityImpl implements Function { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FunctionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Match Attribute</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.impl.FunctionMatchAttributeImpl#getPath <em>Path</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.impl.FunctionMatchAttributeImpl#getMatch <em>Match</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.impl.FunctionMatchAttributeImpl#isNegation <em>Negation</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class FunctionMatchAttributeImpl extends FunctionMatchImpl implements FunctionMatchAttribute { + /** + * The default value of the '{@link #getPath() <em>Path</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPath() + * @generated + * @ordered + */ + protected static final String PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPath() <em>Path</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPath() + * @generated + * @ordered + */ + protected String path = PATH_EDEFAULT; + + /** + * The default value of the '{@link #getMatch() <em>Match</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMatch() + * @generated + * @ordered + */ + protected static final String MATCH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMatch() <em>Match</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMatch() + * @generated + * @ordered + */ + protected String match = MATCH_EDEFAULT; + + /** + * The default value of the '{@link #isNegation() <em>Negation</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isNegation() + * @generated + * @ordered + */ + protected static final boolean NEGATION_EDEFAULT = false; + + /** + * The cached value of the '{@link #isNegation() <em>Negation</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isNegation() + * @generated + * @ordered + */ + protected boolean negation = NEGATION_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FunctionMatchAttributeImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.FUNCTION_MATCH_ATTRIBUTE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getPath() { + return path; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getMatch() { + return match; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isNegation() { + return negation; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Match</b></em>'. + * <!-- end-user-doc --> + * <p> + * </p> + * + * @generated + */ +public abstract class FunctionMatchImpl extends MinimalEObjectImpl.Container implements FunctionMatch { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FunctionMatchImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Match Instance Of</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.impl.FunctionMatchInstanceOfImpl#getEPackage <em>EPackage</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.impl.FunctionMatchInstanceOfImpl#getEName <em>EName</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class FunctionMatchInstanceOfImpl extends FunctionMatchImpl implements FunctionMatchInstanceOf { + /** + * The default value of the '{@link #getEPackage() <em>EPackage</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getEPackage() + * @generated + * @ordered + */ + protected static final String EPACKAGE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getEPackage() <em>EPackage</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getEPackage() + * @generated + * @ordered + */ + protected String ePackage = EPACKAGE_EDEFAULT; + + /** + * The default value of the '{@link #getEName() <em>EName</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getEName() + * @generated + * @ordered + */ + protected static final String ENAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getEName() <em>EName</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getEName() + * @generated + * @ordered + */ + protected String eName = ENAME_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FunctionMatchInstanceOfImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.FUNCTION_MATCH_INSTANCE_OF; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getEPackage() { + return ePackage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getEName() { + return eName; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Match Metric</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.impl.FunctionMatchMetricImpl#getPath <em>Path</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.impl.FunctionMatchMetricImpl#getOption <em>Option</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.impl.FunctionMatchMetricImpl#getLowerBound <em>Lower Bound</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.impl.FunctionMatchMetricImpl#getUpperBound <em>Upper Bound</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.impl.FunctionMatchMetricImpl#isNegation <em>Negation</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class FunctionMatchMetricImpl extends FunctionMatchImpl implements FunctionMatchMetric { + /** + * The default value of the '{@link #getPath() <em>Path</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPath() + * @generated + * @ordered + */ + protected static final String PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPath() <em>Path</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPath() + * @generated + * @ordered + */ + protected String path = PATH_EDEFAULT; + + /** + * The cached value of the '{@link #getOption() <em>Option</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getOption() + * @generated + * @ordered + */ + protected MetricValueOption option; + + /** + * The default value of the '{@link #getLowerBound() <em>Lower Bound</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLowerBound() + * @generated + * @ordered + */ + protected static final Double LOWER_BOUND_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLowerBound() <em>Lower Bound</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLowerBound() + * @generated + * @ordered + */ + protected Double lowerBound = LOWER_BOUND_EDEFAULT; + + /** + * The default value of the '{@link #getUpperBound() <em>Upper Bound</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getUpperBound() + * @generated + * @ordered + */ + protected static final Double UPPER_BOUND_EDEFAULT = null; + + /** + * The cached value of the '{@link #getUpperBound() <em>Upper Bound</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getUpperBound() + * @generated + * @ordered + */ + protected Double upperBound = UPPER_BOUND_EDEFAULT; + + /** + * The default value of the '{@link #isNegation() <em>Negation</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isNegation() + * @generated + * @ordered + */ + protected static final boolean NEGATION_EDEFAULT = false; + + /** + * The cached value of the '{@link #isNegation() <em>Negation</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isNegation() + * @generated + * @ordered + */ + protected boolean negation = NEGATION_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FunctionMatchMetricImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.FUNCTION_MATCH_METRIC; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getPath() { + return path; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public MetricValueOption basicGetOption() { + return option; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Double getLowerBound() { + return lowerBound; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Double getUpperBound() { + return upperBound; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isNegation() { + return negation; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * @generated + */ +public class FunctionPackageImpl extends EPackageImpl implements FunctionPackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass functionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass iteratorEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass iteratorUsingFunctionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass ruleFunctionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass functionRuleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass functionActionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass ruleUpdateFunctionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass functionUpdateRuleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass functionUpdateEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass functionUpdateAttributeEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass functionMatchEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass functionMatchAttributeEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass functionMatchMetricEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass functionMatchInstanceOfEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass valuePairEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass stringValuePairEClass = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + * <p>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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. + * + * <p>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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getFunction() { + return functionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getIterator() { + return iteratorEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getIteratorUsingFunction() { + return iteratorUsingFunctionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getIteratorUsingFunction_Paths() { + return (EAttribute)iteratorUsingFunctionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getIteratorUsingFunction_Recursive() { + return (EAttribute)iteratorUsingFunctionEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getIteratorUsingFunction_Filter() { + return (EReference)iteratorUsingFunctionEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getRuleFunction() { + return ruleFunctionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getRuleFunction_Rules() { + return (EReference)ruleFunctionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getFunctionRule() { + return functionRuleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getFunctionRule_Matches() { + return (EReference)functionRuleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getFunctionRule_Action() { + return (EReference)functionRuleEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getFunctionAction() { + return functionActionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFunctionAction_Value() { + return (EAttribute)functionActionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getRuleUpdateFunction() { + return ruleUpdateFunctionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getRuleUpdateFunction_Rules() { + return (EReference)ruleUpdateFunctionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getFunctionUpdateRule() { + return functionUpdateRuleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getFunctionUpdateRule_Matches() { + return (EReference)functionUpdateRuleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getFunctionUpdateRule_Updates() { + return (EReference)functionUpdateRuleEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getFunctionUpdate() { + return functionUpdateEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getFunctionUpdateAttribute() { + return functionUpdateAttributeEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFunctionUpdateAttribute_Path() { + return (EAttribute)functionUpdateAttributeEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFunctionUpdateAttribute_Value() { + return (EAttribute)functionUpdateAttributeEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getFunctionMatch() { + return functionMatchEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getFunctionMatchAttribute() { + return functionMatchAttributeEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFunctionMatchAttribute_Path() { + return (EAttribute)functionMatchAttributeEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFunctionMatchAttribute_Match() { + return (EAttribute)functionMatchAttributeEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFunctionMatchAttribute_Negation() { + return (EAttribute)functionMatchAttributeEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getFunctionMatchMetric() { + return functionMatchMetricEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFunctionMatchMetric_Path() { + return (EAttribute)functionMatchMetricEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getFunctionMatchMetric_Option() { + return (EReference)functionMatchMetricEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFunctionMatchMetric_LowerBound() { + return (EAttribute)functionMatchMetricEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFunctionMatchMetric_UpperBound() { + return (EAttribute)functionMatchMetricEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFunctionMatchMetric_Negation() { + return (EAttribute)functionMatchMetricEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getFunctionMatchInstanceOf() { + return functionMatchInstanceOfEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFunctionMatchInstanceOf_EPackage() { + return (EAttribute)functionMatchInstanceOfEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getFunctionMatchInstanceOf_EName() { + return (EAttribute)functionMatchInstanceOfEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getValuePair() { + return valuePairEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getValuePair_Path() { + return (EAttribute)valuePairEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getStringValuePair() { + return stringValuePairEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getStringValuePair_Value() { + return (EAttribute)stringValuePairEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public FunctionFactory getFunctionFactory() { + return (FunctionFactory)getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Rule</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.impl.FunctionRuleImpl#getMatches <em>Matches</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.impl.FunctionRuleImpl#getAction <em>Action</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class FunctionRuleImpl extends MinimalEObjectImpl.Container implements FunctionRule { + /** + * The cached value of the '{@link #getMatches() <em>Matches</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMatches() + * @generated + * @ordered + */ + protected EList<FunctionMatch> matches; + + /** + * The cached value of the '{@link #getAction() <em>Action</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAction() + * @generated + * @ordered + */ + protected FunctionAction action; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FunctionRuleImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.FUNCTION_RULE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<FunctionMatch> getMatches() { + if (matches == null) { + matches = new EObjectContainmentEList<FunctionMatch>(FunctionMatch.class, this, FunctionPackage.FUNCTION_RULE__MATCHES); + } + return matches; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public FunctionAction getAction() { + return action; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionPackage.FUNCTION_RULE__MATCHES: + getMatches().clear(); + getMatches().addAll((Collection<? extends FunctionMatch>)newValue); + return; + case FunctionPackage.FUNCTION_RULE__ACTION: + setAction((FunctionAction)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Update Attribute</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.impl.FunctionUpdateAttributeImpl#getPath <em>Path</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.impl.FunctionUpdateAttributeImpl#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class FunctionUpdateAttributeImpl extends FunctionUpdateImpl implements FunctionUpdateAttribute { + /** + * The default value of the '{@link #getPath() <em>Path</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPath() + * @generated + * @ordered + */ + protected static final String PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPath() <em>Path</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPath() + * @generated + * @ordered + */ + protected String path = PATH_EDEFAULT; + + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FunctionUpdateAttributeImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.FUNCTION_UPDATE_ATTRIBUTE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getPath() { + return path; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Update</b></em>'. + * <!-- end-user-doc --> + * <p> + * </p> + * + * @generated + */ +public abstract class FunctionUpdateImpl extends MinimalEObjectImpl.Container implements FunctionUpdate { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FunctionUpdateImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Update Rule</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.impl.FunctionUpdateRuleImpl#getMatches <em>Matches</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.impl.FunctionUpdateRuleImpl#getUpdates <em>Updates</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class FunctionUpdateRuleImpl extends MinimalEObjectImpl.Container implements FunctionUpdateRule { + /** + * The cached value of the '{@link #getMatches() <em>Matches</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMatches() + * @generated + * @ordered + */ + protected EList<FunctionMatch> matches; + + /** + * The cached value of the '{@link #getUpdates() <em>Updates</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getUpdates() + * @generated + * @ordered + */ + protected EList<FunctionUpdate> updates; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FunctionUpdateRuleImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.FUNCTION_UPDATE_RULE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<FunctionMatch> getMatches() { + if (matches == null) { + matches = new EObjectContainmentEList<FunctionMatch>(FunctionMatch.class, this, FunctionPackage.FUNCTION_UPDATE_RULE__MATCHES); + } + return matches; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<FunctionUpdate> getUpdates() { + if (updates == null) { + updates = new EObjectContainmentEList<FunctionUpdate>(FunctionUpdate.class, this, FunctionPackage.FUNCTION_UPDATE_RULE__UPDATES); + } + return updates; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionPackage.FUNCTION_UPDATE_RULE__MATCHES: + getMatches().clear(); + getMatches().addAll((Collection<? extends FunctionMatch>)newValue); + return; + case FunctionPackage.FUNCTION_UPDATE_RULE__UPDATES: + getUpdates().clear(); + getUpdates().addAll((Collection<? extends FunctionUpdate>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Iterator</b></em>'. + * <!-- end-user-doc --> + * <p> + * </p> + * + * @generated + */ +public abstract class IteratorImpl extends NamedEntityImpl implements Iterator { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected IteratorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Iterator Using Function</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.impl.IteratorUsingFunctionImpl#getPaths <em>Paths</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.impl.IteratorUsingFunctionImpl#isRecursive <em>Recursive</em>}</li> + * <li>{@link org.openecomp.ncomp.core.function.impl.IteratorUsingFunctionImpl#getFilter <em>Filter</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class IteratorUsingFunctionImpl extends IteratorImpl implements IteratorUsingFunction { + /** + * The cached value of the '{@link #getPaths() <em>Paths</em>}' attribute list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPaths() + * @generated + * @ordered + */ + protected EList<String> paths; + + /** + * The default value of the '{@link #isRecursive() <em>Recursive</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isRecursive() + * @generated + * @ordered + */ + protected static final boolean RECURSIVE_EDEFAULT = false; + + /** + * The cached value of the '{@link #isRecursive() <em>Recursive</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isRecursive() + * @generated + * @ordered + */ + protected boolean recursive = RECURSIVE_EDEFAULT; + + /** + * The cached value of the '{@link #getFilter() <em>Filter</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFilter() + * @generated + * @ordered + */ + protected Function filter; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected IteratorUsingFunctionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.ITERATOR_USING_FUNCTION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<String> getPaths() { + if (paths == null) { + paths = new EDataTypeEList<String>(String.class, this, FunctionPackage.ITERATOR_USING_FUNCTION__PATHS); + } + return paths; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isRecursive() { + return recursive; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Function getFilter() { + return filter; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionPackage.ITERATOR_USING_FUNCTION__PATHS: + getPaths().clear(); + getPaths().addAll((Collection<? extends String>)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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Rule Function</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.impl.RuleFunctionImpl#getRules <em>Rules</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class RuleFunctionImpl extends FunctionImpl implements RuleFunction { + /** + * The cached value of the '{@link #getRules() <em>Rules</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRules() + * @generated + * @ordered + */ + protected EList<FunctionRule> rules; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected RuleFunctionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.RULE_FUNCTION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<FunctionRule> getRules() { + if (rules == null) { + rules = new EObjectContainmentEList<FunctionRule>(FunctionRule.class, this, FunctionPackage.RULE_FUNCTION__RULES); + } + return rules; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionPackage.RULE_FUNCTION__RULES: + getRules().clear(); + getRules().addAll((Collection<? extends FunctionRule>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionPackage.RULE_FUNCTION__RULES: + getRules().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Rule Update Function</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.impl.RuleUpdateFunctionImpl#getRules <em>Rules</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class RuleUpdateFunctionImpl extends FunctionImpl implements RuleUpdateFunction { + /** + * The cached value of the '{@link #getRules() <em>Rules</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getRules() + * @generated + * @ordered + */ + protected EList<FunctionUpdateRule> rules; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected RuleUpdateFunctionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.RULE_UPDATE_FUNCTION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<FunctionUpdateRule> getRules() { + if (rules == null) { + rules = new EObjectContainmentEList<FunctionUpdateRule>(FunctionUpdateRule.class, this, FunctionPackage.RULE_UPDATE_FUNCTION__RULES); + } + return rules; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionPackage.RULE_UPDATE_FUNCTION__RULES: + getRules().clear(); + getRules().addAll((Collection<? extends FunctionUpdateRule>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionPackage.RULE_UPDATE_FUNCTION__RULES: + getRules().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>String Value Pair</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.impl.StringValuePairImpl#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class StringValuePairImpl extends ValuePairImpl implements StringValuePair { + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected StringValuePairImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.STRING_VALUE_PAIR; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionPackage.STRING_VALUE_PAIR__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Value Pair</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.function.impl.ValuePairImpl#getPath <em>Path</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public abstract class ValuePairImpl extends MinimalEObjectImpl.Container implements ValuePair { + /** + * The default value of the '{@link #getPath() <em>Path</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPath() + * @generated + * @ordered + */ + protected static final String PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPath() <em>Path</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPath() + * @generated + * @ordered + */ + protected String path = PATH_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ValuePairImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return FunctionPackage.Literals.VALUE_PAIR; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getPath() { + return path; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FunctionPackage.VALUE_PAIR__PATH: + setPath((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FunctionPackage.VALUE_PAIR__PATH: + setPath(PATH_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * The <b>Adapter Factory</b> for the model. + * It provides an adapter <code>createXXX</code> method for each class of the model. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.function.FunctionPackage + * @generated + */ +public class FunctionAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static FunctionPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public FunctionAdapterFactory() { + if (modelPackage == null) { + modelPackage = FunctionPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * <!-- begin-user-doc --> + * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. + * <!-- end-user-doc --> + * @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 <code>createXXX</code> methods. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected FunctionSwitch<Adapter> modelSwitch = + new FunctionSwitch<Adapter>() { + @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 <code>target</code>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param target the object to adapt. + * @return the adapter for the <code>target</code>. + * @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 <em>Function</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Iterator</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Iterator Using Function</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Rule Function</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Rule</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Action</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Rule Update Function</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Update Rule</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Update</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Update Attribute</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Match</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Match Attribute</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Match Metric</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Match Instance Of</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Value Pair</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>String Value Pair</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Named Entity</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * <!-- begin-user-doc --> + * This default implementation returns null. + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * The <b>Switch</b> for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the <code>caseXXX</code> 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. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.function.FunctionPackage + * @generated + */ +public class FunctionSwitch<T> extends Switch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static FunctionPackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public FunctionSwitch() { + if (modelPackage == null) { + modelPackage = FunctionPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the first non-null result returned by a <code>caseXXX</code> 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 '<em>Function</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Function</em>'. + * @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 '<em>Iterator</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Iterator</em>'. + * @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 '<em>Iterator Using Function</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Iterator Using Function</em>'. + * @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 '<em>Rule Function</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Rule Function</em>'. + * @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 '<em>Rule</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Rule</em>'. + * @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 '<em>Action</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Action</em>'. + * @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 '<em>Rule Update Function</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Rule Update Function</em>'. + * @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 '<em>Update Rule</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Update Rule</em>'. + * @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 '<em>Update</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Update</em>'. + * @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 '<em>Update Attribute</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Update Attribute</em>'. + * @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 '<em>Match</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Match</em>'. + * @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 '<em>Match Attribute</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Match Attribute</em>'. + * @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 '<em>Match Metric</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Match Metric</em>'. + * @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 '<em>Match Instance Of</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Match Instance Of</em>'. + * @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 '<em>Value Pair</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Value Pair</em>'. + * @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 '<em>String Value Pair</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>String Value Pair</em>'. + * @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 '<em>Named Entity</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Named Entity</em>'. + * @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 '<em>EObject</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EObject</em>'. + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Factory</b>. + * <!-- end-user-doc --> + * @generated + */ +public class CoreFactoryImpl extends EFactoryImpl implements CoreFactory { + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CoreFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public User createUser() { + UserImpl user = new UserImpl(); + return user; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertOperationalStateToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertDeploymentStatusToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public JSONObject createJsonObjectFromString(EDataType eDataType, String initialValue) { + return createJsonObject(initialValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertJsonObjectToString(EDataType eDataType, Object instanceValue) { + return super.convertToString(eDataType, instanceValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public JSONObject createRemoteContextFromString(EDataType eDataType, String initialValue) { + return createRemoteContext(initialValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertRemoteContextToString(EDataType eDataType, Object instanceValue) { + return super.convertToString(eDataType, instanceValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public IncreasingULongMetricAttribute createIncreasingULongMetricAttributeFromString(EDataType eDataType, String initialValue) { + return (IncreasingULongMetricAttribute)super.createFromString(eDataType, initialValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertIncreasingULongMetricAttributeToString(EDataType eDataType, Object instanceValue) { + return convertIncreasingULongMetricAttribute((IncreasingULongMetricAttribute)instanceValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LongMetricAttribute createLongMetricAttributeFromString(EDataType eDataType, String initialValue) { + return (LongMetricAttribute)super.createFromString(eDataType, initialValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertLongMetricAttributeToString(EDataType eDataType, Object instanceValue) { + return convertLongMetricAttribute((LongMetricAttribute)instanceValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DoubleMetricAttribute createDoubleMetricAttributeFromString(EDataType eDataType, String initialValue) { + return (DoubleMetricAttribute)super.createFromString(eDataType, initialValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertDoubleMetricAttributeToString(EDataType eDataType, Object instanceValue) { + return convertDoubleMetricAttribute((DoubleMetricAttribute)instanceValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public StringMetricAttribute createStringMetricAttributeFromString(EDataType eDataType, String initialValue) { + return (StringMetricAttribute)super.createFromString(eDataType, initialValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertStringMetricAttributeToString(EDataType eDataType, Object instanceValue) { + return convertStringMetricAttribute((StringMetricAttribute)instanceValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DateMetricAttribute createDateMetricAttributeFromString(EDataType eDataType, String initialValue) { + return (DateMetricAttribute)super.createFromString(eDataType, initialValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertDateMetricAttributeToString(EDataType eDataType, Object instanceValue) { + return convertDateMetricAttribute((DateMetricAttribute)instanceValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CorePackage getCorePackage() { + return (CorePackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * @generated + */ +public class CorePackageImpl extends EPackageImpl implements CorePackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass namedEntityEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass eventEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass hasOperationalStateEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass userEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum operationalStateEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum deploymentStatusEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EDataType jsonObjectEDataType = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EDataType remoteContextEDataType = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EDataType increasingULongMetricAttributeEDataType = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EDataType longMetricAttributeEDataType = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EDataType doubleMetricAttributeEDataType = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EDataType stringMetricAttributeEDataType = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EDataType dateMetricAttributeEDataType = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + * <p>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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. + * + * <p>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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getNamedEntity() { + return namedEntityEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getNamedEntity_Name() { + return (EAttribute)namedEntityEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getNamedEntity_LastPolled() { + return (EAttribute)namedEntityEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getNamedEntity_LastChanged() { + return (EAttribute)namedEntityEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getNamedEntity_Created() { + return (EAttribute)namedEntityEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getEvent() { + return eventEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getHasOperationalState() { + return hasOperationalStateEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getHasOperationalState_OperationalState() { + return (EAttribute)hasOperationalStateEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getUser() { + return userEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getUser_PublicKey() { + return (EAttribute)userEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getUser_DeploymentStatus() { + return (EAttribute)userEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getOperationalState() { + return operationalStateEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getDeploymentStatus() { + return deploymentStatusEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EDataType getJsonObject() { + return jsonObjectEDataType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EDataType getRemoteContext() { + return remoteContextEDataType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EDataType getIncreasingULongMetricAttribute() { + return increasingULongMetricAttributeEDataType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EDataType getLongMetricAttribute() { + return longMetricAttributeEDataType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EDataType getDoubleMetricAttribute() { + return doubleMetricAttributeEDataType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EDataType getStringMetricAttribute() { + return stringMetricAttributeEDataType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EDataType getDateMetricAttribute() { + return dateMetricAttributeEDataType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CoreFactory getCoreFactory() { + return (CoreFactory)getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <b>http://www.eclipse.org/emf/2011/Xcore</b>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <b>http://openecomp.org</b>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Event</b></em>'. + * <!-- end-user-doc --> + * <p> + * </p> + * + * @generated + */ +public abstract class EventImpl extends MinimalEObjectImpl.Container implements Event { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected EventImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Has Operational State</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.impl.HasOperationalStateImpl#getOperationalState <em>Operational State</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public abstract class HasOperationalStateImpl extends MinimalEObjectImpl.Container implements HasOperationalState { + /** + * The default value of the '{@link #getOperationalState() <em>Operational State</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getOperationalState() + * @generated + * @ordered + */ + protected static final OperationalState OPERATIONAL_STATE_EDEFAULT = OperationalState.OPERATIONAL; + + /** + * The cached value of the '{@link #getOperationalState() <em>Operational State</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getOperationalState() + * @generated + * @ordered + */ + protected OperationalState operationalState = OPERATIONAL_STATE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected HasOperationalStateImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return CorePackage.Literals.HAS_OPERATIONAL_STATE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public OperationalState getOperationalState() { + return operationalState; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case CorePackage.HAS_OPERATIONAL_STATE__OPERATIONAL_STATE: + setOperationalState(OPERATIONAL_STATE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Named Entity</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.impl.NamedEntityImpl#getName <em>Name</em>}</li> + * <li>{@link org.openecomp.ncomp.core.impl.NamedEntityImpl#getLastPolled <em>Last Polled</em>}</li> + * <li>{@link org.openecomp.ncomp.core.impl.NamedEntityImpl#getLastChanged <em>Last Changed</em>}</li> + * <li>{@link org.openecomp.ncomp.core.impl.NamedEntityImpl#getCreated <em>Created</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public abstract class NamedEntityImpl extends MinimalEObjectImpl.Container implements NamedEntity { + /** + * The default value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected static final String NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getName() <em>Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getName() + * @generated + * @ordered + */ + protected String name = NAME_EDEFAULT; + + /** + * The default value of the '{@link #getLastPolled() <em>Last Polled</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLastPolled() + * @generated + * @ordered + */ + protected static final Date LAST_POLLED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLastPolled() <em>Last Polled</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLastPolled() + * @generated + * @ordered + */ + protected Date lastPolled = LAST_POLLED_EDEFAULT; + + /** + * The default value of the '{@link #getLastChanged() <em>Last Changed</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLastChanged() + * @generated + * @ordered + */ + protected static final Date LAST_CHANGED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLastChanged() <em>Last Changed</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLastChanged() + * @generated + * @ordered + */ + protected Date lastChanged = LAST_CHANGED_EDEFAULT; + + /** + * The default value of the '{@link #getCreated() <em>Created</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCreated() + * @generated + * @ordered + */ + protected static final Date CREATED_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCreated() <em>Created</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCreated() + * @generated + * @ordered + */ + protected Date created = CREATED_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected NamedEntityImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return CorePackage.Literals.NAMED_ENTITY; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Date getLastPolled() { + return lastPolled; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Date getLastChanged() { + return lastChanged; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Date getCreated() { + return created; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>User</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.impl.UserImpl#getPublicKey <em>Public Key</em>}</li> + * <li>{@link org.openecomp.ncomp.core.impl.UserImpl#getDeploymentStatus <em>Deployment Status</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class UserImpl extends NamedEntityImpl implements User { + /** + * The default value of the '{@link #getPublicKey() <em>Public Key</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPublicKey() + * @generated + * @ordered + */ + protected static final String PUBLIC_KEY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPublicKey() <em>Public Key</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPublicKey() + * @generated + * @ordered + */ + protected String publicKey = PUBLIC_KEY_EDEFAULT; + + /** + * The default value of the '{@link #getDeploymentStatus() <em>Deployment Status</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDeploymentStatus() + * @generated + * @ordered + */ + protected static final DeploymentStatus DEPLOYMENT_STATUS_EDEFAULT = DeploymentStatus.UNDEPLOYED; + + /** + * The cached value of the '{@link #getDeploymentStatus() <em>Deployment Status</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDeploymentStatus() + * @generated + * @ordered + */ + protected DeploymentStatus deploymentStatus = DEPLOYMENT_STATUS_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected UserImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return CorePackage.Literals.USER; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getPublicKey() { + return publicKey; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DeploymentStatus getDeploymentStatus() { + return deploymentStatus; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Log Configuration</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.logs.LogConfiguration#getFiles <em>Files</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogConfiguration() + * @model + * @generated + */ +public interface LogConfiguration extends EObject { + /** + * Returns the value of the '<em><b>Files</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.logs.LogFile}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Files</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Files</em>' containment reference list. + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogConfiguration_Files() + * @model containment="true" + * @generated + */ + EList<LogFile> 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Log File</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.logs.LogFile#getFilename <em>Filename</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogFile#getPatterns <em>Patterns</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogFile() + * @model + * @generated + */ +public interface LogFile extends EObject { + /** + * Returns the value of the '<em><b>Filename</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Filename</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Filename</em>' 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 <em>Filename</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Filename</em>' attribute. + * @see #getFilename() + * @generated + */ + void setFilename(String value); + + /** + * Returns the value of the '<em><b>Patterns</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.logs.LogPattern}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Patterns</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Patterns</em>' containment reference list. + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogFile_Patterns() + * @model containment="true" + * @generated + */ + EList<LogPattern> 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; + +/** + * <!-- begin-user-doc --> + * A representation of the literals of the enumeration '<em><b>Log Level</b></em>', + * and utility methods for working with them. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogLevel() + * @model + * @generated + */ +public enum LogLevel implements Enumerator { + /** + * The '<em><b>UNKNOWN</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #UNKNOWN_VALUE + * @generated + * @ordered + */ + UNKNOWN(0, "UNKNOWN", "UNKNOWN"), + + /** + * The '<em><b>TRACE</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #TRACE_VALUE + * @generated + * @ordered + */ + TRACE(0, "TRACE", "TRACE"), + + /** + * The '<em><b>DEBUG</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #DEBUG_VALUE + * @generated + * @ordered + */ + DEBUG(0, "DEBUG", "DEBUG"), + + /** + * The '<em><b>INFO</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #INFO_VALUE + * @generated + * @ordered + */ + INFO(0, "INFO", "INFO"), + + /** + * The '<em><b>WARN</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #WARN_VALUE + * @generated + * @ordered + */ + WARN(0, "WARN", "WARN"), + + /** + * The '<em><b>ERROR</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #ERROR_VALUE + * @generated + * @ordered + */ + ERROR(0, "ERROR", "ERROR"), + + /** + * The '<em><b>FATAL</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #FATAL_VALUE + * @generated + * @ordered + */ + FATAL(0, "FATAL", "FATAL"); + + /** + * The '<em><b>UNKNOWN</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>UNKNOWN</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #UNKNOWN + * @model + * @generated + * @ordered + */ + public static final int UNKNOWN_VALUE = 0; + + /** + * The '<em><b>TRACE</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>TRACE</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #TRACE + * @model + * @generated + * @ordered + */ + public static final int TRACE_VALUE = 0; + + /** + * The '<em><b>DEBUG</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>DEBUG</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #DEBUG + * @model + * @generated + * @ordered + */ + public static final int DEBUG_VALUE = 0; + + /** + * The '<em><b>INFO</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>INFO</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #INFO + * @model + * @generated + * @ordered + */ + public static final int INFO_VALUE = 0; + + /** + * The '<em><b>WARN</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>WARN</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #WARN + * @model + * @generated + * @ordered + */ + public static final int WARN_VALUE = 0; + + /** + * The '<em><b>ERROR</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>ERROR</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #ERROR + * @model + * @generated + * @ordered + */ + public static final int ERROR_VALUE = 0; + + /** + * The '<em><b>FATAL</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>FATAL</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #FATAL + * @model + * @generated + * @ordered + */ + public static final int FATAL_VALUE = 0; + + /** + * An array of all the '<em><b>Log Level</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static final LogLevel[] VALUES_ARRAY = + new LogLevel[] { + UNKNOWN, + TRACE, + DEBUG, + INFO, + WARN, + ERROR, + FATAL, + }; + + /** + * A public read-only list of all the '<em><b>Log Level</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static final List<LogLevel> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the '<em><b>Log Level</b></em>' literal with the specified literal value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Log Level</b></em>' literal with the specified name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Log Level</b></em>' literal with the specified integer value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static LogLevel get(int value) { + switch (value) { + case UNKNOWN_VALUE: return UNKNOWN; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private LogLevel(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Log Message</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessage#getTime <em>Time</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessage#getResourceName <em>Resource Name</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessage#getSeverity <em>Severity</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessage#getLevel <em>Level</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessage#getMessage <em>Message</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessage#getCategory <em>Category</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessage#getNumberOfSuppressed <em>Number Of Suppressed</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessage#getSuppressedStartTime <em>Suppressed Start Time</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessage() + * @model + * @generated + */ +public interface LogMessage extends EObject { + /** + * Returns the value of the '<em><b>Time</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Time</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Time</em>' 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 <em>Time</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Time</em>' attribute. + * @see #getTime() + * @generated + */ + void setTime(long value); + + /** + * Returns the value of the '<em><b>Resource Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Resource Name</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Resource Name</em>' 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 <em>Resource Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Resource Name</em>' attribute. + * @see #getResourceName() + * @generated + */ + void setResourceName(String value); + + /** + * Returns the value of the '<em><b>Severity</b></em>' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.logs.LogSeverity}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Severity</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Severity</em>' 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 <em>Severity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Severity</em>' attribute. + * @see org.openecomp.ncomp.core.logs.LogSeverity + * @see #getSeverity() + * @generated + */ + void setSeverity(LogSeverity value); + + /** + * Returns the value of the '<em><b>Level</b></em>' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.logs.LogLevel}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Level</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Level</em>' 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 <em>Level</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Level</em>' attribute. + * @see org.openecomp.ncomp.core.logs.LogLevel + * @see #getLevel() + * @generated + */ + void setLevel(LogLevel value); + + /** + * Returns the value of the '<em><b>Message</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Message</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Message</em>' 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 <em>Message</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Message</em>' attribute. + * @see #getMessage() + * @generated + */ + void setMessage(String value); + + /** + * Returns the value of the '<em><b>Category</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Category</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Category</em>' 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 <em>Category</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Category</em>' attribute. + * @see #getCategory() + * @generated + */ + void setCategory(String value); + + /** + * Returns the value of the '<em><b>Number Of Suppressed</b></em>' attribute. + * The default value is <code>"0"</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Number Of Suppressed</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Number Of Suppressed</em>' 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 <em>Number Of Suppressed</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Number Of Suppressed</em>' attribute. + * @see #getNumberOfSuppressed() + * @generated + */ + void setNumberOfSuppressed(int value); + + /** + * Returns the value of the '<em><b>Suppressed Start Time</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Suppressed Start Time</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Suppressed Start Time</em>' 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 <em>Suppressed Start Time</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Suppressed Start Time</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Log Message Category</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessageCategory#getStats <em>Stats</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageCategory() + * @model + * @generated + */ +public interface LogMessageCategory extends NamedEntity { + /** + * Returns the value of the '<em><b>Stats</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.logs.LogMessageStats}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Stats</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Stats</em>' containment reference list. + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageCategory_Stats() + * @model containment="true" + * @generated + */ + EList<LogMessageStats> 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Log Message Container</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessageContainer#getLogMessageConfiguration <em>Log Message Configuration</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessageContainer#getLogMessageCategories <em>Log Message Categories</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessageContainer#getLogMessageStats <em>Log Message Stats</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageContainer() + * @model abstract="true" + * @generated + */ +public interface LogMessageContainer extends EObject { + /** + * Returns the value of the '<em><b>Log Message Configuration</b></em>' containment reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Log Message Configuration</em>' containment reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Log Message Configuration</em>' 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 <em>Log Message Configuration</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Log Message Configuration</em>' containment reference. + * @see #getLogMessageConfiguration() + * @generated + */ + void setLogMessageConfiguration(LogMessageContainerConfiguration value); + + /** + * Returns the value of the '<em><b>Log Message Categories</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.logs.LogMessageCategory}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Log Message Categories</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Log Message Categories</em>' containment reference list. + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageContainer_LogMessageCategories() + * @model containment="true" + * @generated + */ + EList<LogMessageCategory> getLogMessageCategories(); + + /** + * Returns the value of the '<em><b>Log Message Stats</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.logs.LogMessageStats}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Log Message Stats</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Log Message Stats</em>' containment reference list. + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageContainer_LogMessageStats() + * @model containment="true" + * @generated + */ + EList<LogMessageStats> 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Log Message Container Configuration</b></em>'. + * <!-- end-user-doc --> + * + * + * @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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Log Message Rule</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessageRule#getDescription <em>Description</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessageRule#getMessageFilter <em>Message Filter</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessageRule#getResourcePathFilter <em>Resource Path Filter</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessageRule#getLevel <em>Level</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessageRule#getSeverity <em>Severity</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessageRule#getNewLevel <em>New Level</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessageRule#getNewSeverity <em>New Severity</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessageRule#getNewCategory <em>New Category</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessageRule#isDisabled <em>Disabled</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessageRule#getUpdateFunction <em>Update Function</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageRule() + * @model + * @generated + */ +public interface LogMessageRule extends NamedEntity { + /** + * Returns the value of the '<em><b>Description</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Description</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Description</em>' 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 <em>Description</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Description</em>' attribute. + * @see #getDescription() + * @generated + */ + void setDescription(String value); + + /** + * Returns the value of the '<em><b>Message Filter</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Message Filter</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Message Filter</em>' 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 <em>Message Filter</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Message Filter</em>' attribute. + * @see #getMessageFilter() + * @generated + */ + void setMessageFilter(String value); + + /** + * Returns the value of the '<em><b>Resource Path Filter</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Resource Path Filter</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Resource Path Filter</em>' 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 <em>Resource Path Filter</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Resource Path Filter</em>' attribute. + * @see #getResourcePathFilter() + * @generated + */ + void setResourcePathFilter(String value); + + /** + * Returns the value of the '<em><b>Level</b></em>' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.logs.LogLevel}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Level</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Level</em>' 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 <em>Level</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Level</em>' attribute. + * @see org.openecomp.ncomp.core.logs.LogLevel + * @see #getLevel() + * @generated + */ + void setLevel(LogLevel value); + + /** + * Returns the value of the '<em><b>Severity</b></em>' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.logs.LogSeverity}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Severity</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Severity</em>' 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 <em>Severity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Severity</em>' attribute. + * @see org.openecomp.ncomp.core.logs.LogSeverity + * @see #getSeverity() + * @generated + */ + void setSeverity(LogSeverity value); + + /** + * Returns the value of the '<em><b>New Level</b></em>' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.logs.LogLevel}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>New Level</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>New Level</em>' 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 <em>New Level</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>New Level</em>' attribute. + * @see org.openecomp.ncomp.core.logs.LogLevel + * @see #getNewLevel() + * @generated + */ + void setNewLevel(LogLevel value); + + /** + * Returns the value of the '<em><b>New Severity</b></em>' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.logs.LogSeverity}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>New Severity</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>New Severity</em>' 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 <em>New Severity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>New Severity</em>' attribute. + * @see org.openecomp.ncomp.core.logs.LogSeverity + * @see #getNewSeverity() + * @generated + */ + void setNewSeverity(LogSeverity value); + + /** + * Returns the value of the '<em><b>New Category</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>New Category</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>New Category</em>' 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 <em>New Category</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>New Category</em>' attribute. + * @see #getNewCategory() + * @generated + */ + void setNewCategory(String value); + + /** + * Returns the value of the '<em><b>Disabled</b></em>' attribute. + * The default value is <code>"false"</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Disabled</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Disabled</em>' 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 <em>Disabled</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Disabled</em>' attribute. + * @see #isDisabled() + * @generated + */ + void setDisabled(boolean value); + + /** + * Returns the value of the '<em><b>Update Function</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Update Function</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Update Function</em>' 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 <em>Update Function</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Update Function</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Log Message State</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessageState#isSuspended <em>Suspended</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessageState#getLog <em>Log</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessageState#getCategory <em>Category</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageState() + * @model + * @generated + */ +public interface LogMessageState extends EObject { + /** + * Returns the value of the '<em><b>Suspended</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Suspended</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Suspended</em>' 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 <em>Suspended</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Suspended</em>' attribute. + * @see #isSuspended() + * @generated + */ + void setSuspended(boolean value); + + /** + * Returns the value of the '<em><b>Log</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Log</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Log</em>' 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 <em>Log</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Log</em>' reference. + * @see #getLog() + * @generated + */ + void setLog(LogMessage value); + + /** + * Returns the value of the '<em><b>Category</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Category</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Category</em>' 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 <em>Category</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Category</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Log Message Stats</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessageStats#getLevel <em>Level</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessageStats#getSeverity <em>Severity</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogMessageStats#getCount <em>Count</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogMessageStats() + * @model + * @generated + */ +public interface LogMessageStats extends NamedEntity { + /** + * Returns the value of the '<em><b>Level</b></em>' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.logs.LogLevel}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Level</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Level</em>' 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 <em>Level</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Level</em>' attribute. + * @see org.openecomp.ncomp.core.logs.LogLevel + * @see #getLevel() + * @generated + */ + void setLevel(LogLevel value); + + /** + * Returns the value of the '<em><b>Severity</b></em>' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.logs.LogSeverity}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Severity</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Severity</em>' 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 <em>Severity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Severity</em>' attribute. + * @see org.openecomp.ncomp.core.logs.LogSeverity + * @see #getSeverity() + * @generated + */ + void setSeverity(LogSeverity value); + + /** + * Returns the value of the '<em><b>Count</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Count</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Count</em>' 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 <em>Count</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Count</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Log Pattern</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.logs.LogPattern#getPattern <em>Pattern</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogPattern#getMessage <em>Message</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogPattern#getLevel <em>Level</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogPattern#getSeverity <em>Severity</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.LogPattern#getPath <em>Path</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogPattern() + * @model + * @generated + */ +public interface LogPattern extends EObject { + /** + * Returns the value of the '<em><b>Pattern</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Pattern</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Pattern</em>' 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 <em>Pattern</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Pattern</em>' attribute. + * @see #getPattern() + * @generated + */ + void setPattern(String value); + + /** + * Returns the value of the '<em><b>Message</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Message</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Message</em>' 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 <em>Message</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Message</em>' attribute. + * @see #getMessage() + * @generated + */ + void setMessage(String value); + + /** + * Returns the value of the '<em><b>Level</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Level</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Level</em>' 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 <em>Level</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Level</em>' attribute. + * @see #getLevel() + * @generated + */ + void setLevel(String value); + + /** + * Returns the value of the '<em><b>Severity</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Severity</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Severity</em>' 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 <em>Severity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Severity</em>' attribute. + * @see #getSeverity() + * @generated + */ + void setSeverity(String value); + + /** + * Returns the value of the '<em><b>Path</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Path</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Path</em>' 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 <em>Path</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Path</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the literals of the enumeration '<em><b>Log Severity</b></em>', + * and utility methods for working with them. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.logs.LogsPackage#getLogSeverity() + * @model + * @generated + */ +public enum LogSeverity implements Enumerator { + /** + * The '<em><b>UNKNOWN</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #UNKNOWN_VALUE + * @generated + * @ordered + */ + UNKNOWN(0, "UNKNOWN", "UNKNOWN"), + + /** + * The '<em><b>SEV1</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #SEV1_VALUE + * @generated + * @ordered + */ + SEV1(0, "SEV1", "SEV1"), + + /** + * The '<em><b>SEV2</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #SEV2_VALUE + * @generated + * @ordered + */ + SEV2(0, "SEV2", "SEV2"), + + /** + * The '<em><b>SEV3</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #SEV3_VALUE + * @generated + * @ordered + */ + SEV3(0, "SEV3", "SEV3"), + + /** + * The '<em><b>SEV4</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #SEV4_VALUE + * @generated + * @ordered + */ + SEV4(0, "SEV4", "SEV4"); + + /** + * The '<em><b>UNKNOWN</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>UNKNOWN</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #UNKNOWN + * @model + * @generated + * @ordered + */ + public static final int UNKNOWN_VALUE = 0; + + /** + * The '<em><b>SEV1</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>SEV1</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #SEV1 + * @model + * @generated + * @ordered + */ + public static final int SEV1_VALUE = 0; + + /** + * The '<em><b>SEV2</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>SEV2</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #SEV2 + * @model + * @generated + * @ordered + */ + public static final int SEV2_VALUE = 0; + + /** + * The '<em><b>SEV3</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>SEV3</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #SEV3 + * @model + * @generated + * @ordered + */ + public static final int SEV3_VALUE = 0; + + /** + * The '<em><b>SEV4</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>SEV4</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #SEV4 + * @model + * @generated + * @ordered + */ + public static final int SEV4_VALUE = 0; + + /** + * An array of all the '<em><b>Log Severity</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static final LogSeverity[] VALUES_ARRAY = + new LogSeverity[] { + UNKNOWN, + SEV1, + SEV2, + SEV3, + SEV4, + }; + + /** + * A public read-only list of all the '<em><b>Log Severity</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static final List<LogSeverity> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the '<em><b>Log Severity</b></em>' literal with the specified literal value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Log Severity</b></em>' literal with the specified name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Log Severity</b></em>' literal with the specified integer value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static LogSeverity get(int value) { + switch (value) { + case UNKNOWN_VALUE: return UNKNOWN; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private LogSeverity(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * The <b>Factory</b> for the model. + * It provides a create method for each non-abstract class of the model. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.logs.LogsPackage + * @generated + */ +public interface LogsFactory extends EFactory { + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + LogsFactory eINSTANCE = org.openecomp.ncomp.core.logs.impl.LogsFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Log Message</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Log Message</em>'. + * @generated + */ + LogMessage createLogMessage(); + + /** + * Returns a new object of class '<em>Log Message Rule</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Log Message Rule</em>'. + * @generated + */ + LogMessageRule createLogMessageRule(); + + /** + * Returns a new object of class '<em>Log Message Container Configuration</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Log Message Container Configuration</em>'. + * @generated + */ + LogMessageContainerConfiguration createLogMessageContainerConfiguration(); + + /** + * Returns a new object of class '<em>Log Message Category</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Log Message Category</em>'. + * @generated + */ + LogMessageCategory createLogMessageCategory(); + + /** + * Returns a new object of class '<em>Log Message Stats</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Log Message Stats</em>'. + * @generated + */ + LogMessageStats createLogMessageStats(); + + /** + * Returns a new object of class '<em>Log Message State</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Log Message State</em>'. + * @generated + */ + LogMessageState createLogMessageState(); + + /** + * Returns a new object of class '<em>Log Configuration</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Log Configuration</em>'. + * @generated + */ + LogConfiguration createLogConfiguration(); + + /** + * Returns a new object of class '<em>Log File</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Log File</em>'. + * @generated + */ + LogFile createLogFile(); + + /** + * Returns a new object of class '<em>Log Pattern</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Log Pattern</em>'. + * @generated + */ + LogPattern createLogPattern(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * The <b>Package</b> for the model. + * It contains accessors for the meta objects to represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNAME = "logs"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.core.logs"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_PREFIX = "logs"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Log Message</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Time</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE__TIME = 0; + + /** + * The feature id for the '<em><b>Resource Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE__RESOURCE_NAME = 1; + + /** + * The feature id for the '<em><b>Severity</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE__SEVERITY = 2; + + /** + * The feature id for the '<em><b>Level</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE__LEVEL = 3; + + /** + * The feature id for the '<em><b>Message</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE__MESSAGE = 4; + + /** + * The feature id for the '<em><b>Category</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE__CATEGORY = 5; + + /** + * The feature id for the '<em><b>Number Of Suppressed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE__NUMBER_OF_SUPPRESSED = 6; + + /** + * The feature id for the '<em><b>Suppressed Start Time</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE__SUPPRESSED_START_TIME = 7; + + /** + * The number of structural features of the '<em>Log Message</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_FEATURE_COUNT = 8; + + /** + * The number of operations of the '<em>Log Message</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl <em>Log Message Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the '<em><b>Description</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__DESCRIPTION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Message Filter</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__MESSAGE_FILTER = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Resource Path Filter</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__RESOURCE_PATH_FILTER = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The feature id for the '<em><b>Level</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__LEVEL = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The feature id for the '<em><b>Severity</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__SEVERITY = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 4; + + /** + * The feature id for the '<em><b>New Level</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__NEW_LEVEL = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 5; + + /** + * The feature id for the '<em><b>New Severity</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__NEW_SEVERITY = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 6; + + /** + * The feature id for the '<em><b>New Category</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__NEW_CATEGORY = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 7; + + /** + * The feature id for the '<em><b>Disabled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__DISABLED = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 8; + + /** + * The feature id for the '<em><b>Update Function</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE__UPDATE_FUNCTION = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 9; + + /** + * The number of structural features of the '<em>Log Message Rule</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_RULE_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 10; + + /** + * The number of operations of the '<em>Log Message Rule</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Log Message Container</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Log Message Configuration</b></em>' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CONFIGURATION = 0; + + /** + * The feature id for the '<em><b>Log Message Categories</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CATEGORIES = 1; + + /** + * The feature id for the '<em><b>Log Message Stats</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_CONTAINER__LOG_MESSAGE_STATS = 2; + + /** + * The number of structural features of the '<em>Log Message Container</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_CONTAINER_FEATURE_COUNT = 3; + + /** + * The number of operations of the '<em>Log Message Container</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_CONTAINER_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageContainerConfigurationImpl <em>Log Message Container Configuration</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em>Log Message Container Configuration</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_CONTAINER_CONFIGURATION_FEATURE_COUNT = 0; + + /** + * The number of operations of the '<em>Log Message Container Configuration</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_CONTAINER_CONFIGURATION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageCategoryImpl <em>Log Message Category</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_CATEGORY__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_CATEGORY__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_CATEGORY__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_CATEGORY__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the '<em><b>Stats</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_CATEGORY__STATS = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Log Message Category</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_CATEGORY_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Log Message Category</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Log Message Stats</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_STATS__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_STATS__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_STATS__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_STATS__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The feature id for the '<em><b>Level</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_STATS__LEVEL = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Severity</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_STATS__SEVERITY = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Count</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_STATS__COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 2; + + /** + * The number of structural features of the '<em>Log Message Stats</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_STATS_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 3; + + /** + * The number of operations of the '<em>Log Message Stats</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Log Message State</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Suspended</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_STATE__SUSPENDED = 0; + + /** + * The feature id for the '<em><b>Log</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_STATE__LOG = 1; + + /** + * The feature id for the '<em><b>Category</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_STATE__CATEGORY = 2; + + /** + * The number of structural features of the '<em>Log Message State</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_STATE_FEATURE_COUNT = 3; + + /** + * The number of operations of the '<em>Log Message State</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_MESSAGE_STATE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.logs.impl.LogConfigurationImpl <em>Log Configuration</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Files</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_CONFIGURATION__FILES = 0; + + /** + * The number of structural features of the '<em>Log Configuration</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_CONFIGURATION_FEATURE_COUNT = 1; + + /** + * The number of operations of the '<em>Log Configuration</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_CONFIGURATION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.logs.impl.LogFileImpl <em>Log File</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Filename</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_FILE__FILENAME = 0; + + /** + * The feature id for the '<em><b>Patterns</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_FILE__PATTERNS = 1; + + /** + * The number of structural features of the '<em>Log File</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_FILE_FEATURE_COUNT = 2; + + /** + * The number of operations of the '<em>Log File</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_FILE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.logs.impl.LogPatternImpl <em>Log Pattern</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Pattern</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_PATTERN__PATTERN = 0; + + /** + * The feature id for the '<em><b>Message</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_PATTERN__MESSAGE = 1; + + /** + * The feature id for the '<em><b>Level</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_PATTERN__LEVEL = 2; + + /** + * The feature id for the '<em><b>Severity</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_PATTERN__SEVERITY = 3; + + /** + * The feature id for the '<em><b>Path</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_PATTERN__PATH = 4; + + /** + * The number of structural features of the '<em>Log Pattern</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_PATTERN_FEATURE_COUNT = 5; + + /** + * The number of operations of the '<em>Log Pattern</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LOG_PATTERN_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.logs.LogLevel <em>Log Level</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Log Severity</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Log Message</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Log Message</em>'. + * @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 <em>Time</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Time</em>'. + * @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 <em>Resource Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Resource Name</em>'. + * @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 <em>Severity</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Severity</em>'. + * @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 <em>Level</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Level</em>'. + * @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 <em>Message</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Message</em>'. + * @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 <em>Category</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Category</em>'. + * @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 <em>Number Of Suppressed</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Number Of Suppressed</em>'. + * @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 <em>Suppressed Start Time</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Suppressed Start Time</em>'. + * @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 <em>Log Message Rule</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Log Message Rule</em>'. + * @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 <em>Description</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Description</em>'. + * @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 <em>Message Filter</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Message Filter</em>'. + * @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 <em>Resource Path Filter</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Resource Path Filter</em>'. + * @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 <em>Level</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Level</em>'. + * @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 <em>Severity</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Severity</em>'. + * @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 <em>New Level</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>New Level</em>'. + * @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 <em>New Severity</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>New Severity</em>'. + * @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 <em>New Category</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>New Category</em>'. + * @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 <em>Disabled</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Disabled</em>'. + * @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 <em>Update Function</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Update Function</em>'. + * @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 <em>Log Message Container</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Log Message Container</em>'. + * @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 <em>Log Message Configuration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference '<em>Log Message Configuration</em>'. + * @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 <em>Log Message Categories</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Log Message Categories</em>'. + * @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 <em>Log Message Stats</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Log Message Stats</em>'. + * @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 <em>Log Message Container Configuration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Log Message Container Configuration</em>'. + * @see org.openecomp.ncomp.core.logs.LogMessageContainerConfiguration + * @generated + */ + EClass getLogMessageContainerConfiguration(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.logs.LogMessageCategory <em>Log Message Category</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Log Message Category</em>'. + * @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 <em>Stats</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Stats</em>'. + * @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 <em>Log Message Stats</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Log Message Stats</em>'. + * @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 <em>Level</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Level</em>'. + * @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 <em>Severity</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Severity</em>'. + * @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 <em>Count</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Count</em>'. + * @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 <em>Log Message State</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Log Message State</em>'. + * @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 <em>Suspended</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Suspended</em>'. + * @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 <em>Log</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Log</em>'. + * @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 <em>Category</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Category</em>'. + * @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 <em>Log Configuration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Log Configuration</em>'. + * @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 <em>Files</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Files</em>'. + * @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 <em>Log File</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Log File</em>'. + * @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 <em>Filename</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Filename</em>'. + * @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 <em>Patterns</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Patterns</em>'. + * @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 <em>Log Pattern</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Log Pattern</em>'. + * @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 <em>Pattern</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Pattern</em>'. + * @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 <em>Message</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Message</em>'. + * @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 <em>Level</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Level</em>'. + * @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 <em>Severity</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Severity</em>'. + * @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 <em>Path</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Path</em>'. + * @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 <em>Log Level</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for enum '<em>Log Level</em>'. + * @see org.openecomp.ncomp.core.logs.LogLevel + * @generated + */ + EEnum getLogLevel(); + + /** + * Returns the meta object for enum '{@link org.openecomp.ncomp.core.logs.LogSeverity <em>Log Severity</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for enum '<em>Log Severity</em>'. + * @see org.openecomp.ncomp.core.logs.LogSeverity + * @generated + */ + EEnum getLogSeverity(); + + /** + * Returns the factory that creates the instances of the model. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the factory that creates the instances of the model. + * @generated + */ + LogsFactory getLogsFactory(); + + /** + * <!-- begin-user-doc --> + * Defines literals for the meta objects that represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageImpl <em>Log Message</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Time</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_MESSAGE__TIME = eINSTANCE.getLogMessage_Time(); + + /** + * The meta object literal for the '<em><b>Resource Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_MESSAGE__RESOURCE_NAME = eINSTANCE.getLogMessage_ResourceName(); + + /** + * The meta object literal for the '<em><b>Severity</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_MESSAGE__SEVERITY = eINSTANCE.getLogMessage_Severity(); + + /** + * The meta object literal for the '<em><b>Level</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_MESSAGE__LEVEL = eINSTANCE.getLogMessage_Level(); + + /** + * The meta object literal for the '<em><b>Message</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_MESSAGE__MESSAGE = eINSTANCE.getLogMessage_Message(); + + /** + * The meta object literal for the '<em><b>Category</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_MESSAGE__CATEGORY = eINSTANCE.getLogMessage_Category(); + + /** + * The meta object literal for the '<em><b>Number Of Suppressed</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_MESSAGE__NUMBER_OF_SUPPRESSED = eINSTANCE.getLogMessage_NumberOfSuppressed(); + + /** + * The meta object literal for the '<em><b>Suppressed Start Time</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_MESSAGE__SUPPRESSED_START_TIME = eINSTANCE.getLogMessage_SuppressedStartTime(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl <em>Log Message Rule</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Description</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_MESSAGE_RULE__DESCRIPTION = eINSTANCE.getLogMessageRule_Description(); + + /** + * The meta object literal for the '<em><b>Message Filter</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_MESSAGE_RULE__MESSAGE_FILTER = eINSTANCE.getLogMessageRule_MessageFilter(); + + /** + * The meta object literal for the '<em><b>Resource Path Filter</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_MESSAGE_RULE__RESOURCE_PATH_FILTER = eINSTANCE.getLogMessageRule_ResourcePathFilter(); + + /** + * The meta object literal for the '<em><b>Level</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_MESSAGE_RULE__LEVEL = eINSTANCE.getLogMessageRule_Level(); + + /** + * The meta object literal for the '<em><b>Severity</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_MESSAGE_RULE__SEVERITY = eINSTANCE.getLogMessageRule_Severity(); + + /** + * The meta object literal for the '<em><b>New Level</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_MESSAGE_RULE__NEW_LEVEL = eINSTANCE.getLogMessageRule_NewLevel(); + + /** + * The meta object literal for the '<em><b>New Severity</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_MESSAGE_RULE__NEW_SEVERITY = eINSTANCE.getLogMessageRule_NewSeverity(); + + /** + * The meta object literal for the '<em><b>New Category</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_MESSAGE_RULE__NEW_CATEGORY = eINSTANCE.getLogMessageRule_NewCategory(); + + /** + * The meta object literal for the '<em><b>Disabled</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_MESSAGE_RULE__DISABLED = eINSTANCE.getLogMessageRule_Disabled(); + + /** + * The meta object literal for the '<em><b>Update Function</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference LOG_MESSAGE_RULE__UPDATE_FUNCTION = eINSTANCE.getLogMessageRule_UpdateFunction(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageContainerImpl <em>Log Message Container</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Log Message Configuration</b></em>' containment reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CONFIGURATION = eINSTANCE.getLogMessageContainer_LogMessageConfiguration(); + + /** + * The meta object literal for the '<em><b>Log Message Categories</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CATEGORIES = eINSTANCE.getLogMessageContainer_LogMessageCategories(); + + /** + * The meta object literal for the '<em><b>Log Message Stats</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Log Message Container Configuration</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Log Message Category</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Stats</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference LOG_MESSAGE_CATEGORY__STATS = eINSTANCE.getLogMessageCategory_Stats(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageStatsImpl <em>Log Message Stats</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Level</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_MESSAGE_STATS__LEVEL = eINSTANCE.getLogMessageStats_Level(); + + /** + * The meta object literal for the '<em><b>Severity</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_MESSAGE_STATS__SEVERITY = eINSTANCE.getLogMessageStats_Severity(); + + /** + * The meta object literal for the '<em><b>Count</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_MESSAGE_STATS__COUNT = eINSTANCE.getLogMessageStats_Count(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.logs.impl.LogMessageStateImpl <em>Log Message State</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Suspended</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_MESSAGE_STATE__SUSPENDED = eINSTANCE.getLogMessageState_Suspended(); + + /** + * The meta object literal for the '<em><b>Log</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference LOG_MESSAGE_STATE__LOG = eINSTANCE.getLogMessageState_Log(); + + /** + * The meta object literal for the '<em><b>Category</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference LOG_MESSAGE_STATE__CATEGORY = eINSTANCE.getLogMessageState_Category(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.logs.impl.LogConfigurationImpl <em>Log Configuration</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Files</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference LOG_CONFIGURATION__FILES = eINSTANCE.getLogConfiguration_Files(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.logs.impl.LogFileImpl <em>Log File</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Filename</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_FILE__FILENAME = eINSTANCE.getLogFile_Filename(); + + /** + * The meta object literal for the '<em><b>Patterns</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference LOG_FILE__PATTERNS = eINSTANCE.getLogFile_Patterns(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.logs.impl.LogPatternImpl <em>Log Pattern</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Pattern</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_PATTERN__PATTERN = eINSTANCE.getLogPattern_Pattern(); + + /** + * The meta object literal for the '<em><b>Message</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_PATTERN__MESSAGE = eINSTANCE.getLogPattern_Message(); + + /** + * The meta object literal for the '<em><b>Level</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_PATTERN__LEVEL = eINSTANCE.getLogPattern_Level(); + + /** + * The meta object literal for the '<em><b>Severity</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_PATTERN__SEVERITY = eINSTANCE.getLogPattern_Severity(); + + /** + * The meta object literal for the '<em><b>Path</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LOG_PATTERN__PATH = eINSTANCE.getLogPattern_Path(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.logs.LogLevel <em>Log Level</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Log Severity</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Log Configuration</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogConfigurationImpl#getFiles <em>Files</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class LogConfigurationImpl extends MinimalEObjectImpl.Container implements LogConfiguration { + /** + * The cached value of the '{@link #getFiles() <em>Files</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFiles() + * @generated + * @ordered + */ + protected EList<LogFile> files; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LogConfigurationImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return LogsPackage.Literals.LOG_CONFIGURATION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<LogFile> getFiles() { + if (files == null) { + files = new EObjectContainmentEList<LogFile>(LogFile.class, this, LogsPackage.LOG_CONFIGURATION__FILES); + } + return files; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case LogsPackage.LOG_CONFIGURATION__FILES: + getFiles().clear(); + getFiles().addAll((Collection<? extends LogFile>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case LogsPackage.LOG_CONFIGURATION__FILES: + getFiles().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Log File</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogFileImpl#getFilename <em>Filename</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogFileImpl#getPatterns <em>Patterns</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class LogFileImpl extends MinimalEObjectImpl.Container implements LogFile { + /** + * The default value of the '{@link #getFilename() <em>Filename</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFilename() + * @generated + * @ordered + */ + protected static final String FILENAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getFilename() <em>Filename</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getFilename() + * @generated + * @ordered + */ + protected String filename = FILENAME_EDEFAULT; + + /** + * The cached value of the '{@link #getPatterns() <em>Patterns</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPatterns() + * @generated + * @ordered + */ + protected EList<LogPattern> patterns; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LogFileImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return LogsPackage.Literals.LOG_FILE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getFilename() { + return filename; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<LogPattern> getPatterns() { + if (patterns == null) { + patterns = new EObjectContainmentEList<LogPattern>(LogPattern.class, this, LogsPackage.LOG_FILE__PATTERNS); + } + return patterns; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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<? extends LogPattern>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Log Message Category</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageCategoryImpl#getStats <em>Stats</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class LogMessageCategoryImpl extends NamedEntityImpl implements LogMessageCategory { + /** + * The cached value of the '{@link #getStats() <em>Stats</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getStats() + * @generated + * @ordered + */ + protected EList<LogMessageStats> stats; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LogMessageCategoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return LogsPackage.Literals.LOG_MESSAGE_CATEGORY; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<LogMessageStats> getStats() { + if (stats == null) { + stats = new EObjectContainmentEList<LogMessageStats>(LogMessageStats.class, this, LogsPackage.LOG_MESSAGE_CATEGORY__STATS); + } + return stats; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_CATEGORY__STATS: + getStats().clear(); + getStats().addAll((Collection<? extends LogMessageStats>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case LogsPackage.LOG_MESSAGE_CATEGORY__STATS: + getStats().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Log Message Container Configuration</b></em>'. + * <!-- end-user-doc --> + * <p> + * </p> + * + * @generated + */ +public class LogMessageContainerConfigurationImpl extends MinimalEObjectImpl.Container implements LogMessageContainerConfiguration { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LogMessageContainerConfigurationImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Log Message Container</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageContainerImpl#getLogMessageConfiguration <em>Log Message Configuration</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageContainerImpl#getLogMessageCategories <em>Log Message Categories</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageContainerImpl#getLogMessageStats <em>Log Message Stats</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public abstract class LogMessageContainerImpl extends MinimalEObjectImpl.Container implements LogMessageContainer { + /** + * The cached value of the '{@link #getLogMessageConfiguration() <em>Log Message Configuration</em>}' containment reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLogMessageConfiguration() + * @generated + * @ordered + */ + protected LogMessageContainerConfiguration logMessageConfiguration; + + /** + * The cached value of the '{@link #getLogMessageCategories() <em>Log Message Categories</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLogMessageCategories() + * @generated + * @ordered + */ + protected EList<LogMessageCategory> logMessageCategories; + + /** + * The cached value of the '{@link #getLogMessageStats() <em>Log Message Stats</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLogMessageStats() + * @generated + * @ordered + */ + protected EList<LogMessageStats> logMessageStats; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LogMessageContainerImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return LogsPackage.Literals.LOG_MESSAGE_CONTAINER; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogMessageContainerConfiguration getLogMessageConfiguration() { + return logMessageConfiguration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<LogMessageCategory> getLogMessageCategories() { + if (logMessageCategories == null) { + logMessageCategories = new EObjectContainmentEList<LogMessageCategory>(LogMessageCategory.class, this, LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_CATEGORIES); + } + return logMessageCategories; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<LogMessageStats> getLogMessageStats() { + if (logMessageStats == null) { + logMessageStats = new EObjectContainmentEList<LogMessageStats>(LogMessageStats.class, this, LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_STATS); + } + return logMessageStats; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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<? extends LogMessageCategory>)newValue); + return; + case LogsPackage.LOG_MESSAGE_CONTAINER__LOG_MESSAGE_STATS: + getLogMessageStats().clear(); + getLogMessageStats().addAll((Collection<? extends LogMessageStats>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Log Message</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageImpl#getTime <em>Time</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageImpl#getResourceName <em>Resource Name</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageImpl#getSeverity <em>Severity</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageImpl#getLevel <em>Level</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageImpl#getMessage <em>Message</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageImpl#getCategory <em>Category</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageImpl#getNumberOfSuppressed <em>Number Of Suppressed</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageImpl#getSuppressedStartTime <em>Suppressed Start Time</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class LogMessageImpl extends MinimalEObjectImpl.Container implements LogMessage { + /** + * The default value of the '{@link #getTime() <em>Time</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTime() + * @generated + * @ordered + */ + protected static final long TIME_EDEFAULT = 0L; + + /** + * The cached value of the '{@link #getTime() <em>Time</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTime() + * @generated + * @ordered + */ + protected long time = TIME_EDEFAULT; + + /** + * The default value of the '{@link #getResourceName() <em>Resource Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getResourceName() + * @generated + * @ordered + */ + protected static final String RESOURCE_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getResourceName() <em>Resource Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getResourceName() + * @generated + * @ordered + */ + protected String resourceName = RESOURCE_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getSeverity() <em>Severity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSeverity() + * @generated + * @ordered + */ + protected static final LogSeverity SEVERITY_EDEFAULT = LogSeverity.UNKNOWN; + + /** + * The cached value of the '{@link #getSeverity() <em>Severity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSeverity() + * @generated + * @ordered + */ + protected LogSeverity severity = SEVERITY_EDEFAULT; + + /** + * The default value of the '{@link #getLevel() <em>Level</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLevel() + * @generated + * @ordered + */ + protected static final LogLevel LEVEL_EDEFAULT = LogLevel.UNKNOWN; + + /** + * The cached value of the '{@link #getLevel() <em>Level</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLevel() + * @generated + * @ordered + */ + protected LogLevel level = LEVEL_EDEFAULT; + + /** + * The default value of the '{@link #getMessage() <em>Message</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMessage() + * @generated + * @ordered + */ + protected static final String MESSAGE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMessage() <em>Message</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMessage() + * @generated + * @ordered + */ + protected String message = MESSAGE_EDEFAULT; + + /** + * The default value of the '{@link #getCategory() <em>Category</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCategory() + * @generated + * @ordered + */ + protected static final String CATEGORY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCategory() <em>Category</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCategory() + * @generated + * @ordered + */ + protected String category = CATEGORY_EDEFAULT; + + /** + * The default value of the '{@link #getNumberOfSuppressed() <em>Number Of Suppressed</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumberOfSuppressed() + * @generated + * @ordered + */ + protected static final int NUMBER_OF_SUPPRESSED_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getNumberOfSuppressed() <em>Number Of Suppressed</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNumberOfSuppressed() + * @generated + * @ordered + */ + protected int numberOfSuppressed = NUMBER_OF_SUPPRESSED_EDEFAULT; + + /** + * The default value of the '{@link #getSuppressedStartTime() <em>Suppressed Start Time</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSuppressedStartTime() + * @generated + * @ordered + */ + protected static final Long SUPPRESSED_START_TIME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSuppressedStartTime() <em>Suppressed Start Time</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSuppressedStartTime() + * @generated + * @ordered + */ + protected Long suppressedStartTime = SUPPRESSED_START_TIME_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LogMessageImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return LogsPackage.Literals.LOG_MESSAGE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public long getTime() { + return time; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getResourceName() { + return resourceName; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogSeverity getSeverity() { + return severity; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogLevel getLevel() { + return level; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getMessage() { + return message; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getCategory() { + return category; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getNumberOfSuppressed() { + return numberOfSuppressed; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Long getSuppressedStartTime() { + return suppressedStartTime; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Log Message Rule</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl#getDescription <em>Description</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl#getMessageFilter <em>Message Filter</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl#getResourcePathFilter <em>Resource Path Filter</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl#getLevel <em>Level</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl#getSeverity <em>Severity</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl#getNewLevel <em>New Level</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl#getNewSeverity <em>New Severity</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl#getNewCategory <em>New Category</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl#isDisabled <em>Disabled</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageRuleImpl#getUpdateFunction <em>Update Function</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class LogMessageRuleImpl extends NamedEntityImpl implements LogMessageRule { + /** + * The default value of the '{@link #getDescription() <em>Description</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDescription() + * @generated + * @ordered + */ + protected static final String DESCRIPTION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDescription() <em>Description</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDescription() + * @generated + * @ordered + */ + protected String description = DESCRIPTION_EDEFAULT; + + /** + * The default value of the '{@link #getMessageFilter() <em>Message Filter</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMessageFilter() + * @generated + * @ordered + */ + protected static final String MESSAGE_FILTER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMessageFilter() <em>Message Filter</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMessageFilter() + * @generated + * @ordered + */ + protected String messageFilter = MESSAGE_FILTER_EDEFAULT; + + /** + * The default value of the '{@link #getResourcePathFilter() <em>Resource Path Filter</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getResourcePathFilter() + * @generated + * @ordered + */ + protected static final String RESOURCE_PATH_FILTER_EDEFAULT = null; + + /** + * The cached value of the '{@link #getResourcePathFilter() <em>Resource Path Filter</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getResourcePathFilter() + * @generated + * @ordered + */ + protected String resourcePathFilter = RESOURCE_PATH_FILTER_EDEFAULT; + + /** + * The default value of the '{@link #getLevel() <em>Level</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLevel() + * @generated + * @ordered + */ + protected static final LogLevel LEVEL_EDEFAULT = LogLevel.UNKNOWN; + + /** + * The cached value of the '{@link #getLevel() <em>Level</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLevel() + * @generated + * @ordered + */ + protected LogLevel level = LEVEL_EDEFAULT; + + /** + * The default value of the '{@link #getSeverity() <em>Severity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSeverity() + * @generated + * @ordered + */ + protected static final LogSeverity SEVERITY_EDEFAULT = LogSeverity.UNKNOWN; + + /** + * The cached value of the '{@link #getSeverity() <em>Severity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSeverity() + * @generated + * @ordered + */ + protected LogSeverity severity = SEVERITY_EDEFAULT; + + /** + * The default value of the '{@link #getNewLevel() <em>New Level</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNewLevel() + * @generated + * @ordered + */ + protected static final LogLevel NEW_LEVEL_EDEFAULT = LogLevel.UNKNOWN; + + /** + * The cached value of the '{@link #getNewLevel() <em>New Level</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNewLevel() + * @generated + * @ordered + */ + protected LogLevel newLevel = NEW_LEVEL_EDEFAULT; + + /** + * The default value of the '{@link #getNewSeverity() <em>New Severity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNewSeverity() + * @generated + * @ordered + */ + protected static final LogSeverity NEW_SEVERITY_EDEFAULT = LogSeverity.UNKNOWN; + + /** + * The cached value of the '{@link #getNewSeverity() <em>New Severity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNewSeverity() + * @generated + * @ordered + */ + protected LogSeverity newSeverity = NEW_SEVERITY_EDEFAULT; + + /** + * The default value of the '{@link #getNewCategory() <em>New Category</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNewCategory() + * @generated + * @ordered + */ + protected static final String NEW_CATEGORY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNewCategory() <em>New Category</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNewCategory() + * @generated + * @ordered + */ + protected String newCategory = NEW_CATEGORY_EDEFAULT; + + /** + * The default value of the '{@link #isDisabled() <em>Disabled</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isDisabled() + * @generated + * @ordered + */ + protected static final boolean DISABLED_EDEFAULT = false; + + /** + * The cached value of the '{@link #isDisabled() <em>Disabled</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isDisabled() + * @generated + * @ordered + */ + protected boolean disabled = DISABLED_EDEFAULT; + + /** + * The cached value of the '{@link #getUpdateFunction() <em>Update Function</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getUpdateFunction() + * @generated + * @ordered + */ + protected Function updateFunction; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LogMessageRuleImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return LogsPackage.Literals.LOG_MESSAGE_RULE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getDescription() { + return description; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getMessageFilter() { + return messageFilter; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getResourcePathFilter() { + return resourcePathFilter; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogLevel getLevel() { + return level; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogSeverity getSeverity() { + return severity; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogLevel getNewLevel() { + return newLevel; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogSeverity getNewSeverity() { + return newSeverity; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getNewCategory() { + return newCategory; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isDisabled() { + return disabled; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public Function basicGetUpdateFunction() { + return updateFunction; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Log Message State</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageStateImpl#isSuspended <em>Suspended</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageStateImpl#getLog <em>Log</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageStateImpl#getCategory <em>Category</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class LogMessageStateImpl extends MinimalEObjectImpl.Container implements LogMessageState { + /** + * The default value of the '{@link #isSuspended() <em>Suspended</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isSuspended() + * @generated + * @ordered + */ + protected static final boolean SUSPENDED_EDEFAULT = false; + + /** + * The cached value of the '{@link #isSuspended() <em>Suspended</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isSuspended() + * @generated + * @ordered + */ + protected boolean suspended = SUSPENDED_EDEFAULT; + + /** + * The cached value of the '{@link #getLog() <em>Log</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLog() + * @generated + * @ordered + */ + protected LogMessage log; + + /** + * The cached value of the '{@link #getCategory() <em>Category</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCategory() + * @generated + * @ordered + */ + protected LogMessageCategory category; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LogMessageStateImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return LogsPackage.Literals.LOG_MESSAGE_STATE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isSuspended() { + return suspended; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogMessage basicGetLog() { + return log; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogMessageCategory basicGetCategory() { + return category; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Log Message Stats</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageStatsImpl#getLevel <em>Level</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageStatsImpl#getSeverity <em>Severity</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogMessageStatsImpl#getCount <em>Count</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class LogMessageStatsImpl extends NamedEntityImpl implements LogMessageStats { + /** + * The default value of the '{@link #getLevel() <em>Level</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLevel() + * @generated + * @ordered + */ + protected static final LogLevel LEVEL_EDEFAULT = LogLevel.UNKNOWN; + + /** + * The cached value of the '{@link #getLevel() <em>Level</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLevel() + * @generated + * @ordered + */ + protected LogLevel level = LEVEL_EDEFAULT; + + /** + * The default value of the '{@link #getSeverity() <em>Severity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSeverity() + * @generated + * @ordered + */ + protected static final LogSeverity SEVERITY_EDEFAULT = LogSeverity.UNKNOWN; + + /** + * The cached value of the '{@link #getSeverity() <em>Severity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSeverity() + * @generated + * @ordered + */ + protected LogSeverity severity = SEVERITY_EDEFAULT; + + /** + * The default value of the '{@link #getCount() <em>Count</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCount() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute COUNT_EDEFAULT = null; + + /** + * The cached value of the '{@link #getCount() <em>Count</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getCount() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute count = COUNT_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LogMessageStatsImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return LogsPackage.Literals.LOG_MESSAGE_STATS; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogLevel getLevel() { + return level; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogSeverity getSeverity() { + return severity; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public IncreasingULongMetricAttribute getCount() { + return count; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Log Pattern</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogPatternImpl#getPattern <em>Pattern</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogPatternImpl#getMessage <em>Message</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogPatternImpl#getLevel <em>Level</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogPatternImpl#getSeverity <em>Severity</em>}</li> + * <li>{@link org.openecomp.ncomp.core.logs.impl.LogPatternImpl#getPath <em>Path</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class LogPatternImpl extends MinimalEObjectImpl.Container implements LogPattern { + /** + * The default value of the '{@link #getPattern() <em>Pattern</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPattern() + * @generated + * @ordered + */ + protected static final String PATTERN_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPattern() <em>Pattern</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPattern() + * @generated + * @ordered + */ + protected String pattern = PATTERN_EDEFAULT; + + /** + * The default value of the '{@link #getMessage() <em>Message</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMessage() + * @generated + * @ordered + */ + protected static final String MESSAGE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMessage() <em>Message</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMessage() + * @generated + * @ordered + */ + protected String message = MESSAGE_EDEFAULT; + + /** + * The default value of the '{@link #getLevel() <em>Level</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLevel() + * @generated + * @ordered + */ + protected static final String LEVEL_EDEFAULT = null; + + /** + * The cached value of the '{@link #getLevel() <em>Level</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getLevel() + * @generated + * @ordered + */ + protected String level = LEVEL_EDEFAULT; + + /** + * The default value of the '{@link #getSeverity() <em>Severity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSeverity() + * @generated + * @ordered + */ + protected static final String SEVERITY_EDEFAULT = null; + + /** + * The cached value of the '{@link #getSeverity() <em>Severity</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getSeverity() + * @generated + * @ordered + */ + protected String severity = SEVERITY_EDEFAULT; + + /** + * The default value of the '{@link #getPath() <em>Path</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPath() + * @generated + * @ordered + */ + protected static final String PATH_EDEFAULT = null; + + /** + * The cached value of the '{@link #getPath() <em>Path</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPath() + * @generated + * @ordered + */ + protected String path = PATH_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LogPatternImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return LogsPackage.Literals.LOG_PATTERN; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getPattern() { + return pattern; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getMessage() { + return message; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getLevel() { + return level; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getSeverity() { + return severity; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getPath() { + return path; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Factory</b>. + * <!-- end-user-doc --> + * @generated + */ +public class LogsFactoryImpl extends EFactoryImpl implements LogsFactory { + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogsFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogMessage createLogMessage() { + LogMessageImpl logMessage = new LogMessageImpl(); + return logMessage; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogMessageRule createLogMessageRule() { + LogMessageRuleImpl logMessageRule = new LogMessageRuleImpl(); + return logMessageRule; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogMessageContainerConfiguration createLogMessageContainerConfiguration() { + LogMessageContainerConfigurationImpl logMessageContainerConfiguration = new LogMessageContainerConfigurationImpl(); + return logMessageContainerConfiguration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogMessageCategory createLogMessageCategory() { + LogMessageCategoryImpl logMessageCategory = new LogMessageCategoryImpl(); + return logMessageCategory; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogMessageStats createLogMessageStats() { + LogMessageStatsImpl logMessageStats = new LogMessageStatsImpl(); + return logMessageStats; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogMessageState createLogMessageState() { + LogMessageStateImpl logMessageState = new LogMessageStateImpl(); + return logMessageState; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogConfiguration createLogConfiguration() { + LogConfigurationImpl logConfiguration = new LogConfigurationImpl(); + return logConfiguration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogFile createLogFile() { + LogFileImpl logFile = new LogFileImpl(); + return logFile; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogPattern createLogPattern() { + LogPatternImpl logPattern = new LogPatternImpl(); + return logPattern; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertLogLevelToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertLogSeverityToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogsPackage getLogsPackage() { + return (LogsPackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * @generated + */ +public class LogsPackageImpl extends EPackageImpl implements LogsPackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass logMessageEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass logMessageRuleEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass logMessageContainerEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass logMessageContainerConfigurationEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass logMessageCategoryEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass logMessageStatsEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass logMessageStateEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass logConfigurationEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass logFileEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass logPatternEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum logLevelEEnum = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum logSeverityEEnum = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + * <p>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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. + * + * <p>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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getLogMessage() { + return logMessageEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogMessage_Time() { + return (EAttribute)logMessageEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogMessage_ResourceName() { + return (EAttribute)logMessageEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogMessage_Severity() { + return (EAttribute)logMessageEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogMessage_Level() { + return (EAttribute)logMessageEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogMessage_Message() { + return (EAttribute)logMessageEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogMessage_Category() { + return (EAttribute)logMessageEClass.getEStructuralFeatures().get(5); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogMessage_NumberOfSuppressed() { + return (EAttribute)logMessageEClass.getEStructuralFeatures().get(6); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogMessage_SuppressedStartTime() { + return (EAttribute)logMessageEClass.getEStructuralFeatures().get(7); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getLogMessageRule() { + return logMessageRuleEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogMessageRule_Description() { + return (EAttribute)logMessageRuleEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogMessageRule_MessageFilter() { + return (EAttribute)logMessageRuleEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogMessageRule_ResourcePathFilter() { + return (EAttribute)logMessageRuleEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogMessageRule_Level() { + return (EAttribute)logMessageRuleEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogMessageRule_Severity() { + return (EAttribute)logMessageRuleEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogMessageRule_NewLevel() { + return (EAttribute)logMessageRuleEClass.getEStructuralFeatures().get(5); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogMessageRule_NewSeverity() { + return (EAttribute)logMessageRuleEClass.getEStructuralFeatures().get(6); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogMessageRule_NewCategory() { + return (EAttribute)logMessageRuleEClass.getEStructuralFeatures().get(7); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogMessageRule_Disabled() { + return (EAttribute)logMessageRuleEClass.getEStructuralFeatures().get(8); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getLogMessageRule_UpdateFunction() { + return (EReference)logMessageRuleEClass.getEStructuralFeatures().get(9); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getLogMessageContainer() { + return logMessageContainerEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getLogMessageContainer_LogMessageConfiguration() { + return (EReference)logMessageContainerEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getLogMessageContainer_LogMessageCategories() { + return (EReference)logMessageContainerEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getLogMessageContainer_LogMessageStats() { + return (EReference)logMessageContainerEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getLogMessageContainerConfiguration() { + return logMessageContainerConfigurationEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getLogMessageCategory() { + return logMessageCategoryEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getLogMessageCategory_Stats() { + return (EReference)logMessageCategoryEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getLogMessageStats() { + return logMessageStatsEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogMessageStats_Level() { + return (EAttribute)logMessageStatsEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogMessageStats_Severity() { + return (EAttribute)logMessageStatsEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogMessageStats_Count() { + return (EAttribute)logMessageStatsEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getLogMessageState() { + return logMessageStateEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogMessageState_Suspended() { + return (EAttribute)logMessageStateEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getLogMessageState_Log() { + return (EReference)logMessageStateEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getLogMessageState_Category() { + return (EReference)logMessageStateEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getLogConfiguration() { + return logConfigurationEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getLogConfiguration_Files() { + return (EReference)logConfigurationEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getLogFile() { + return logFileEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogFile_Filename() { + return (EAttribute)logFileEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getLogFile_Patterns() { + return (EReference)logFileEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getLogPattern() { + return logPatternEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogPattern_Pattern() { + return (EAttribute)logPatternEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogPattern_Message() { + return (EAttribute)logPatternEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogPattern_Level() { + return (EAttribute)logPatternEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogPattern_Severity() { + return (EAttribute)logPatternEClass.getEStructuralFeatures().get(3); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLogPattern_Path() { + return (EAttribute)logPatternEClass.getEStructuralFeatures().get(4); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getLogLevel() { + return logLevelEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getLogSeverity() { + return logSeverityEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogsFactory getLogsFactory() { + return (LogsFactory)getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * The <b>Adapter Factory</b> for the model. + * It provides an adapter <code>createXXX</code> method for each class of the model. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.logs.LogsPackage + * @generated + */ +public class LogsAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static LogsPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogsAdapterFactory() { + if (modelPackage == null) { + modelPackage = LogsPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * <!-- begin-user-doc --> + * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. + * <!-- end-user-doc --> + * @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 <code>createXXX</code> methods. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LogsSwitch<Adapter> modelSwitch = + new LogsSwitch<Adapter>() { + @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 <code>target</code>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param target the object to adapt. + * @return the adapter for the <code>target</code>. + * @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 <em>Log Message</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Log Message Rule</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Log Message Container</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Log Message Container Configuration</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Log Message Category</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Log Message Stats</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Log Message State</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Log Configuration</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Log File</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Log Pattern</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Named Entity</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * <!-- begin-user-doc --> + * This default implementation returns null. + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * The <b>Switch</b> for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the <code>caseXXX</code> 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. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.logs.LogsPackage + * @generated + */ +public class LogsSwitch<T> extends Switch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static LogsPackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LogsSwitch() { + if (modelPackage == null) { + modelPackage = LogsPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the first non-null result returned by a <code>caseXXX</code> 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 '<em>Log Message</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Log Message</em>'. + * @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 '<em>Log Message Rule</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Log Message Rule</em>'. + * @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 '<em>Log Message Container</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Log Message Container</em>'. + * @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 '<em>Log Message Container Configuration</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Log Message Container Configuration</em>'. + * @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 '<em>Log Message Category</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Log Message Category</em>'. + * @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 '<em>Log Message Stats</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Log Message Stats</em>'. + * @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 '<em>Log Message State</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Log Message State</em>'. + * @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 '<em>Log Configuration</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Log Configuration</em>'. + * @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 '<em>Log File</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Log File</em>'. + * @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 '<em>Log Pattern</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Log Pattern</em>'. + * @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 '<em>Named Entity</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Named Entity</em>'. + * @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 '<em>EObject</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EObject</em>'. + * @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; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Aggregation Metric Value Option</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.metrics.AggregationMetricValueOption#getDuration <em>Duration</em>}</li> + * <li>{@link org.openecomp.ncomp.core.metrics.AggregationMetricValueOption#getAggregationType <em>Aggregation Type</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getAggregationMetricValueOption() + * @model + * @generated + */ +public interface AggregationMetricValueOption extends MetricValueOption { + /** + * Returns the value of the '<em><b>Duration</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Duration</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Duration</em>' 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 <em>Duration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Duration</em>' attribute. + * @see #getDuration() + * @generated + */ + void setDuration(String value); + + /** + * Returns the value of the '<em><b>Aggregation Type</b></em>' attribute. + * The literals are from the enumeration {@link org.openecomp.ncomp.core.metrics.AggregationMetricValueOptionType}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Aggregation Type</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Aggregation Type</em>' 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 <em>Aggregation Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Aggregation Type</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the literals of the enumeration '<em><b>Aggregation Metric Value Option Type</b></em>', + * and utility methods for working with them. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getAggregationMetricValueOptionType() + * @model + * @generated + */ +public enum AggregationMetricValueOptionType implements Enumerator { + /** + * The '<em><b>SUM</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #SUM_VALUE + * @generated + * @ordered + */ + SUM(0, "SUM", "SUM"), + + /** + * The '<em><b>AVERAGE</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #AVERAGE_VALUE + * @generated + * @ordered + */ + AVERAGE(0, "AVERAGE", "AVERAGE"), + + /** + * The '<em><b>COUNT</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #COUNT_VALUE + * @generated + * @ordered + */ + COUNT(0, "COUNT", "COUNT"), + + /** + * The '<em><b>MAX</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #MAX_VALUE + * @generated + * @ordered + */ + MAX(0, "MAX", "MAX"), + + /** + * The '<em><b>MIN</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #MIN_VALUE + * @generated + * @ordered + */ + MIN(0, "MIN", "MIN"); + + /** + * The '<em><b>SUM</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>SUM</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #SUM + * @model + * @generated + * @ordered + */ + public static final int SUM_VALUE = 0; + + /** + * The '<em><b>AVERAGE</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>AVERAGE</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #AVERAGE + * @model + * @generated + * @ordered + */ + public static final int AVERAGE_VALUE = 0; + + /** + * The '<em><b>COUNT</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>COUNT</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #COUNT + * @model + * @generated + * @ordered + */ + public static final int COUNT_VALUE = 0; + + /** + * The '<em><b>MAX</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>MAX</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #MAX + * @model + * @generated + * @ordered + */ + public static final int MAX_VALUE = 0; + + /** + * The '<em><b>MIN</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>MIN</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #MIN + * @model + * @generated + * @ordered + */ + public static final int MIN_VALUE = 0; + + /** + * An array of all the '<em><b>Aggregation Metric Value Option Type</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static final AggregationMetricValueOptionType[] VALUES_ARRAY = + new AggregationMetricValueOptionType[] { + SUM, + AVERAGE, + COUNT, + MAX, + MIN, + }; + + /** + * A public read-only list of all the '<em><b>Aggregation Metric Value Option Type</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static final List<AggregationMetricValueOptionType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the '<em><b>Aggregation Metric Value Option Type</b></em>' literal with the specified literal value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Aggregation Metric Value Option Type</b></em>' literal with the specified name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Aggregation Metric Value Option Type</b></em>' literal with the specified integer value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static AggregationMetricValueOptionType get(int value) { + switch (value) { + case SUM_VALUE: return SUM; + } + return null; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final int value; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String name; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private AggregationMetricValueOptionType(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public int getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getName() { + return name; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Basic Double Metric</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.metrics.BasicDoubleMetric#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getBasicDoubleMetric() + * @model + * @generated + */ +public interface BasicDoubleMetric extends BasicMetric { + /** + * Returns the value of the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Value</em>' 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 <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Value</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Basic Increasing ULong Metric</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.metrics.BasicIncreasingULongMetric#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getBasicIncreasingULongMetric() + * @model + * @generated + */ +public interface BasicIncreasingULongMetric extends BasicMetric { + /** + * Returns the value of the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Value</em>' 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 <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Value</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Basic Long Metric</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.metrics.BasicLongMetric#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getBasicLongMetric() + * @model + * @generated + */ +public interface BasicLongMetric extends BasicMetric { + /** + * Returns the value of the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Value</em>' 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 <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Value</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Basic Metric</b></em>'. + * <!-- end-user-doc --> + * + * + * @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; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Basic Metric Value Option</b></em>'. + * <!-- end-user-doc --> + * + * + * @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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Basic Metrics</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.metrics.BasicMetrics#getMetrics <em>Metrics</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getBasicMetrics() + * @model + * @generated + */ +public interface BasicMetrics extends MetricsContainer { + /** + * Returns the value of the '<em><b>Metrics</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.metrics.BasicMetric}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Metrics</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Metrics</em>' containment reference list. + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getBasicMetrics_Metrics() + * @model containment="true" + * @generated + */ + EList<BasicMetric> 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; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Double Metric</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.metrics.DoubleMetric#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getDoubleMetric() + * @model + * @generated + */ +public interface DoubleMetric extends Metric { + /** + * Returns the value of the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Value</em>' 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 <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Value</em>' 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; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Long Metric</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.metrics.LongMetric#isIncreasing <em>Increasing</em>}</li> + * <li>{@link org.openecomp.ncomp.core.metrics.LongMetric#isDelta <em>Delta</em>}</li> + * <li>{@link org.openecomp.ncomp.core.metrics.LongMetric#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getLongMetric() + * @model + * @generated + */ +public interface LongMetric extends Metric { + /** + * Returns the value of the '<em><b>Increasing</b></em>' attribute. + * The default value is <code>"false"</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Increasing</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Increasing</em>' 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 <em>Increasing</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Increasing</em>' attribute. + * @see #isIncreasing() + * @generated + */ + void setIncreasing(boolean value); + + /** + * Returns the value of the '<em><b>Delta</b></em>' attribute. + * The default value is <code>"false"</code>. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Delta</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Delta</em>' 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 <em>Delta</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Delta</em>' attribute. + * @see #isDelta() + * @generated + */ + void setDelta(boolean value); + + /** + * Returns the value of the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Value</em>' 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 <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Value</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Metric</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.metrics.Metric#getTime <em>Time</em>}</li> + * <li>{@link org.openecomp.ncomp.core.metrics.Metric#getResourceName <em>Resource Name</em>}</li> + * <li>{@link org.openecomp.ncomp.core.metrics.Metric#getMetricName <em>Metric Name</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getMetric() + * @model abstract="true" + * @generated + */ +public interface Metric extends EObject { + /** + * Returns the value of the '<em><b>Time</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Time</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Time</em>' 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 <em>Time</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Time</em>' attribute. + * @see #getTime() + * @generated + */ + void setTime(long value); + + /** + * Returns the value of the '<em><b>Resource Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Resource Name</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Resource Name</em>' 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 <em>Resource Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Resource Name</em>' attribute. + * @see #getResourceName() + * @generated + */ + void setResourceName(String value); + + /** + * Returns the value of the '<em><b>Metric Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Metric Name</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Metric Name</em>' 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 <em>Metric Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Metric Name</em>' 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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Metric Value Option</b></em>'. + * <!-- end-user-doc --> + * + * + * @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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Container</b></em>'. + * <!-- end-user-doc --> + * + * + * @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; + +/** + * <!-- begin-user-doc --> + * The <b>Factory</b> for the model. + * It provides a create method for each non-abstract class of the model. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.metrics.MetricsPackage + * @generated + */ +public interface MetricsFactory extends EFactory { + /** + * The singleton instance of the factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + MetricsFactory eINSTANCE = org.openecomp.ncomp.core.metrics.impl.MetricsFactoryImpl.init(); + + /** + * Returns a new object of class '<em>Double Metric</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Double Metric</em>'. + * @generated + */ + DoubleMetric createDoubleMetric(); + + /** + * Returns a new object of class '<em>Long Metric</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Long Metric</em>'. + * @generated + */ + LongMetric createLongMetric(); + + /** + * Returns a new object of class '<em>String Metric</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>String Metric</em>'. + * @generated + */ + StringMetric createStringMetric(); + + /** + * Returns a new object of class '<em>Aggregation Metric Value Option</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Aggregation Metric Value Option</em>'. + * @generated + */ + AggregationMetricValueOption createAggregationMetricValueOption(); + + /** + * Returns a new object of class '<em>Basic Metric Value Option</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Basic Metric Value Option</em>'. + * @generated + */ + BasicMetricValueOption createBasicMetricValueOption(); + + /** + * Returns a new object of class '<em>Sequence Metric Value Option</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Sequence Metric Value Option</em>'. + * @generated + */ + SequenceMetricValueOption createSequenceMetricValueOption(); + + /** + * Returns a new object of class '<em>Basic Metrics</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Basic Metrics</em>'. + * @generated + */ + BasicMetrics createBasicMetrics(); + + /** + * Returns a new object of class '<em>Basic Increasing ULong Metric</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Basic Increasing ULong Metric</em>'. + * @generated + */ + BasicIncreasingULongMetric createBasicIncreasingULongMetric(); + + /** + * Returns a new object of class '<em>Basic Long Metric</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Basic Long Metric</em>'. + * @generated + */ + BasicLongMetric createBasicLongMetric(); + + /** + * Returns a new object of class '<em>Basic Double Metric</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Basic Double Metric</em>'. + * @generated + */ + BasicDoubleMetric createBasicDoubleMetric(); + + /** + * Returns the package supported by this factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * The <b>Package</b> for the model. + * It contains accessors for the meta objects to represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNAME = "metrics"; + + /** + * The package namespace URI. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_URI = "org.openecomp.ncomp.core.metrics"; + + /** + * The package namespace name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + String eNS_PREFIX = "metrics"; + + /** + * The singleton instance of the package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Metric</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Time</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int METRIC__TIME = 0; + + /** + * The feature id for the '<em><b>Resource Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int METRIC__RESOURCE_NAME = 1; + + /** + * The feature id for the '<em><b>Metric Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int METRIC__METRIC_NAME = 2; + + /** + * The number of structural features of the '<em>Metric</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int METRIC_FEATURE_COUNT = 3; + + /** + * The number of operations of the '<em>Metric</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int METRIC_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.metrics.impl.DoubleMetricImpl <em>Double Metric</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Time</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DOUBLE_METRIC__TIME = METRIC__TIME; + + /** + * The feature id for the '<em><b>Resource Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DOUBLE_METRIC__RESOURCE_NAME = METRIC__RESOURCE_NAME; + + /** + * The feature id for the '<em><b>Metric Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DOUBLE_METRIC__METRIC_NAME = METRIC__METRIC_NAME; + + /** + * The feature id for the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DOUBLE_METRIC__VALUE = METRIC_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Double Metric</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DOUBLE_METRIC_FEATURE_COUNT = METRIC_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Double Metric</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Long Metric</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Time</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LONG_METRIC__TIME = METRIC__TIME; + + /** + * The feature id for the '<em><b>Resource Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LONG_METRIC__RESOURCE_NAME = METRIC__RESOURCE_NAME; + + /** + * The feature id for the '<em><b>Metric Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LONG_METRIC__METRIC_NAME = METRIC__METRIC_NAME; + + /** + * The feature id for the '<em><b>Increasing</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LONG_METRIC__INCREASING = METRIC_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Delta</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LONG_METRIC__DELTA = METRIC_FEATURE_COUNT + 1; + + /** + * The feature id for the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LONG_METRIC__VALUE = METRIC_FEATURE_COUNT + 2; + + /** + * The number of structural features of the '<em>Long Metric</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int LONG_METRIC_FEATURE_COUNT = METRIC_FEATURE_COUNT + 3; + + /** + * The number of operations of the '<em>Long Metric</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>String Metric</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Time</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int STRING_METRIC__TIME = METRIC__TIME; + + /** + * The feature id for the '<em><b>Resource Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int STRING_METRIC__RESOURCE_NAME = METRIC__RESOURCE_NAME; + + /** + * The feature id for the '<em><b>Metric Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int STRING_METRIC__METRIC_NAME = METRIC__METRIC_NAME; + + /** + * The feature id for the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int STRING_METRIC__VALUE = METRIC_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>String Metric</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int STRING_METRIC_FEATURE_COUNT = METRIC_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>String Metric</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Metric Value Option</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int METRIC_VALUE_OPTION__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int METRIC_VALUE_OPTION__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int METRIC_VALUE_OPTION__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int METRIC_VALUE_OPTION__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The number of structural features of the '<em>Metric Value Option</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int METRIC_VALUE_OPTION_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of operations of the '<em>Metric Value Option</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Aggregation Metric Value Option</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int AGGREGATION_METRIC_VALUE_OPTION__NAME = METRIC_VALUE_OPTION__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int AGGREGATION_METRIC_VALUE_OPTION__LAST_POLLED = METRIC_VALUE_OPTION__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int AGGREGATION_METRIC_VALUE_OPTION__LAST_CHANGED = METRIC_VALUE_OPTION__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int AGGREGATION_METRIC_VALUE_OPTION__CREATED = METRIC_VALUE_OPTION__CREATED; + + /** + * The feature id for the '<em><b>Duration</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int AGGREGATION_METRIC_VALUE_OPTION__DURATION = METRIC_VALUE_OPTION_FEATURE_COUNT + 0; + + /** + * The feature id for the '<em><b>Aggregation Type</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int AGGREGATION_METRIC_VALUE_OPTION__AGGREGATION_TYPE = METRIC_VALUE_OPTION_FEATURE_COUNT + 1; + + /** + * The number of structural features of the '<em>Aggregation Metric Value Option</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int AGGREGATION_METRIC_VALUE_OPTION_FEATURE_COUNT = METRIC_VALUE_OPTION_FEATURE_COUNT + 2; + + /** + * The number of operations of the '<em>Aggregation Metric Value Option</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Basic Metric Value Option</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_METRIC_VALUE_OPTION__NAME = METRIC_VALUE_OPTION__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_METRIC_VALUE_OPTION__LAST_POLLED = METRIC_VALUE_OPTION__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_METRIC_VALUE_OPTION__LAST_CHANGED = METRIC_VALUE_OPTION__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_METRIC_VALUE_OPTION__CREATED = METRIC_VALUE_OPTION__CREATED; + + /** + * The number of structural features of the '<em>Basic Metric Value Option</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_METRIC_VALUE_OPTION_FEATURE_COUNT = METRIC_VALUE_OPTION_FEATURE_COUNT + 0; + + /** + * The number of operations of the '<em>Basic Metric Value Option</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Sequence Metric Value Option</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SEQUENCE_METRIC_VALUE_OPTION__NAME = METRIC_VALUE_OPTION__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SEQUENCE_METRIC_VALUE_OPTION__LAST_POLLED = METRIC_VALUE_OPTION__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SEQUENCE_METRIC_VALUE_OPTION__LAST_CHANGED = METRIC_VALUE_OPTION__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SEQUENCE_METRIC_VALUE_OPTION__CREATED = METRIC_VALUE_OPTION__CREATED; + + /** + * The feature id for the '<em><b>Options</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SEQUENCE_METRIC_VALUE_OPTION__OPTIONS = METRIC_VALUE_OPTION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Sequence Metric Value Option</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int SEQUENCE_METRIC_VALUE_OPTION_FEATURE_COUNT = METRIC_VALUE_OPTION_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Sequence Metric Value Option</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Container</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em>Container</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int METRICS_CONTAINER_FEATURE_COUNT = 0; + + /** + * The number of operations of the '<em>Container</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int METRICS_CONTAINER_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link org.openecomp.ncomp.core.metrics.impl.BasicMetricsImpl <em>Basic Metrics</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Metrics</b></em>' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_METRICS__METRICS = METRICS_CONTAINER_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Basic Metrics</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_METRICS_FEATURE_COUNT = METRICS_CONTAINER_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Basic Metrics</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Basic Metric</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_METRIC__NAME = CorePackage.NAMED_ENTITY__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_METRIC__LAST_POLLED = CorePackage.NAMED_ENTITY__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_METRIC__LAST_CHANGED = CorePackage.NAMED_ENTITY__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_METRIC__CREATED = CorePackage.NAMED_ENTITY__CREATED; + + /** + * The number of structural features of the '<em>Basic Metric</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_METRIC_FEATURE_COUNT = CorePackage.NAMED_ENTITY_FEATURE_COUNT + 0; + + /** + * The number of operations of the '<em>Basic Metric</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Basic Increasing ULong Metric</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_INCREASING_ULONG_METRIC__NAME = BASIC_METRIC__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_INCREASING_ULONG_METRIC__LAST_POLLED = BASIC_METRIC__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_INCREASING_ULONG_METRIC__LAST_CHANGED = BASIC_METRIC__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_INCREASING_ULONG_METRIC__CREATED = BASIC_METRIC__CREATED; + + /** + * The feature id for the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_INCREASING_ULONG_METRIC__VALUE = BASIC_METRIC_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Basic Increasing ULong Metric</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_INCREASING_ULONG_METRIC_FEATURE_COUNT = BASIC_METRIC_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Basic Increasing ULong Metric</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Basic Long Metric</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_LONG_METRIC__NAME = BASIC_METRIC__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_LONG_METRIC__LAST_POLLED = BASIC_METRIC__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_LONG_METRIC__LAST_CHANGED = BASIC_METRIC__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_LONG_METRIC__CREATED = BASIC_METRIC__CREATED; + + /** + * The feature id for the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_LONG_METRIC__VALUE = BASIC_METRIC_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Basic Long Metric</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_LONG_METRIC_FEATURE_COUNT = BASIC_METRIC_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Basic Long Metric</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Basic Double Metric</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Name</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_DOUBLE_METRIC__NAME = BASIC_METRIC__NAME; + + /** + * The feature id for the '<em><b>Last Polled</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_DOUBLE_METRIC__LAST_POLLED = BASIC_METRIC__LAST_POLLED; + + /** + * The feature id for the '<em><b>Last Changed</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_DOUBLE_METRIC__LAST_CHANGED = BASIC_METRIC__LAST_CHANGED; + + /** + * The feature id for the '<em><b>Created</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_DOUBLE_METRIC__CREATED = BASIC_METRIC__CREATED; + + /** + * The feature id for the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_DOUBLE_METRIC__VALUE = BASIC_METRIC_FEATURE_COUNT + 0; + + /** + * The number of structural features of the '<em>Basic Double Metric</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int BASIC_DOUBLE_METRIC_FEATURE_COUNT = BASIC_METRIC_FEATURE_COUNT + 1; + + /** + * The number of operations of the '<em>Basic Double Metric</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Aggregation Metric Value Option Type</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Metric</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Metric</em>'. + * @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 <em>Time</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Time</em>'. + * @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 <em>Resource Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Resource Name</em>'. + * @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 <em>Metric Name</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Metric Name</em>'. + * @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 <em>Double Metric</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Double Metric</em>'. + * @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 <em>Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Value</em>'. + * @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 <em>Long Metric</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Long Metric</em>'. + * @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 <em>Increasing</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Increasing</em>'. + * @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 <em>Delta</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Delta</em>'. + * @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 <em>Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Value</em>'. + * @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 <em>String Metric</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>String Metric</em>'. + * @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 <em>Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Value</em>'. + * @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 <em>Metric Value Option</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Metric Value Option</em>'. + * @see org.openecomp.ncomp.core.metrics.MetricValueOption + * @generated + */ + EClass getMetricValueOption(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.metrics.AggregationMetricValueOption <em>Aggregation Metric Value Option</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Aggregation Metric Value Option</em>'. + * @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 <em>Duration</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Duration</em>'. + * @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 <em>Aggregation Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Aggregation Type</em>'. + * @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 <em>Basic Metric Value Option</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Basic Metric Value Option</em>'. + * @see org.openecomp.ncomp.core.metrics.BasicMetricValueOption + * @generated + */ + EClass getBasicMetricValueOption(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.metrics.SequenceMetricValueOption <em>Sequence Metric Value Option</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Sequence Metric Value Option</em>'. + * @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 <em>Options</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Options</em>'. + * @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 <em>Container</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Container</em>'. + * @see org.openecomp.ncomp.core.metrics.MetricsContainer + * @generated + */ + EClass getMetricsContainer(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.metrics.BasicMetrics <em>Basic Metrics</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Basic Metrics</em>'. + * @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 <em>Metrics</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the containment reference list '<em>Metrics</em>'. + * @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 <em>Basic Metric</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Basic Metric</em>'. + * @see org.openecomp.ncomp.core.metrics.BasicMetric + * @generated + */ + EClass getBasicMetric(); + + /** + * Returns the meta object for class '{@link org.openecomp.ncomp.core.metrics.BasicIncreasingULongMetric <em>Basic Increasing ULong Metric</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Basic Increasing ULong Metric</em>'. + * @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 <em>Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Value</em>'. + * @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 <em>Basic Long Metric</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Basic Long Metric</em>'. + * @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 <em>Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Value</em>'. + * @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 <em>Basic Double Metric</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Basic Double Metric</em>'. + * @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 <em>Value</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Value</em>'. + * @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 <em>Aggregation Metric Value Option Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for enum '<em>Aggregation Metric Value Option Type</em>'. + * @see org.openecomp.ncomp.core.metrics.AggregationMetricValueOptionType + * @generated + */ + EEnum getAggregationMetricValueOptionType(); + + /** + * Returns the factory that creates the instances of the model. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the factory that creates the instances of the model. + * @generated + */ + MetricsFactory getMetricsFactory(); + + /** + * <!-- begin-user-doc --> + * Defines literals for the meta objects that represent + * <ul> + * <li>each class,</li> + * <li>each feature of each class,</li> + * <li>each operation of each class,</li> + * <li>each enum,</li> + * <li>and each data type</li> + * </ul> + * <!-- end-user-doc --> + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.MetricImpl <em>Metric</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Time</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute METRIC__TIME = eINSTANCE.getMetric_Time(); + + /** + * The meta object literal for the '<em><b>Resource Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute METRIC__RESOURCE_NAME = eINSTANCE.getMetric_ResourceName(); + + /** + * The meta object literal for the '<em><b>Metric Name</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute METRIC__METRIC_NAME = eINSTANCE.getMetric_MetricName(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.DoubleMetricImpl <em>Double Metric</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute DOUBLE_METRIC__VALUE = eINSTANCE.getDoubleMetric_Value(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.LongMetricImpl <em>Long Metric</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Increasing</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LONG_METRIC__INCREASING = eINSTANCE.getLongMetric_Increasing(); + + /** + * The meta object literal for the '<em><b>Delta</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LONG_METRIC__DELTA = eINSTANCE.getLongMetric_Delta(); + + /** + * The meta object literal for the '<em><b>Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute LONG_METRIC__VALUE = eINSTANCE.getLongMetric_Value(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.StringMetricImpl <em>String Metric</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute STRING_METRIC__VALUE = eINSTANCE.getStringMetric_Value(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.MetricValueOptionImpl <em>Metric Value Option</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Aggregation Metric Value Option</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Duration</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute AGGREGATION_METRIC_VALUE_OPTION__DURATION = eINSTANCE.getAggregationMetricValueOption_Duration(); + + /** + * The meta object literal for the '<em><b>Aggregation Type</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Basic Metric Value Option</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Sequence Metric Value Option</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Options</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference SEQUENCE_METRIC_VALUE_OPTION__OPTIONS = eINSTANCE.getSequenceMetricValueOption_Options(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.MetricsContainerImpl <em>Container</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Basic Metrics</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Metrics</b></em>' containment reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference BASIC_METRICS__METRICS = eINSTANCE.getBasicMetrics_Metrics(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.BasicMetricImpl <em>Basic Metric</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <em>Basic Increasing ULong Metric</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute BASIC_INCREASING_ULONG_METRIC__VALUE = eINSTANCE.getBasicIncreasingULongMetric_Value(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.BasicLongMetricImpl <em>Basic Long Metric</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute BASIC_LONG_METRIC__VALUE = eINSTANCE.getBasicLongMetric_Value(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.impl.BasicDoubleMetricImpl <em>Basic Double Metric</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 '<em><b>Value</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute BASIC_DOUBLE_METRIC__VALUE = eINSTANCE.getBasicDoubleMetric_Value(); + + /** + * The meta object literal for the '{@link org.openecomp.ncomp.core.metrics.AggregationMetricValueOptionType <em>Aggregation Metric Value Option Type</em>}' enum. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Sequence Metric Value Option</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.metrics.SequenceMetricValueOption#getOptions <em>Options</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getSequenceMetricValueOption() + * @model + * @generated + */ +public interface SequenceMetricValueOption extends MetricValueOption { + /** + * Returns the value of the '<em><b>Options</b></em>' containment reference list. + * The list contents are of type {@link org.openecomp.ncomp.core.metrics.MetricValueOption}. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Options</em>' containment reference list isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Options</em>' containment reference list. + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getSequenceMetricValueOption_Options() + * @model containment="true" + * @generated + */ + EList<MetricValueOption> 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; + + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>String Metric</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * <ul> + * <li>{@link org.openecomp.ncomp.core.metrics.StringMetric#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @see org.openecomp.ncomp.core.metrics.MetricsPackage#getStringMetric() + * @model + * @generated + */ +public interface StringMetric extends Metric { + /** + * Returns the value of the '<em><b>Value</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Value</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Value</em>' 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 <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Value</em>' 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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Aggregation Metric Value Option</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.metrics.impl.AggregationMetricValueOptionImpl#getDuration <em>Duration</em>}</li> + * <li>{@link org.openecomp.ncomp.core.metrics.impl.AggregationMetricValueOptionImpl#getAggregationType <em>Aggregation Type</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class AggregationMetricValueOptionImpl extends MetricValueOptionImpl implements AggregationMetricValueOption { + /** + * The default value of the '{@link #getDuration() <em>Duration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDuration() + * @generated + * @ordered + */ + protected static final String DURATION_EDEFAULT = null; + + /** + * The cached value of the '{@link #getDuration() <em>Duration</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getDuration() + * @generated + * @ordered + */ + protected String duration = DURATION_EDEFAULT; + + /** + * The default value of the '{@link #getAggregationType() <em>Aggregation Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAggregationType() + * @generated + * @ordered + */ + protected static final AggregationMetricValueOptionType AGGREGATION_TYPE_EDEFAULT = AggregationMetricValueOptionType.SUM; + + /** + * The cached value of the '{@link #getAggregationType() <em>Aggregation Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getAggregationType() + * @generated + * @ordered + */ + protected AggregationMetricValueOptionType aggregationType = AGGREGATION_TYPE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected AggregationMetricValueOptionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.AGGREGATION_METRIC_VALUE_OPTION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getDuration() { + return duration; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AggregationMetricValueOptionType getAggregationType() { + return aggregationType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Basic Double Metric</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.metrics.impl.BasicDoubleMetricImpl#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class BasicDoubleMetricImpl extends BasicMetricImpl implements BasicDoubleMetric { + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected static final DoubleMetricAttribute VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected DoubleMetricAttribute value = VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected BasicDoubleMetricImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.BASIC_DOUBLE_METRIC; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DoubleMetricAttribute getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case MetricsPackage.BASIC_DOUBLE_METRIC__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Basic Increasing ULong Metric</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.metrics.impl.BasicIncreasingULongMetricImpl#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class BasicIncreasingULongMetricImpl extends BasicMetricImpl implements BasicIncreasingULongMetric { + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected static final IncreasingULongMetricAttribute VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected IncreasingULongMetricAttribute value = VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected BasicIncreasingULongMetricImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.BASIC_INCREASING_ULONG_METRIC; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public IncreasingULongMetricAttribute getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case MetricsPackage.BASIC_INCREASING_ULONG_METRIC__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Basic Long Metric</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.metrics.impl.BasicLongMetricImpl#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class BasicLongMetricImpl extends BasicMetricImpl implements BasicLongMetric { + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected static final LongMetricAttribute VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected LongMetricAttribute value = VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected BasicLongMetricImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.BASIC_LONG_METRIC; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LongMetricAttribute getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case MetricsPackage.BASIC_LONG_METRIC__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Basic Metric</b></em>'. + * <!-- end-user-doc --> + * <p> + * </p> + * + * @generated + */ +public abstract class BasicMetricImpl extends NamedEntityImpl implements BasicMetric { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected BasicMetricImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Basic Metric Value Option</b></em>'. + * <!-- end-user-doc --> + * <p> + * </p> + * + * @generated + */ +public class BasicMetricValueOptionImpl extends MetricValueOptionImpl implements BasicMetricValueOption { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected BasicMetricValueOptionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Basic Metrics</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.metrics.impl.BasicMetricsImpl#getMetrics <em>Metrics</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class BasicMetricsImpl extends MetricsContainerImpl implements BasicMetrics { + /** + * The cached value of the '{@link #getMetrics() <em>Metrics</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMetrics() + * @generated + * @ordered + */ + protected EList<BasicMetric> metrics; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected BasicMetricsImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.BASIC_METRICS; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<BasicMetric> getMetrics() { + if (metrics == null) { + metrics = new EObjectContainmentEList<BasicMetric>(BasicMetric.class, this, MetricsPackage.BASIC_METRICS__METRICS); + } + return metrics; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case MetricsPackage.BASIC_METRICS__METRICS: + getMetrics().clear(); + getMetrics().addAll((Collection<? extends BasicMetric>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case MetricsPackage.BASIC_METRICS__METRICS: + getMetrics().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Double Metric</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.metrics.impl.DoubleMetricImpl#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class DoubleMetricImpl extends MetricImpl implements DoubleMetric { + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected static final double VALUE_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected double value = VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected DoubleMetricImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.DOUBLE_METRIC; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public double getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case MetricsPackage.DOUBLE_METRIC__VALUE: + setValue((Double)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case MetricsPackage.DOUBLE_METRIC__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case MetricsPackage.DOUBLE_METRIC__VALUE: + return value != VALUE_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Long Metric</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.metrics.impl.LongMetricImpl#isIncreasing <em>Increasing</em>}</li> + * <li>{@link org.openecomp.ncomp.core.metrics.impl.LongMetricImpl#isDelta <em>Delta</em>}</li> + * <li>{@link org.openecomp.ncomp.core.metrics.impl.LongMetricImpl#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class LongMetricImpl extends MetricImpl implements LongMetric { + /** + * The default value of the '{@link #isIncreasing() <em>Increasing</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isIncreasing() + * @generated + * @ordered + */ + protected static final boolean INCREASING_EDEFAULT = false; + + /** + * The cached value of the '{@link #isIncreasing() <em>Increasing</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isIncreasing() + * @generated + * @ordered + */ + protected boolean increasing = INCREASING_EDEFAULT; + + /** + * The default value of the '{@link #isDelta() <em>Delta</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isDelta() + * @generated + * @ordered + */ + protected static final boolean DELTA_EDEFAULT = false; + + /** + * The cached value of the '{@link #isDelta() <em>Delta</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #isDelta() + * @generated + * @ordered + */ + protected boolean delta = DELTA_EDEFAULT; + + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected static final long VALUE_EDEFAULT = 0L; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected long value = VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected LongMetricImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.LONG_METRIC; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isIncreasing() { + return increasing; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public boolean isDelta() { + return delta; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public long getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Metric</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.metrics.impl.MetricImpl#getTime <em>Time</em>}</li> + * <li>{@link org.openecomp.ncomp.core.metrics.impl.MetricImpl#getResourceName <em>Resource Name</em>}</li> + * <li>{@link org.openecomp.ncomp.core.metrics.impl.MetricImpl#getMetricName <em>Metric Name</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public abstract class MetricImpl extends MinimalEObjectImpl.Container implements Metric { + /** + * The default value of the '{@link #getTime() <em>Time</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTime() + * @generated + * @ordered + */ + protected static final long TIME_EDEFAULT = 0L; + + /** + * The cached value of the '{@link #getTime() <em>Time</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTime() + * @generated + * @ordered + */ + protected long time = TIME_EDEFAULT; + + /** + * The default value of the '{@link #getResourceName() <em>Resource Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getResourceName() + * @generated + * @ordered + */ + protected static final String RESOURCE_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getResourceName() <em>Resource Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getResourceName() + * @generated + * @ordered + */ + protected String resourceName = RESOURCE_NAME_EDEFAULT; + + /** + * The default value of the '{@link #getMetricName() <em>Metric Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMetricName() + * @generated + * @ordered + */ + protected static final String METRIC_NAME_EDEFAULT = null; + + /** + * The cached value of the '{@link #getMetricName() <em>Metric Name</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getMetricName() + * @generated + * @ordered + */ + protected String metricName = METRIC_NAME_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected MetricImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.METRIC; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public long getTime() { + return time; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTime(long newTime) { + long oldTime = time; + time = newTime; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, MetricsPackage.METRIC__TIME, oldTime, time)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getResourceName() { + return resourceName; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getMetricName() { + return metricName; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Metric Value Option</b></em>'. + * <!-- end-user-doc --> + * <p> + * </p> + * + * @generated + */ +public abstract class MetricValueOptionImpl extends NamedEntityImpl implements MetricValueOption { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected MetricValueOptionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Container</b></em>'. + * <!-- end-user-doc --> + * <p> + * </p> + * + * @generated + */ +public abstract class MetricsContainerImpl extends MinimalEObjectImpl.Container implements MetricsContainer { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected MetricsContainerImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Factory</b>. + * <!-- end-user-doc --> + * @generated + */ +public class MetricsFactoryImpl extends EFactoryImpl implements MetricsFactory { + /** + * Creates the default factory implementation. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public MetricsFactoryImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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"); + } + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DoubleMetric createDoubleMetric() { + DoubleMetricImpl doubleMetric = new DoubleMetricImpl(); + return doubleMetric; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public LongMetric createLongMetric() { + LongMetricImpl longMetric = new LongMetricImpl(); + return longMetric; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public StringMetric createStringMetric() { + StringMetricImpl stringMetric = new StringMetricImpl(); + return stringMetric; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public AggregationMetricValueOption createAggregationMetricValueOption() { + AggregationMetricValueOptionImpl aggregationMetricValueOption = new AggregationMetricValueOptionImpl(); + return aggregationMetricValueOption; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public BasicMetricValueOption createBasicMetricValueOption() { + BasicMetricValueOptionImpl basicMetricValueOption = new BasicMetricValueOptionImpl(); + return basicMetricValueOption; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public SequenceMetricValueOption createSequenceMetricValueOption() { + SequenceMetricValueOptionImpl sequenceMetricValueOption = new SequenceMetricValueOptionImpl(); + return sequenceMetricValueOption; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public BasicMetrics createBasicMetrics() { + BasicMetricsImpl basicMetrics = new BasicMetricsImpl(); + return basicMetrics; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public BasicIncreasingULongMetric createBasicIncreasingULongMetric() { + BasicIncreasingULongMetricImpl basicIncreasingULongMetric = new BasicIncreasingULongMetricImpl(); + return basicIncreasingULongMetric; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public BasicLongMetric createBasicLongMetric() { + BasicLongMetricImpl basicLongMetric = new BasicLongMetricImpl(); + return basicLongMetric; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public BasicDoubleMetric createBasicDoubleMetric() { + BasicDoubleMetricImpl basicDoubleMetric = new BasicDoubleMetricImpl(); + return basicDoubleMetric; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String convertAggregationMetricValueOptionTypeToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public MetricsPackage getMetricsPackage() { + return (MetricsPackage)getEPackage(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model <b>Package</b>. + * <!-- end-user-doc --> + * @generated + */ +public class MetricsPackageImpl extends EPackageImpl implements MetricsPackage { + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass metricEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass doubleMetricEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass longMetricEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass stringMetricEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass metricValueOptionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass aggregationMetricValueOptionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass basicMetricValueOptionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass sequenceMetricValueOptionEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass metricsContainerEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass basicMetricsEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass basicMetricEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass basicIncreasingULongMetricEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass basicLongMetricEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass basicDoubleMetricEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EEnum aggregationMetricValueOptionTypeEEnum = null; + + /** + * Creates an instance of the model <b>Package</b>, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + * <p>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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. + * + * <p>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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getMetric() { + return metricEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getMetric_Time() { + return (EAttribute)metricEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getMetric_ResourceName() { + return (EAttribute)metricEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getMetric_MetricName() { + return (EAttribute)metricEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getDoubleMetric() { + return doubleMetricEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getDoubleMetric_Value() { + return (EAttribute)doubleMetricEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getLongMetric() { + return longMetricEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLongMetric_Increasing() { + return (EAttribute)longMetricEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLongMetric_Delta() { + return (EAttribute)longMetricEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getLongMetric_Value() { + return (EAttribute)longMetricEClass.getEStructuralFeatures().get(2); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getStringMetric() { + return stringMetricEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getStringMetric_Value() { + return (EAttribute)stringMetricEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getMetricValueOption() { + return metricValueOptionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getAggregationMetricValueOption() { + return aggregationMetricValueOptionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getAggregationMetricValueOption_Duration() { + return (EAttribute)aggregationMetricValueOptionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getAggregationMetricValueOption_AggregationType() { + return (EAttribute)aggregationMetricValueOptionEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getBasicMetricValueOption() { + return basicMetricValueOptionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getSequenceMetricValueOption() { + return sequenceMetricValueOptionEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getSequenceMetricValueOption_Options() { + return (EReference)sequenceMetricValueOptionEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getMetricsContainer() { + return metricsContainerEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getBasicMetrics() { + return basicMetricsEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getBasicMetrics_Metrics() { + return (EReference)basicMetricsEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getBasicMetric() { + return basicMetricEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getBasicIncreasingULongMetric() { + return basicIncreasingULongMetricEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getBasicIncreasingULongMetric_Value() { + return (EAttribute)basicIncreasingULongMetricEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getBasicLongMetric() { + return basicLongMetricEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getBasicLongMetric_Value() { + return (EAttribute)basicLongMetricEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getBasicDoubleMetric() { + return basicDoubleMetricEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getBasicDoubleMetric_Value() { + return (EAttribute)basicDoubleMetricEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EEnum getAggregationMetricValueOptionType() { + return aggregationMetricValueOptionTypeEEnum; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public MetricsFactory getMetricsFactory() { + return (MetricsFactory)getEFactoryInstance(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Sequence Metric Value Option</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.metrics.impl.SequenceMetricValueOptionImpl#getOptions <em>Options</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class SequenceMetricValueOptionImpl extends MetricValueOptionImpl implements SequenceMetricValueOption { + /** + * The cached value of the '{@link #getOptions() <em>Options</em>}' containment reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getOptions() + * @generated + * @ordered + */ + protected EList<MetricValueOption> options; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected SequenceMetricValueOptionImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.SEQUENCE_METRIC_VALUE_OPTION; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<MetricValueOption> getOptions() { + if (options == null) { + options = new EObjectContainmentEList<MetricValueOption>(MetricValueOption.class, this, MetricsPackage.SEQUENCE_METRIC_VALUE_OPTION__OPTIONS); + } + return options; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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<? extends MetricValueOption>)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case MetricsPackage.SEQUENCE_METRIC_VALUE_OPTION__OPTIONS: + getOptions().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>String Metric</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * <ul> + * <li>{@link org.openecomp.ncomp.core.metrics.impl.StringMetricImpl#getValue <em>Value</em>}</li> + * </ul> + * </p> + * + * @generated + */ +public class StringMetricImpl extends MetricImpl implements StringMetric { + /** + * The default value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected static final String VALUE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getValue() + * @generated + * @ordered + */ + protected String value = VALUE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected StringMetricImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return MetricsPackage.Literals.STRING_METRIC; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getValue() { + return value; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case MetricsPackage.STRING_METRIC__VALUE: + setValue((String)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case MetricsPackage.STRING_METRIC__VALUE: + setValue(VALUE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * The <b>Adapter Factory</b> for the model. + * It provides an adapter <code>createXXX</code> method for each class of the model. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.metrics.MetricsPackage + * @generated + */ +public class MetricsAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static MetricsPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public MetricsAdapterFactory() { + if (modelPackage == null) { + modelPackage = MetricsPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * <!-- begin-user-doc --> + * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. + * <!-- end-user-doc --> + * @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 <code>createXXX</code> methods. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected MetricsSwitch<Adapter> modelSwitch = + new MetricsSwitch<Adapter>() { + @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 <code>target</code>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param target the object to adapt. + * @return the adapter for the <code>target</code>. + * @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 <em>Metric</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Double Metric</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Long Metric</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>String Metric</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Metric Value Option</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Aggregation Metric Value Option</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Basic Metric Value Option</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Sequence Metric Value Option</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Container</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Basic Metrics</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Basic Metric</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Basic Increasing ULong Metric</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Basic Long Metric</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Basic Double Metric</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Named Entity</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.ncomp.core.NamedEntity + * @generated + */ + public Adapter createNamedEntityAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * <!-- begin-user-doc --> + * This default implementation returns null. + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * The <b>Switch</b> for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the <code>caseXXX</code> 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. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.metrics.MetricsPackage + * @generated + */ +public class MetricsSwitch<T> extends Switch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static MetricsPackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public MetricsSwitch() { + if (modelPackage == null) { + modelPackage = MetricsPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the first non-null result returned by a <code>caseXXX</code> 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 '<em>Metric</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Metric</em>'. + * @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 '<em>Double Metric</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Double Metric</em>'. + * @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 '<em>Long Metric</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Long Metric</em>'. + * @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 '<em>String Metric</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>String Metric</em>'. + * @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 '<em>Metric Value Option</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Metric Value Option</em>'. + * @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 '<em>Aggregation Metric Value Option</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Aggregation Metric Value Option</em>'. + * @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 '<em>Basic Metric Value Option</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Basic Metric Value Option</em>'. + * @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 '<em>Sequence Metric Value Option</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Sequence Metric Value Option</em>'. + * @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 '<em>Container</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Container</em>'. + * @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 '<em>Basic Metrics</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Basic Metrics</em>'. + * @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 '<em>Basic Metric</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Basic Metric</em>'. + * @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 '<em>Basic Increasing ULong Metric</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Basic Increasing ULong Metric</em>'. + * @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 '<em>Basic Long Metric</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Basic Long Metric</em>'. + * @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 '<em>Basic Double Metric</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Basic Double Metric</em>'. + * @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 '<em>Named Entity</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Named Entity</em>'. + * @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 '<em>EObject</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EObject</em>'. + * @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; + +/** + * <!-- begin-user-doc --> + * The <b>Adapter Factory</b> for the model. + * It provides an adapter <code>createXXX</code> method for each class of the model. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.CorePackage + * @generated + */ +public class CoreAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static CorePackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CoreAdapterFactory() { + if (modelPackage == null) { + modelPackage = CorePackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * <!-- begin-user-doc --> + * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. + * <!-- end-user-doc --> + * @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 <code>createXXX</code> methods. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected CoreSwitch<Adapter> modelSwitch = + new CoreSwitch<Adapter>() { + @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 <code>target</code>. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param target the object to adapt. + * @return the adapter for the <code>target</code>. + * @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 <em>Named Entity</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Event</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>Has Operational State</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @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 <em>User</em>}'. + * <!-- begin-user-doc --> + * 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. + * <!-- end-user-doc --> + * @return the new adapter. + * @see org.openecomp.ncomp.core.User + * @generated + */ + public Adapter createUserAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * <!-- begin-user-doc --> + * This default implementation returns null. + * <!-- end-user-doc --> + * @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; + +/** + * <!-- begin-user-doc --> + * The <b>Switch</b> for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the <code>caseXXX</code> 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. + * <!-- end-user-doc --> + * @see org.openecomp.ncomp.core.CorePackage + * @generated + */ +public class CoreSwitch<T> extends Switch<T> { + /** + * The cached model package + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected static CorePackage modelPackage; + + /** + * Creates an instance of the switch. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public CoreSwitch() { + if (modelPackage == null) { + modelPackage = CorePackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @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 <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the first non-null result returned by a <code>caseXXX</code> 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 '<em>Named Entity</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Named Entity</em>'. + * @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 '<em>Event</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Event</em>'. + * @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 '<em>Has Operational State</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Has Operational State</em>'. + * @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 '<em>User</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>User</em>'. + * @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 '<em>EObject</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>EObject</em>'. + * @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
+}
|